gold patch committed: Discard R_xxx_NONE relocations with -r
Ian Lance Taylor
iant@google.com
Fri Dec 12 16:33:00 GMT 2008
Daniel Jacobowitz <drow@false.org> writes:
> Am I reading correctly that you will discard R_xxx_NONE against an
> undefined global symbol with ld -r? If so, that's a problem; some
> other toolchains, and the ARM EABI, specify that NONE relocations are
> valid for dependency marking. For instance, a file which passes a
> printf format string including floating-point specifiers might include
> a NONE relocation indicating that the floating-point-aware version of
> printf is required.
Thanks. Good point. I committed this patch. This will only discard
R_xxx_NONE relocs for local symbol 0.
2008-12-12 Ian Lance Taylor <iant@google.com>
* target-reloc.h (Default_scan_relocatable_relocs): Only discard
r_type == 0 for a local symbol with r_sym == 0.
(scan_relocatable_relocs): Pass r_sym to
local_non_section_strategy.
* reloc.cc (Emit_relocs_strategy::local_non_section_strategy): Add
r_sym parameter.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-patch
Size: 3035 bytes
Desc: Only discard R_xxx_NONE relocs for symbol 0
URL: <https://sourceware.org/pipermail/binutils/attachments/20081212/d8e3064c/attachment.bin>
More information about the Binutils
mailing list