aboutsummaryrefslogtreecommitdiff
path: root/gold/arm.cc
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2012-10-18 04:18:18 +0000
committerAlan Modra <amodra@gmail.com>2012-10-18 04:18:18 +0000
commit168a472611f2e89e2acebf2b44569a00a34e966d (patch)
tree474ac04b3f001f552592bd8b081522bb17e06938 /gold/arm.cc
parent522307fe68d5bfe54b1211dde54873be239e8925 (diff)
downloadgdb-168a472611f2e89e2acebf2b44569a00a34e966d.zip
gdb-168a472611f2e89e2acebf2b44569a00a34e966d.tar.gz
gdb-168a472611f2e89e2acebf2b44569a00a34e966d.tar.bz2
* target-reloc.h (class Default_comdat_behavior): New, package up..
(get_comdat_behaviour): ..this. (relocate_section): Add Relocate_comdat_behavior template arg, adjust code to suit. * arm.cc (Target_arm::relocate_section): Adjust to suit. (Target_arm::scan_reloc_section): Likewise. * i386.cc (Target_i386::relocate_section): Likewise. * sparc.cc (Target_sparc::relocate_section): Likewise. * tilegx.cc (Target_tilegx::relocate_section): Likewise. * x86_64.cc (Target_x86_64::relocate_section): Likewise. * powerpc.cc (class Relocate_comdat_behavior): New. (Target_powerpc::relocate_section): Don't zap opd relocs. Supply gold::relocate_section with new template arg.
Diffstat (limited to 'gold/arm.cc')
-rw-r--r--gold/arm.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/gold/arm.cc b/gold/arm.cc
index d874ce0..d847126 100644
--- a/gold/arm.cc
+++ b/gold/arm.cc
@@ -9518,7 +9518,7 @@ Target_arm<big_endian>::relocate_section(
}
gold::relocate_section<32, big_endian, Target_arm, elfcpp::SHT_REL,
- Arm_relocate>(
+ Arm_relocate, gold::Default_comdat_behavior>(
relinfo,
this,
prelocs,
@@ -11150,6 +11150,7 @@ Target_arm<big_endian>::scan_reloc_section_for_stubs(
Arm_relobj<big_endian>::as_arm_relobj(relinfo->object);
unsigned int local_count = arm_object->local_symbol_count();
+ gold::Default_comdat_behavior default_comdat_behavior;
Comdat_behavior comdat_behavior = CB_UNDETERMINED;
for (size_t i = 0; i < reloc_count; ++i, prelocs += reloc_size)
@@ -11323,7 +11324,7 @@ Target_arm<big_endian>::scan_reloc_section_for_stubs(
if (comdat_behavior == CB_UNDETERMINED)
{
std::string name = arm_object->section_name(relinfo->data_shndx);
- comdat_behavior = get_comdat_behavior(name.c_str());
+ comdat_behavior = default_comdat_behavior.get(name.c_str());
}
if (comdat_behavior == CB_PRETEND)
{