gold vs. BFD handling of relocations

David Miller davem@davemloft.net
Thu Apr 17 07:37:00 GMT 2008


From: Ian Lance Taylor <iant@google.com>
Date: Thu, 17 Apr 2008 00:33:50 -0700

> The right thing to do is target dependent.  For most REL targets, even
> when an input relocation is turned into a dynamic relocation, if the
> input relocation is against a section symbol, some processing is
> necessary.
> 
> For i386, see should_apply_static_reloc.

I see.  This is a side effect of the fact that the addends for
REL targets are in the relocation location itself.

> For x86_64, it doesn't much matter what the linker does, since the
> dynamic linker mostly ignores the contents of the input sections when
> applying dynamic relocs.  I suppose it might be a little bit more
> efficient if we skipped the reloc processing.

This is what I'd like to do on Sparc.

It can be made generic, based upon a ->local() or ->global()
return value, the caller can mark the reloc as "ignore" or
something like that.



More information about the Binutils mailing list