This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH v2 1/4] gold: Take addend into account for calculating value of the local symbol for GOT.
- From: Cary Coutant <ccoutant at gmail dot com>
- To: Vladimir Radosavljevic <Vladimir dot Radosavljevic at imgtec dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>, Petar Jovanovic <Petar dot Jovanovic at imgtec dot com>
- Date: Thu, 3 Dec 2015 15:35:55 -0800
- Subject: Re: [PATCH v2 1/4] gold: Take addend into account for calculating value of the local symbol for GOT.
- Authentication-results: sourceware.org; auth=none
- References: <3060420525346945A0ADBD567348A91723737243 at BADAG02 dot ba dot imgtec dot org>
> Changelog -
>
> * 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.
> (Output_data_got::add_local_with_rel): Likewise.
> (Output_data_got::add_local_pair_with_rel): Likewise.
> (class Got_entry): Add new constructor.
> (Got_entry::addend_): New member.
+ uint64_t lval = object->local_symbol_value(lsi, addend_);
Should be this->addend_.
I've fixed that and committed it on your behalf.
Thanks!
-cary