Fix linking of .gpdword on MIPS

H. J. Lu hjl@lucon.org
Tue Feb 27 01:40:00 GMT 2007


On Mon, Feb 26, 2007 at 05:32:35PM -0800, H. J. Lu wrote:
> On Mon, Feb 26, 2007 at 10:47:28PM +0000, Richard Sandiford wrote:
> > 
> > The patch ignores the addend on a relocation against symbol 0,
> > on the basis that:
> > 
> > 	/* r_symndx will be zero only for relocs against symbols
> > 	   from removed linkonce sections, or sections discarded by
> > 	   a linker script.  */
> > 
> > But that isn't true on MIPS; r_symndx is also zero the second
> > and subsequent entries in a composite relocation, when the addend
> > is carried over from the result of the previous relocations.
> > 
> 
> It isn't true for x86 either. See
> 
> http://sourceware.org/bugzilla/show_bug.cgi?id=3958

I think

http://sourceware.org/ml/binutils/2007-02/msg00038.html

should fix all targets, except for elf32-arm.c and elf32-score.c.
It is more generic than the mips specific fix.


H.J.



More information about the Binutils mailing list