From 7404fe1b8d20b30162a7e56307d5a2d400cb5645 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 5 Sep 2012 00:34:20 +0000 Subject: * object.h (Sized_relobj_file::emit_relocs): Delete. (Sized_relobj_file::emit_relocs_reltype): Delete. * reloc.cc (Sized_relobj_file::do_relocate_sections): Call target relocate_relocs for --emit-relocs. (Sized_relobj_file::emit_relocs, emit_relocs_reltype): Delete. * output.h: Update comment. (Output_segment::first_section): New function. (Output_segment::first_section_load_address): Use first_section. * output.cc (Output_segment::first_section): New function extracted.. (Output_segment::first_section_load_address): ..from here. Delete. * target-reloc.h (relocate_for_relocatable): Rename to relocate_relocs. * target.h (Sized_target::relocate_for_relocatable): Likewise. * arm.cc (Target_arm::relocate_for_relocatable): Likewise, and adjust call to target.h function. * i386.cc (Target_i386): Likewise. * sparc.cc (Target_sparc): Likewise. * x86_64.cc (Target_x86_64): Likewise. * powerpc.cc (Target_powerpc): Likewise. (Target_powerpc::Scan::local, global): Handle R_POWERPC_TLS. Ensure first tls section has section symbol for optimised local dynamic output relocs. (Target_powerpc::Relocate::relocate): Correct local dynamic value. (Target_powerpc::relocate_relocs): Adjust relocs emitted for optimised tls code. * testsuite/testfile.cc (Target_test::relocate_for_relocatable): Rename to relocate_relocs. Update error message. --- gold/target.h | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) (limited to 'gold/target.h') diff --git a/gold/target.h b/gold/target.h index 19092e1..25ac96b 100644 --- a/gold/target.h +++ b/gold/target.h @@ -801,23 +801,22 @@ class Sized_target : public Target const unsigned char* plocal_symbols, Relocatable_relocs*) = 0; - // Relocate a section during a relocatable link. The parameters are - // like relocate_section, with additional parameters for the view of - // the output reloc section. + // Emit relocations for a section during a relocatable link, and for + // --emit-relocs. The parameters are like relocate_section, with + // additional parameters for the view of the output reloc section. virtual void - relocate_for_relocatable(const Relocate_info*, - unsigned int sh_type, - const unsigned char* prelocs, - size_t reloc_count, - Output_section* output_section, - off_t offset_in_output_section, - const Relocatable_relocs*, - unsigned char* view, - typename elfcpp::Elf_types::Elf_Addr - view_address, - section_size_type view_size, - unsigned char* reloc_view, - section_size_type reloc_view_size) = 0; + relocate_relocs(const Relocate_info*, + unsigned int sh_type, + const unsigned char* prelocs, + size_t reloc_count, + Output_section* output_section, + off_t offset_in_output_section, + const Relocatable_relocs*, + unsigned char* view, + typename elfcpp::Elf_types::Elf_Addr view_address, + 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. -- cgit v1.1