diff options
author | Ian Lance Taylor <ian@airs.com> | 2008-04-07 22:46:17 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2008-04-07 22:46:17 +0000 |
commit | 624f881062a90cbd4675e7b826225c232c39050e (patch) | |
tree | e9a126aef21b68223532b4da5d2ccc6cf51717bf /gold/output.h | |
parent | 6835af537eec580a0f4f2064d0e11e378c86b39e (diff) | |
download | fsf-binutils-gdb-624f881062a90cbd4675e7b826225c232c39050e.zip fsf-binutils-gdb-624f881062a90cbd4675e7b826225c232c39050e.tar.gz fsf-binutils-gdb-624f881062a90cbd4675e7b826225c232c39050e.tar.bz2 |
* output.cc (Output_reloc<SHT_REL>::local_section_offset): Add
addend parameter. Change caller. Handle merge sections.
(Output_reloc<SHT_REL>::symbol_value): Change parameter type from
Address to Addend. Don't add in the result of
local_section_offset, pass down the addend and use the returned
value.
* output.h (class Output_reloc<SHT_REL>): Add Addend typedef.
Update declarations of local_section_offset and symbol_value.
* testsuite/two_file_test_1.cc (t18): New function.
* testsuite/two_file_test_2.cc (f18): New function.
* testsuite/two_file_test_main.cc (main): Call t18.
* testsuite/two_file_test.h (t18, f18): Declare.
Diffstat (limited to 'gold/output.h')
-rw-r--r-- | gold/output.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gold/output.h b/gold/output.h index 5a95748..e697775 100644 --- a/gold/output.h +++ b/gold/output.h @@ -779,6 +779,7 @@ class Output_reloc<elfcpp::SHT_REL, dynamic, size, big_endian> { public: typedef typename elfcpp::Elf_types<size>::Elf_Addr Address; + typedef typename elfcpp::Elf_types<size>::Elf_Addr Addend; // An uninitialized entry. We need this because we want to put // instances of this class into an STL container. @@ -835,14 +836,15 @@ class Output_reloc<elfcpp::SHT_REL, dynamic, size, big_endian> } // For a local section symbol, return the offset of the input - // section within the output section. + // section within the output section. ADDEND is the addend being + // applied to the input section. section_offset_type - local_section_offset() const; + local_section_offset(Addend addend) const; // Get the value of the symbol referred to by a Rel relocation when // we are adding the given ADDEND. Address - symbol_value(Address addend) const; + symbol_value(Addend addend) const; // Write the reloc entry to an output view. void |