[Bug bootstrap/15178] Solaris 9/x86 fails linking after stage 3

ro at techfak dot uni-bielefeld dot de gcc-bugzilla@gcc.gnu.org
Tue Apr 27 22:28:00 GMT 2004


------- Additional Comments From ro at techfak dot uni-bielefeld dot de  2004-04-27 22:11 -------
Subject: Re:  New: Solaris 9/x86 fails linking after stage 3

I've observed the same problem both on Solaris 10/x86 (always) and on
Solaris 9/x86 with assembler patch 115114-01 installed.  A minimal testcase
is

	.weak	_weakfunc
_weakfunc:
	.set	.LTHUNK0,_weakfunc
_func:
	jmp	.LTHUNK0

With the old 7.0 (i.e. pre-patch) assembler, one gets no text relocations,
with the 7.1 one (Solaris 9 patch and Solaris 10), elfdump -r reports:

Relocation: .rel.text
        type                       offset              section   with respect to
        R_386_PC32                       0x1             .rel.text      .LTHUNK0  

I've opened Bug Id 4950651 for this issue, but the bug was closed claiming
this was expected behavior (and necessary to fix another bug, Id 4818485).

The suggested fix was to add

	.local  .LTHUNK0

to the testcase.

While this fixes the testcase, I don't know if this is correct for g++ in
general (and haven't tried to implement this for real).  Anyway, this is a
change from GCC 3.3 to 3.4, i.e. the 3.3 branch used to bootstrap correctly
even with the new assembler.

	Rainer


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15178



More information about the Gcc-bugs mailing list