aboutsummaryrefslogtreecommitdiff
path: root/gold/target.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.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.h')
-rw-r--r--gold/target.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/gold/target.h b/gold/target.h
index f2fdcc9..a0ec0b3 100644
--- a/gold/target.h
+++ b/gold/target.h
@@ -687,7 +687,37 @@ class Sized_target : public Target
section_size_type view_size,
unsigned char* reloc_view,
section_size_type reloc_view_size) = 0;
+
+ // Perform target-specific processing in a relocatable link. This is
+ // only used if we use the relocation strategy RELOC_SPECIAL.
+ // RELINFO points to a Relocation_info structure. SH_TYPE is the relocation
+ // section type. PRELOC_IN points to the original relocation. RELNUM is
+ // the index number of the relocation in the relocation section.
+ // OUTPUT_SECTION is the output section to which the relocation is applied.
+ // OFFSET_IN_OUTPUT_SECTION is the offset of the relocation input section
+ // within the output section. VIEW points to the output view of the
+ // output section. VIEW_ADDRESS is output address of the view. VIEW_SIZE
+ // is the size of the output view and PRELOC_OUT points to the new
+ // relocation in the output object.
+ //
+ // A target only needs to override this if the generic code in
+ // target-reloc.h cannot handle some relocation types.
+ virtual void
+ relocate_special_relocatable(const Relocate_info<size, big_endian>*
+ /*relinfo */,
+ unsigned int /* sh_type */,
+ const unsigned char* /* preloc_in */,
+ size_t /* relnum */,
+ Output_section* /* output_section */,
+ off_t /* offset_in_output_section */,
+ unsigned char* /* view */,
+ typename elfcpp::Elf_types<size>::Elf_Addr
+ /* view_address */,
+ section_size_type /* view_size */,
+ unsigned char* /* preloc_out*/)
+ { gold_unreachable(); }
+
protected:
Sized_target(const Target::Target_info* pti)
: Target(pti)