gold patch committed: Accept negative addend for merge section symbol

Ian Lance Taylor iant@google.com
Thu Jul 24 01:28:00 GMT 2008
PR 6658 is about an object file which is arguably malformed.  It
contains a reloc against a section symbol of a merge section with a
negative addend.  When the linker sees a reloc against a section
symbol of a merge section, it must use the addend to identify the part
of the merge section in the input file, and map that to a part of the
merge section in the output file.  That only works for a positive
addend.  This object file should really be using a local symbol rather
than a section symbol.

Worse, this is a 32-bit reloc in a 64-bit object file, so it's not
even particularly obvious that the addend, 0xfffffffc, is negative.

Still, we want gold to work, so I patched gold to try to handle this
case correctly.

Ian


2008-07-23  Ian Lance Taylor  <iant@google.com>

	PR 6658
	* object.h (Merged_symbol_value::value): Do our best to handle a
	negative addend.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-patch
Size: 2148 bytes
Desc: Accept negative addend for merge section symbol
URL: <https://sourceware.org/pipermail/binutils/attachments/20080724/cc33f10a/attachment.bin>


More information about the Binutils mailing list