Add support for local GOT offsets.

This commit is contained in:
Ian Lance Taylor
2007-10-08 07:22:21 +00:00
parent af6359d59d
commit e727fa71af
4 changed files with 94 additions and 30 deletions

View File

@ -147,7 +147,8 @@ Sized_relobj<size, big_endian>::Sized_relobj(
output_local_symbol_count_(0),
symbols_(NULL),
local_symbol_offset_(0),
local_values_()
local_values_(),
local_got_offsets_()
{
}
@ -662,6 +663,17 @@ Sized_relobj<size, big_endian>::do_finalize_local_symbols(unsigned int index,
return index;
}
// Return the value of the local symbol symndx.
template<int size, bool big_endian>
typename elfcpp::Elf_types<size>::Elf_Addr
Sized_relobj<size, big_endian>::local_symbol_value(unsigned int symndx) const
{
gold_assert(symndx < this->local_symbol_count_);
gold_assert(symndx < this->local_values_.size());
const Symbol_value<size>& lv(this->local_values_[symndx]);
return lv.value(this, 0);
}
// Return the value of a local symbol defined in input section SHNDX,
// with value VALUE, adding addend ADDEND. IS_SECTION_SYMBOL
// indicates whether the symbol is a section symbol. This handles