aboutsummaryrefslogtreecommitdiff
path: root/gold/symtab.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2008-05-08 18:44:33 +0000
committerIan Lance Taylor <ian@airs.com>2008-05-08 18:44:33 +0000
commit75517b77b595b05bd37bf337c1fb23557efbf4bc (patch)
treeb78003103d3e1f937d66719f1a8e2e1c18659af7 /gold/symtab.h
parente7fc76dd0f612f4a10f36e14b3d576396bc3833f (diff)
downloadgdb-75517b77b595b05bd37bf337c1fb23557efbf4bc.zip
gdb-75517b77b595b05bd37bf337c1fb23557efbf4bc.tar.gz
gdb-75517b77b595b05bd37bf337c1fb23557efbf4bc.tar.bz2
* symtab.c (Symbol::init_base_output_data): Add version
parameter. Change all callers. (Symbol::init_base_output_segment): Likewise. (Symbol::init_base_constant): Likewise. (Symbol::init_base_undefined): Likewise. (Sized_symbol::init_output_data): Likewise. (Sized_symbol::init_output_segment): Likewise. (Sized_symbol::init_constant): Likewise. (Sized_symbol::init_undefined): Likewise. (Symbol_table::do_define_in_output_data): If the new symbol has a version, mark it as the default. (Symbol_table::do_define_in_output_segment): Likewise. (Symbol_table::do_define_as_constant): Likewise. * symtab.h (class Symbol): Update declarations. (class Sized_symbol): Likewise. * resolve.cc (Symbol::override_version): New function. (Symbol::override_base: Call override_version. (Symbol::override_base_with_special): Likewise. * testsuite/ver_script_8.script: New file. * testsuite/Makefile.am (check_PROGRAMS): Add ver_test_8. (ver_test_8_SOURCES, ver_test_8_DEPENDENCIES): Define. (ver_test_8_LDFLAGS, ver_test_8_LDADD): Define. (ver_test_8_1.so, ver_test_8_2.so): New targets.
Diffstat (limited to 'gold/symtab.h')
-rw-r--r--gold/symtab.h50
1 files changed, 30 insertions, 20 deletions
diff --git a/gold/symtab.h b/gold/symtab.h
index b58909b..d4ca787 100644
--- a/gold/symtab.h
+++ b/gold/symtab.h
@@ -668,26 +668,29 @@ class Symbol
// Initialize fields for an Output_data.
void
- init_base_output_data(const char* name, Output_data*, elfcpp::STT,
- elfcpp::STB, elfcpp::STV, unsigned char nonvis,
- bool offset_is_from_end);
+ init_base_output_data(const char* name, const char* version, Output_data*,
+ elfcpp::STT, elfcpp::STB, elfcpp::STV,
+ unsigned char nonvis, bool offset_is_from_end);
// Initialize fields for an Output_segment.
void
- init_base_output_segment(const char* name, Output_segment* os,
- elfcpp::STT type, elfcpp::STB binding,
- elfcpp::STV visibility, unsigned char nonvis,
+ init_base_output_segment(const char* name, const char* version,
+ Output_segment* os, elfcpp::STT type,
+ elfcpp::STB binding, elfcpp::STV visibility,
+ unsigned char nonvis,
Segment_offset_base offset_base);
// Initialize fields for a constant.
void
- init_base_constant(const char* name, elfcpp::STT type, elfcpp::STB binding,
- elfcpp::STV visibility, unsigned char nonvis);
+ init_base_constant(const char* name, const char* version, elfcpp::STT type,
+ elfcpp::STB binding, elfcpp::STV visibility,
+ unsigned char nonvis);
// Initialize fields for an undefined symbol.
void
- init_base_undefined(const char* name, elfcpp::STT type, elfcpp::STB binding,
- elfcpp::STV visibility, unsigned char nonvis);
+ init_base_undefined(const char* name, const char* version, elfcpp::STT type,
+ elfcpp::STB binding, elfcpp::STV visibility,
+ unsigned char nonvis);
// Override existing symbol.
template<int size, bool big_endian>
@@ -699,6 +702,10 @@ class Symbol
void
override_base_with_special(const Symbol* from);
+ // Override symbol version.
+ void
+ override_version(const char* version);
+
// Allocate a common symbol by giving it a location in the output
// file.
void
@@ -849,25 +856,28 @@ class Sized_symbol : public Symbol
// Initialize fields for an Output_data.
void
- init_output_data(const char* name, Output_data*, Value_type value,
- Size_type symsize, elfcpp::STT, elfcpp::STB, elfcpp::STV,
- unsigned char nonvis, bool offset_is_from_end);
+ init_output_data(const char* name, const char* version, Output_data*,
+ Value_type value, Size_type symsize, elfcpp::STT,
+ elfcpp::STB, elfcpp::STV, unsigned char nonvis,
+ bool offset_is_from_end);
// Initialize fields for an Output_segment.
void
- init_output_segment(const char* name, Output_segment*, Value_type value,
- Size_type symsize, elfcpp::STT, elfcpp::STB, elfcpp::STV,
- unsigned char nonvis, Segment_offset_base offset_base);
+ init_output_segment(const char* name, const char* version, Output_segment*,
+ Value_type value, Size_type symsize, elfcpp::STT,
+ elfcpp::STB, elfcpp::STV, unsigned char nonvis,
+ Segment_offset_base offset_base);
// Initialize fields for a constant.
void
- init_constant(const char* name, Value_type value, Size_type symsize,
- elfcpp::STT, elfcpp::STB, elfcpp::STV, unsigned char nonvis);
+ init_constant(const char* name, const char* version, Value_type value,
+ Size_type symsize, elfcpp::STT, elfcpp::STB, elfcpp::STV,
+ unsigned char nonvis);
// Initialize fields for an undefined symbol.
void
- init_undefined(const char* name, elfcpp::STT, elfcpp::STB, elfcpp::STV,
- unsigned char nonvis);
+ init_undefined(const char* name, const char* version, elfcpp::STT,
+ elfcpp::STB, elfcpp::STV, unsigned char nonvis);
// Override existing symbol.
template<bool big_endian>