PR 7091
* target-reloc.h (Default_scan_relocatable_relocs): For each function, map r_type == 0 to RELOC_DISCARD.
This commit is contained in:
parent
5f3563ea7a
commit
c250817872
|
@ -1,3 +1,9 @@
|
||||||
|
2008-12-11 Ian Lance Taylor <iant@google.com>
|
||||||
|
|
||||||
|
PR 7091
|
||||||
|
* target-reloc.h (Default_scan_relocatable_relocs): For each
|
||||||
|
function, map r_type == 0 to RELOC_DISCARD.
|
||||||
|
|
||||||
2008-12-10 Cary Coutant <ccoutant@google.com>
|
2008-12-10 Cary Coutant <ccoutant@google.com>
|
||||||
|
|
||||||
* layout.cc (Layout::add_comdat): Allow COMDAT group from a replacement
|
* layout.cc (Layout::add_comdat): Allow COMDAT group from a replacement
|
||||||
|
|
|
@ -308,14 +308,24 @@ class Default_scan_relocatable_relocs
|
||||||
// Return the strategy to use for a local symbol which is not a
|
// Return the strategy to use for a local symbol which is not a
|
||||||
// section symbol, given the relocation type.
|
// section symbol, given the relocation type.
|
||||||
inline Relocatable_relocs::Reloc_strategy
|
inline Relocatable_relocs::Reloc_strategy
|
||||||
local_non_section_strategy(unsigned int, Relobj*)
|
local_non_section_strategy(unsigned int r_type, Relobj*)
|
||||||
{ return Relocatable_relocs::RELOC_COPY; }
|
{
|
||||||
|
// 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;
|
||||||
|
}
|
||||||
|
|
||||||
// Return the strategy to use for a local symbol which is a section
|
// Return the strategy to use for a local symbol which is a section
|
||||||
// symbol, given the relocation type.
|
// symbol, given the relocation type.
|
||||||
inline Relocatable_relocs::Reloc_strategy
|
inline Relocatable_relocs::Reloc_strategy
|
||||||
local_section_strategy(unsigned int r_type, Relobj* object)
|
local_section_strategy(unsigned int r_type, Relobj* object)
|
||||||
{
|
{
|
||||||
|
// We assume that relocation type 0 is NONE. Targets which are
|
||||||
|
// different must override.
|
||||||
|
if (r_type == 0)
|
||||||
|
return Relocatable_relocs::RELOC_DISCARD;
|
||||||
if (sh_type == elfcpp::SHT_RELA)
|
if (sh_type == elfcpp::SHT_RELA)
|
||||||
return Relocatable_relocs::RELOC_ADJUST_FOR_SECTION_RELA;
|
return Relocatable_relocs::RELOC_ADJUST_FOR_SECTION_RELA;
|
||||||
else
|
else
|
||||||
|
@ -342,8 +352,14 @@ class Default_scan_relocatable_relocs
|
||||||
// Return the strategy to use for a global symbol, given the
|
// Return the strategy to use for a global symbol, given the
|
||||||
// relocation type, the object, and the symbol index.
|
// relocation type, the object, and the symbol index.
|
||||||
inline Relocatable_relocs::Reloc_strategy
|
inline Relocatable_relocs::Reloc_strategy
|
||||||
global_strategy(unsigned int, Relobj*, unsigned int)
|
global_strategy(unsigned int r_type, Relobj*, unsigned int)
|
||||||
{ return Relocatable_relocs::RELOC_COPY; }
|
{
|
||||||
|
// 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
|
// Scan relocs during a relocatable link. This is a default
|
||||||
|
|
Loading…
Reference in New Issue