diff options
author | Alan Modra <amodra@gmail.com> | 2012-09-05 00:34:20 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2012-09-05 00:34:20 +0000 |
commit | 7404fe1b8d20b30162a7e56307d5a2d400cb5645 (patch) | |
tree | 71cfb8fde4ad34ab2eb812996ad807feec50828b /gold/output.h | |
parent | f54ae065b8f805b626729a8f60bacf8312a182db (diff) | |
download | gdb-7404fe1b8d20b30162a7e56307d5a2d400cb5645.zip gdb-7404fe1b8d20b30162a7e56307d5a2d400cb5645.tar.gz gdb-7404fe1b8d20b30162a7e56307d5a2d400cb5645.tar.bz2 |
* 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.
Diffstat (limited to 'gold/output.h')
-rw-r--r-- | gold/output.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gold/output.h b/gold/output.h index 98c07fc..14c5aac 100644 --- a/gold/output.h +++ b/gold/output.h @@ -2123,7 +2123,7 @@ class Output_data_reloc<elfcpp::SHT_RELA, dynamic, size, big_endian> // Output_relocatable_relocs represents a relocation section in a // relocatable link. The actual data is written out in the target -// hook relocate_for_relocatable. This just saves space for it. +// hook relocate_relocs. This just saves space for it. template<int sh_type, int size, bool big_endian> class Output_relocatable_relocs : public Output_section_data @@ -4406,9 +4406,17 @@ class Output_segment bool has_dynamic_reloc() const; + // Return the first section. + Output_section* + first_section() const; + // Return the address of the first section. uint64_t - first_section_load_address() const; + first_section_load_address() const + { + const Output_section* os = this->first_section(); + return os->has_load_address() ? os->load_address() : os->address(); + } // Return whether the addresses have been set already. bool |