diff options
author | Ian Lance Taylor <ian@airs.com> | 2008-05-16 15:27:49 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2008-05-16 15:27:49 +0000 |
commit | a984ee1d25de86d678270ec5a8b7491a3ab68a57 (patch) | |
tree | e00b99c221ba969ec795dbf7435efeff3afdf8b1 /gold/x86_64.cc | |
parent | 907fc2026807534a7c2772aac13ab8ab0b42aa92 (diff) | |
download | gdb-a984ee1d25de86d678270ec5a8b7491a3ab68a57.zip gdb-a984ee1d25de86d678270ec5a8b7491a3ab68a57.tar.gz gdb-a984ee1d25de86d678270ec5a8b7491a3ab68a57.tar.bz2 |
* output.cc (Output_reloc::get_address): Change return type to
Elf_Addr.
* output.h (class Output_reloc): Update get_address declaration.
* x86_64.cc (Output_data_plt_x86_64::do_write): Use 64-bit types
for section addresses.
Diffstat (limited to 'gold/x86_64.cc')
-rw-r--r-- | gold/x86_64.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/gold/x86_64.cc b/gold/x86_64.cc index 6459e50..d787700 100644 --- a/gold/x86_64.cc +++ b/gold/x86_64.cc @@ -672,20 +672,22 @@ Output_data_plt_x86_64::do_write(Output_file* of) unsigned char* pov = oview; // The base address of the .plt section. - elfcpp::Elf_types<32>::Elf_Addr plt_address = this->address(); + elfcpp::Elf_types<64>::Elf_Addr plt_address = this->address(); // The base address of the .got section. - elfcpp::Elf_types<32>::Elf_Addr got_base = this->got_->address(); + elfcpp::Elf_types<64>::Elf_Addr got_base = this->got_->address(); // The base address of the PLT portion of the .got section, // which is where the GOT pointer will point, and where the // three reserved GOT entries are located. - elfcpp::Elf_types<32>::Elf_Addr got_address = this->got_plt_->address(); + elfcpp::Elf_types<64>::Elf_Addr got_address = this->got_plt_->address(); memcpy(pov, first_plt_entry, plt_entry_size); // We do a jmp relative to the PC at the end of this instruction. - elfcpp::Swap_unaligned<32, false>::writeval(pov + 2, got_address + 8 - - (plt_address + 6)); - elfcpp::Swap<32, false>::writeval(pov + 8, got_address + 16 - - (plt_address + 12)); + elfcpp::Swap_unaligned<32, false>::writeval(pov + 2, + (got_address + 8 + - (plt_address + 6))); + elfcpp::Swap<32, false>::writeval(pov + 8, + (got_address + 16 + - (plt_address + 12))); pov += plt_entry_size; unsigned char* got_pov = got_view; |