summaryrefslogtreecommitdiff
path: root/gold/symtab.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-09-23 05:31:48 +0000
committerIan Lance Taylor <iant@google.com>2007-09-23 05:31:48 +0000
commitab5c9e90a6d088f6b09bdc8f6bee09c911789df6 (patch)
tree315b4833fd2030948138845c5f58b05f252dc918 /gold/symtab.h
parentcb615bc189241f02996054391ade06ba06147147 (diff)
downloadbinutils-gdb-ab5c9e90a6d088f6b09bdc8f6bee09c911789df6.tar.gz
Use special value when we refer a function symbol in some way other
than calling it.
Diffstat (limited to 'gold/symtab.h')
-rw-r--r--gold/symtab.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/gold/symtab.h b/gold/symtab.h
index 642063882aa..36414bc1f23 100644
--- a/gold/symtab.h
+++ b/gold/symtab.h
@@ -323,6 +323,21 @@ class Symbol
this->plt_offset_ = plt_offset;
}
+ // Return whether this dynamic symbol needs a special value in the
+ // dynamic symbol table.
+ bool
+ needs_dynsym_value() const
+ { return this->needs_dynsym_value_; }
+
+ // Set that this dynamic symbol needs a special value in the dynamic
+ // symbol table.
+ void
+ set_needs_dynsym_value()
+ {
+ gold_assert(this->object()->is_dynamic());
+ this->needs_dynsym_value_ = true;
+ }
+
// Return true if the final value of this symbol is known at link
// time.
bool
@@ -528,6 +543,9 @@ class Symbol
bool has_got_offset_ : 1;
// True if the symbol has an entry in the PLT section.
bool has_plt_offset_ : 1;
+ // True if this is a dynamic symbol which needs a special value in
+ // the dynamic symbol table.
+ bool needs_dynsym_value_ : 1;
// True if there is a warning for this symbol.
bool has_warning_ : 1;
};
@@ -1003,7 +1021,9 @@ class Symbol_table
// Write out a symbol to P.
template<int size, bool big_endian>
void
- sized_write_symbol(Sized_symbol<size>*, unsigned int shndx,
+ sized_write_symbol(Sized_symbol<size>*,
+ typename elfcpp::Elf_types<size>::Elf_Addr value,
+ unsigned int shndx,
const Stringpool*, unsigned char* p
ACCEPT_SIZE_ENDIAN) const;