aboutsummaryrefslogtreecommitdiff
path: root/gold/object.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-10-08 07:22:21 +0000
committerIan Lance Taylor <iant@google.com>2007-10-08 07:22:21 +0000
commite727fa71af6a46ff76ace26a73f8e17bb26559ec (patch)
tree9a6ff8e24154289d84963f376e3255a8e57a14f2 /gold/object.cc
parentaf6359d59d84cdd70fd1f400b91bc2fdcbed7dfa (diff)
downloadgdb-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.cc14
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