diff options
author | Ian Lance Taylor <iant@google.com> | 2007-10-08 07:22:21 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2007-10-08 07:22:21 +0000 |
commit | e727fa71af6a46ff76ace26a73f8e17bb26559ec (patch) | |
tree | 9a6ff8e24154289d84963f376e3255a8e57a14f2 /gold/object.cc | |
parent | af6359d59d84cdd70fd1f400b91bc2fdcbed7dfa (diff) | |
download | gdb-e727fa71af6a46ff76ace26a73f8e17bb26559ec.zip gdb-e727fa71af6a46ff76ace26a73f8e17bb26559ec.tar.gz gdb-e727fa71af6a46ff76ace26a73f8e17bb26559ec.tar.bz2 |
Add support for local GOT offsets.
Diffstat (limited to 'gold/object.cc')
-rw-r--r-- | gold/object.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/gold/object.cc b/gold/object.cc index 9986383..cfdb17c 100644 --- a/gold/object.cc +++ b/gold/object.cc @@ -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 |