From 5c3885291ffdae7d69304eafb03507a5ba384a5c Mon Sep 17 00:00:00 2001 From: Doug Kwan Date: Wed, 26 May 2010 03:33:59 +0000 Subject: 2010-05-26 Doug Kwan * 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. --- gold/target-reloc.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'gold/target-reloc.h') 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::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* target = + parameters->sized_target(); + 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); -- cgit v1.1