aboutsummaryrefslogtreecommitdiff
path: root/gold/symtab.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2008-01-15 23:41:28 +0000
committerIan Lance Taylor <iant@google.com>2008-01-15 23:41:28 +0000
commit091244672e9cb571cb7272d491826f85de871ced (patch)
tree40be47b8e61a974e262595c7aa516f597970f285 /gold/symtab.h
parent58da7b1b61de1ecfbcae3bf0050e8bb65d3ff547 (diff)
downloadgdb-091244672e9cb571cb7272d491826f85de871ced.zip
gdb-091244672e9cb571cb7272d491826f85de871ced.tar.gz
gdb-091244672e9cb571cb7272d491826f85de871ced.tar.bz2
From Andrew Chatham and Craig Silverstein: Add support for version
scripts.
Diffstat (limited to 'gold/symtab.h')
-rw-r--r--gold/symtab.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/gold/symtab.h b/gold/symtab.h
index 59cda2e..43a228d 100644
--- a/gold/symtab.h
+++ b/gold/symtab.h
@@ -46,6 +46,7 @@ class Dynobj;
template<int size, bool big_endian>
class Sized_dynobj;
class Versions;
+class Version_script_info;
class Input_objects;
class Output_data;
class Output_section;
@@ -111,6 +112,21 @@ class Symbol
version() const
{ return this->version_; }
+ // Return whether this version is the default for this symbol name
+ // (eg, "foo@@V2" is a default version; "foo@V1" is not). Only
+ // meaningful for versioned symbols.
+ bool
+ is_default() const
+ {
+ gold_assert(this->version_ != NULL);
+ return this->is_def_;
+ }
+
+ // Set whether this version is the default for this symbol name.
+ void
+ set_is_default(bool def)
+ { this->is_def_ = def; }
+
// Return the symbol source.
Source
source() const
@@ -953,7 +969,7 @@ class Symbol_table
// COUNT is an estimate of how many symbosl will be inserted in the
// symbol table. It's ok to put 0 if you don't know; a correct
// guess will just save some CPU by reducing hashtable resizes.
- Symbol_table(unsigned int count);
+ Symbol_table(unsigned int count, const Version_script_info& version_script);
~Symbol_table();
@@ -1115,6 +1131,11 @@ class Symbol_table
void
print_stats() const;
+ // Return the version script information.
+ const Version_script_info&
+ version_script() const
+ { return version_script_; }
+
private:
Symbol_table(const Symbol_table&);
Symbol_table& operator=(const Symbol_table&);
@@ -1347,6 +1368,8 @@ class Symbol_table
// definition. This maps symbols with COPY relocs to the dynamic
// object where they were defined.
Copied_symbol_dynobjs copied_symbol_dynobjs_;
+ // Information parsed from the version script, if any.
+ const Version_script_info& version_script_;
};
// We inline get_sized_symbol for efficiency.