This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: binutils 2.9.5.0.5 still trigger the last bug - static libstdc++ required
- To: hjl@lucon.org
- Subject: Re: binutils 2.9.5.0.5 still trigger the last bug - static libstdc++ required
- From: Ian Lance Taylor <ian@zembu.com>
- Date: 8 Aug 1999 11:25:56 -0400
- CC: jj@sunsite.ms.mff.cuni.cz, binutils@sourceware.cygnus.com, davem@redhat.com
- References: <19990808060231.3338D57B9@ocean.lucon.org>
Date: Sat, 7 Aug 1999 23:02:31 -0700 (PDT)
From: hjl@lucon.org (H.J. Lu)
This patch from David breaks none-PIC in DSO. David, can you tell
us why this patch is needed and could you please run "make check"
in ld on binutils 2.9.l.0.25 on Linux/Sparc?
H.J., thanks for tracking down the problem.
David's patch to elf32-sparc.c is wrong. It presumes that we keep the
same symbol for a dynamic relocation. However, in the case in
question, we do not.
David's patch applies to a piece of code which is only executed if
there is no global symbol, or if we are not supposed to generate a
relocation against the global symbol. The code converts the
relocation to be against a section symbol.
So this comment is incorrect:
/* For non-RELATIVE dynamic relocations, we keep the
same symbol, and so generally the same addend. But
we do need to adjust those relocations referencing
sections. */
We do not keep the same symbol. Moreover, the actual code tests SYM
to see whether it is a section symbol, but at that point SYM is
irrelevant. At that point we will always use a section symbol.
My inclination is to simply revert the patch. However, I gather from
Jakub's message that that will break something on SPARC/GNU/Linux.
What will it break?
Ian