gold patch committed: Discard R_xxx_NONE relocations with -r
Daniel Jacobowitz
drow@false.org
Fri Dec 12 02:52:00 GMT 2008
More information about the Binutils mailing list
Fri Dec 12 02:52:00 GMT 2008
- Previous message (by thread): gold patch committed: Discard R_xxx_NONE relocations with -r
- Next message (by thread): gold patch committed: Discard R_xxx_NONE relocations with -r
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, Dec 11, 2008 at 06:43:08PM -0800, Ian Lance Taylor wrote:
> @@ -342,8 +352,14 @@ class Default_scan_relocatable_relocs
> // Return the strategy to use for a global symbol, given the
> // relocation type, the object, and the symbol index.
> inline Relocatable_relocs::Reloc_strategy
> - global_strategy(unsigned int, Relobj*, unsigned int)
> - { return Relocatable_relocs::RELOC_COPY; }
> + global_strategy(unsigned int r_type, Relobj*, unsigned int)
> + {
> + // We assume that relocation type 0 is NONE. Targets which are
> + // different must override.
> + if (r_type == 0)
> + return Relocatable_relocs::RELOC_DISCARD;
> + return Relocatable_relocs::RELOC_COPY;
> + }
> };
>
> // Scan relocs during a relocatable link. This is a default
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.
--
Daniel Jacobowitz
CodeSourcery
- Previous message (by thread): gold patch committed: Discard R_xxx_NONE relocations with -r
- Next message (by thread): gold patch committed: Discard R_xxx_NONE relocations with -r
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list