gold patch committed: Fix ld -r with linker script
Ian Lance Taylor
iant@google.com
Sat Feb 28 17:55:00 GMT 2009
When using a linker script with ld -r (an unusual case) the sections may
wind up at non-zero addresses. gold wasn't handling that in a couple of
cases--it was including the section address in the symbol value, which
is correct for a final link but incorrect when using -r. I never
noticed because when using -r the section address is normally
zero--unless you use a linker script. I committed this patch to fix the
problem.
Ian
2009-02-28 Ian Lance Taylor <iant@google.com>
PR 6992
* symtab.cc (Symbol_table::sized_write_section_symbol): In a
relocatable link set the value of the section symbol to zero.
* object.cc (Sized_relobj::do_finalize_local_symbols): In a
relocatable link don't include the section address in the local
symbol value.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-patch
Size: 1625 bytes
Desc: Fix ld -r with linker script
URL: <https://sourceware.org/pipermail/binutils/attachments/20090228/67de5faf/attachment.bin>
More information about the Binutils
mailing list