[gold commit] PR gold/19291: Adjust local symbol value in relocatable link to be relative to section

Cary Coutant ccoutant@gmail.com
Wed Nov 25 16:59:00 GMT 2015
I've committed the following patch to fix PR 19291. Gold was not
correctly setting the symbol value for local symbols in a relocatable
link. Normally, output sections in a relocatable link are at virtual
address 0, and symbol values do not need any adjustment. In the rare
case where an output section has a non-zero address (the result of
using a linker script), we need to subtract the section start address.

-cary


2015-11-25  Cary Coutant  <ccoutant@gmail.com>

gold/
        PR gold/19291
        * object.cc (Sized_relobj_file::write_local_symbols): If relocatable,
        subtract section address from symbol value.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr19291.patch
Type: application/octet-stream
Size: 2120 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20151125/5c5c0306/attachment.obj>


More information about the Binutils mailing list