forked from Imagelibrary/binutils-gdb
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user