diff options
author | Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com> | 2015-12-03 15:29:17 -0800 |
---|---|---|
committer | Cary Coutant <ccoutant@gmail.com> | 2015-12-03 15:29:17 -0800 |
commit | 7ef8ae7c5f352bb1ef166af0fe6a09a3d3b39f67 (patch) | |
tree | 26bf34449c9d504a4b6dfcf872eafa655ef80a92 /gold/object.cc | |
parent | e58c48b4c81f25ec08174f324990d021aad0e96e (diff) | |
download | fsf-binutils-gdb-7ef8ae7c5f352bb1ef166af0fe6a09a3d3b39f67.zip fsf-binutils-gdb-7ef8ae7c5f352bb1ef166af0fe6a09a3d3b39f67.tar.gz fsf-binutils-gdb-7ef8ae7c5f352bb1ef166af0fe6a09a3d3b39f67.tar.bz2 |
Take addend into account when making GOT entries for local symbols.
gold/
* object.cc (Sized_relobj::do_for_all_local_got_entries): Use
Local_got_entry_key for searching in local_got_offsets_.
* object.h (class Local_got_entry_key): New class.
(Relobj::local_has_got_offset): New overloaded method.
(Relobj::local_got_offset): Likewise.
(Relobj::set_local_got_offset): Likewise.
(Relobj::do_local_has_got_offset): Add addend argument.
(Relobj::do_local_got_offset): Likewise.
(Relobj::do_set_local_got_offset): Likewise.
(Sized_relobj::do_local_has_got_offset): Add addend argument, and use
Local_got_entry_key for searching through local_got_offsets_.
(Sized_relobj::do_local_got_offset): Likewise.
(Sized_relobj::do_set_local_got_offset): Likewise.
(Sized_relobj::Local_got_offsets): Change type of the key from
unsigned int to Local_got_entry_key, and add hash and equal_to.
* output.cc (Got_entry::write): Take addend into account for
calculating value of the local symbol for GOT.
(Output_data_got::add_local): New definition of overloaded method.
(Output_data_got::add_local_with_rel): Likewise.
(Output_data_got::add_local_pair_with_rel): Likewise.
* output.h (Output_data_got::add_local): New declaration of overloaded
method.
Diffstat (limited to 'gold/object.cc')
-rw-r--r-- | gold/object.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gold/object.cc b/gold/object.cc index 5381add..54b76bd 100644 --- a/gold/object.cc +++ b/gold/object.cc @@ -427,7 +427,8 @@ Sized_relobj<size, big_endian>::do_for_all_local_got_entries( unsigned int nsyms = this->local_symbol_count(); for (unsigned int i = 0; i < nsyms; i++) { - Local_got_offsets::const_iterator p = this->local_got_offsets_.find(i); + Local_got_entry_key key(i, 0); + Local_got_offsets::const_iterator p = this->local_got_offsets_.find(key); if (p != this->local_got_offsets_.end()) { const Got_offset_list* got_offsets = p->second; |