aboutsummaryrefslogtreecommitdiff
path: root/gold/target-reloc.h
diff options
context:
space:
mode:
authorDoug Kwan <dougkwan@google.com>2010-05-26 03:33:59 +0000
committerDoug Kwan <dougkwan@google.com>2010-05-26 03:33:59 +0000
commit5c3885291ffdae7d69304eafb03507a5ba384a5c (patch)
treeff0d8daf3f50a07691f1cd41f1398dc0346173ef /gold/target-reloc.h
parentbca1c3ae452b3f573f01a9e5b060c3cdd1fbe076 (diff)
downloadgdb-5c3885291ffdae7d69304eafb03507a5ba384a5c.zip
gdb-5c3885291ffdae7d69304eafb03507a5ba384a5c.tar.gz
gdb-5c3885291ffdae7d69304eafb03507a5ba384a5c.tar.bz2
2010-05-26 Doug Kwan <dougkwan@google.com>
* arm.cc (Arm_scan_relocatable_relocs): New class. (Target_arm::relocate_special_relocatable): New method. (Arm_relocate_functions::arm_branch_common): Handle relocatable link. (Arm_relocate_functions::thumb_branch_common): Same. (Target_arm::scan_relocatable_relocs): Use Arm_scan_relocatable_relocs instead of Default_scan_relocatable_relocs. * target-reloc.h (relocate_for_relocatable): Let target handle relocation strategy Relocatable_relocs::RELOC_SPECIAL. * target.h (Sized_target::relocate_special_relocatable): New method.
Diffstat (limited to 'gold/target-reloc.h')
-rw-r--r--gold/target-reloc.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/gold/target-reloc.h b/gold/target-reloc.h
index 04854d2..34c13e8 100644
--- a/gold/target-reloc.h
+++ b/gold/target-reloc.h
@@ -515,7 +515,7 @@ relocate_for_relocatable(
const Relocatable_relocs* rr,
unsigned char* view,
typename elfcpp::Elf_types<size>::Elf_Addr view_address,
- section_size_type,
+ section_size_type view_size,
unsigned char* reloc_view,
section_size_type reloc_view_size)
{
@@ -537,6 +537,19 @@ relocate_for_relocatable(
if (strategy == Relocatable_relocs::RELOC_DISCARD)
continue;
+ if (strategy == Relocatable_relocs::RELOC_SPECIAL)
+ {
+ // Target wants to handle this relocation.
+ Sized_target<size, big_endian>* target =
+ parameters->sized_target<size, big_endian>();
+ target->relocate_special_relocatable(relinfo, sh_type, prelocs,
+ i, output_section,
+ offset_in_output_section,
+ view, view_address,
+ view_size, pwrite);
+ pwrite += reloc_size;
+ continue;
+ }
Reltype reloc(prelocs);
Reltype_write reloc_write(pwrite);