Bug 1879 - FAIL: weakref tests
Summary: FAIL: weakref tests
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: 2.17
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-18 00:29 UTC by John David Anglin
Modified: 2005-11-20 22:09 UTC (History)
2 users (show)

See Also:
Host:
Target: hppa*-*-hpux11.11 mmix-knuth-mmixware
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John David Anglin 2005-11-18 00:29:28 UTC
FAIL: weakref tests, relocations
FAIL: weakref tests, global syms
FAIL: weakref tests, local syms
FAIL: weakref tests, strong undefined syms
FAIL: weakref tests, weak undefined syms

/xxx/gnu/binutils-2.15.90/src/gas/testsuite/lib/run ../as-new   -o dump.o /xxx/g
nu/binutils-2.15.90/src/gas/testsuite/gas/all/weakref1.s
/xxx/gnu/binutils-2.15.90/src/gas/testsuite/gas/all/weakref1.s: Assembler messag
es:
/xxx/gnu/binutils-2.15.90/src/gas/testsuite/gas/all/weakref1.s:192: Error: junk
at end of line, first unrecognized character is `='
/xxx/gnu/binutils-2.15.90/objdir/gas/testsuite/../../binutils/objdump  -r dump.o
 > dump.out
/xxx/gnu/binutils-2.15.90/objdir/gas/testsuite/../../binutils/objdump: 'dump.o':
 No such file
FAIL: weakref tests, relocations
/xxx/gnu/binutils-2.15.90/src/gas/testsuite/lib/run ../as-new   -o dump.o /xxx/g
nu/binutils-2.15.90/src/gas/testsuite/gas/all/weakref1.s
/xxx/gnu/binutils-2.15.90/src/gas/testsuite/gas/all/weakref1.s: Assembler messag
es:
/xxx/gnu/binutils-2.15.90/src/gas/testsuite/gas/all/weakref1.s:192: Error: junk
at end of line, first unrecognized character is `='
/xxx/gnu/binutils-2.15.90/objdir/gas/testsuite/../../binutils/nm-new  --defined-
only --extern-only --no-sort dump.o > dump.out
/xxx/gnu/binutils-2.15.90/objdir/gas/testsuite/../../binutils/nm-new: 'dump.o':
No such file
FAIL: weakref tests, global syms
/xxx/gnu/binutils-2.15.90/src/gas/testsuite/lib/run ../as-new   -o dump.o /xxx/g
nu/binutils-2.15.90/src/gas/testsuite/gas/all/weakref1.s
/xxx/gnu/binutils-2.15.90/src/gas/testsuite/gas/all/weakref1.s: Assembler messag
es:
/xxx/gnu/binutils-2.15.90/src/gas/testsuite/gas/all/weakref1.s:192: Error: junk
at end of line, first unrecognized character is `='
/xxx/gnu/binutils-2.15.90/objdir/gas/testsuite/../../binutils/nm-new  --defined-
only --no-sort dump.o > dump.out
/xxx/gnu/binutils-2.15.90/objdir/gas/testsuite/../../binutils/nm-new: 'dump.o':
No such file
FAIL: weakref tests, local syms
/xxx/gnu/binutils-2.15.90/src/gas/testsuite/lib/run ../as-new   -o dump.o /xxx/g
nu/binutils-2.15.90/src/gas/testsuite/gas/all/weakref1.s
/xxx/gnu/binutils-2.15.90/src/gas/testsuite/gas/all/weakref1.s: Assembler messag
es:
/xxx/gnu/binutils-2.15.90/src/gas/testsuite/gas/all/weakref1.s:192: Error: junk
at end of line, first unrecognized character is `='
/xxx/gnu/binutils-2.15.90/objdir/gas/testsuite/../../binutils/nm-new  --undefine
d-only --no-sort dump.o > dump.out
/xxx/gnu/binutils-2.15.90/objdir/gas/testsuite/../../binutils/nm-new: 'dump.o':
No such file
FAIL: weakref tests, strong undefined syms
/xxx/gnu/binutils-2.15.90/src/gas/testsuite/lib/run ../as-new   -o dump.o /xxx/g
nu/binutils-2.15.90/src/gas/testsuite/gas/all/weakref1.s
/xxx/gnu/binutils-2.15.90/src/gas/testsuite/gas/all/weakref1.s: Assembler messag
es:
/xxx/gnu/binutils-2.15.90/src/gas/testsuite/gas/all/weakref1.s:192: Error: junk
at end of line, first unrecognized character is `='
/xxx/gnu/binutils-2.15.90/objdir/gas/testsuite/../../binutils/nm-new  --undefine
d-only --no-sort dump.o > dump.out
/xxx/gnu/binutils-2.15.90/objdir/gas/testsuite/../../binutils/nm-new: 'dump.o':
No such file
FAIL: weakref tests, weak undefined syms
Comment 1 John David Anglin 2005-11-18 01:15:33 UTC
These also fail under hppa2.0w-hp-hpux11.11.
Comment 2 Hans-Peter Nilsson 2005-11-19 07:46:45 UTC
Hey, it's the same FAILs as for mmix-knuth-mmixware!
Ever since rth's change from ".set" to "=" for these tests.
I scratched the "host" and "build" fields, as this was a
cross from i686-pc-linux-gnu (FC2).
Comment 3 dave@hiauly1.hia.nrc.ca 2005-11-19 16:50:47 UTC
Subject: Re:  FAIL: weakref tests

> Hey, it's the same FAILs as for mmix-knuth-mmixware!
> Ever since rth's change from ".set" to "=" for these tests.
> I scratched the "host" and "build" fields, as this was a
> cross from i686-pc-linux-gnu (FC2).

1) On hppa, the operation needs to be indented.  This allows
   weakref1.s to assemble.  It is interesting that this seems to
   work.  Before I saw this, I thought it was impossible to alias
   a symbol under hpux.  The HP assembler doesn't allow it, and
   .equ and .set don't work with GAS.  Never tried .equiv.

2) With some tweaking of the .d files, I can get "relocations",
   "global syms" and "local syms" to pass on hppa2.0w-hp-hpux11.11.
   However, I don't have solution for "strong undefined syms"
   or "weak undefined syms".

I see in dump.o:

         U wa1
	 U wb1
	 U wc1
	 U wh2
	 U wh3
	 U wh4
	 U wh5
	 U wh6
	 U wh7
	 U wm6
	 U wm7
	 U wm8
	 U ww1
	 U ww10
	 U ww2
	 U ww3
	 U ww4
	 U ww5
	 U ww6
	 U ww7
	 U ww8
	 U ww9

With odump I see for wa1:

00000000 00000000 Data  Unsat  0 ......S...  3 00000 wa1

The 'S' indicates a "weak" secondary definition.  On hppa-linux,
we have:

         w wa1
         w wb1
	 w wc1
	 w wh2
	 ...

So, the symbols are weak and local.  I think that this is a
problem under hpux as secondary definitions always have have
univeral (global) or unsatisfied scope.  I'm not sure why it's
necessary to output weak locals.  There's no mention of such symbols
in the SYSV ABI as far as I know.

I need to find a solution as to how to handle weak references under
hpux as their introduction is also causing problems in GCC.

Dave
Comment 4 John David Anglin 2005-11-20 22:09:12 UTC
See http://sources.redhat.com/ml/binutils/2005-11/msg00310.html.