binutils 2.9.5.0.5 still trigger the last bug - static libstdc++ required

H.J. Lu hjl@lucon.org
Sun Aug 8 09:08:00 GMT 1999


> 
>    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?
> 

If it is true, I tend to believe it is a dynamic linker bug in glibc
since there is no problem with Solaris. I suggest we revert the patch
in bfd and deal with it in the glibc dynamic linker.


-- 
H.J. Lu (hjl@gnu.org)


More information about the Binutils mailing list