aboutsummaryrefslogtreecommitdiff
path: root/gold/output.h
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/output.h
parentaf6359d59d84cdd70fd1f400b91bc2fdcbed7dfa (diff)
downloadgdb-e727fa71af6a46ff76ace26a73f8e17bb26559ec.zip
gdb-e727fa71af6a46ff76ace26a73f8e17bb26559ec.tar.gz
gdb-e727fa71af6a46ff76ace26a73f8e17bb26559ec.tar.bz2
Add support for local GOT offsets.
Diffstat (limited to 'gold/output.h')
-rw-r--r--gold/output.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/gold/output.h b/gold/output.h
index 7f783d6..997a821 100644
--- a/gold/output.h
+++ b/gold/output.h
@@ -909,15 +909,11 @@ class Output_data_got : public Output_section_data
bool
add_global(Symbol* gsym);
- // Add an entry for a local symbol to the GOT. This returns the
- // offset of the new entry from the start of the GOT.
- unsigned int
- add_local(Object* object, unsigned int sym_index)
- {
- this->entries_.push_back(Got_entry(object, sym_index));
- this->set_got_size();
- return this->last_got_offset();
- }
+ // Add an entry for a local symbol to the GOT. This returns true if
+ // this is a new GOT entry, false if the symbol already has a GOT
+ // entry.
+ bool
+ add_local(Sized_relobj<size, big_endian>* object, unsigned int sym_index);
// Add a constant to the GOT. This returns the offset of the new
// entry from the start of the GOT.
@@ -949,7 +945,8 @@ class Output_data_got : public Output_section_data
{ this->u_.gsym = gsym; }
// Create a local symbol entry.
- Got_entry(Object* object, unsigned int local_sym_index)
+ Got_entry(Sized_relobj<size, big_endian>* object,
+ unsigned int local_sym_index)
: local_sym_index_(local_sym_index)
{
gold_assert(local_sym_index != GSYM_CODE
@@ -977,7 +974,7 @@ class Output_data_got : public Output_section_data
union
{
// For a local symbol, the object.
- Object* object;
+ Sized_relobj<size, big_endian>* object;
// For a global symbol, the symbol.
Symbol* gsym;
// For a constant, the constant.