* i386.cc (Output_data_plt_i386::address_for_global,

address_for_local): Add plt offset to returned value.  Adjust uses.
	* sparc.cc (Output_data_plt_sparc::address_for_global,
	address_for_local): Likewise.
	* tilegx.cc (Output_data_plt_tilegx::address_for_global,
	address_for_local): Likewise.
	* x86_64.cc (Output_data_plt_x86_64::address_for_global,
	address_for_local): Likewise.
	* target.h (Target::plt_address_for_global, plt_address_for_local):
	Update comment.
	* output.cc (Output_reloc::symbol_value): Don't add plt offset here.
	(Output_data_got::Got_entry::write): Nor here.
	* output.h: Comment fix.
This commit is contained in:
Alan Modra
2012-10-05 00:45:54 +00:00
parent fda1189bbc
commit 19fec8c1d3
8 changed files with 63 additions and 61 deletions

View File

@@ -256,16 +256,12 @@ class Target
reloc_addend(void* arg, unsigned int type, uint64_t addend) const
{ return this->do_reloc_addend(arg, type, addend); }
// Return the PLT address to use for a global symbol. This is used
// for STT_GNU_IFUNC symbols. The symbol's plt_offset is relative
// to this PLT address.
// Return the PLT address to use for a global symbol.
uint64_t
plt_address_for_global(const Symbol* sym) const
{ return this->do_plt_address_for_global(sym); }
// Return the PLT address to use for a local symbol. This is used
// for STT_GNU_IFUNC symbols. The symbol's plt_offset is relative
// to this PLT address.
// Return the PLT address to use for a local symbol.
uint64_t
plt_address_for_local(const Relobj* object, unsigned int symndx) const
{ return this->do_plt_address_for_local(object, symndx); }