diff options
author | Ian Lance Taylor <ian@airs.com> | 2008-03-29 08:39:26 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2008-03-29 08:39:26 +0000 |
commit | 686c8caf41c336e1cf0619e1b92f1ee10f7a2c21 (patch) | |
tree | ff52e736505a18b8e244eaf9dad13004430cd92e /gold/symtab.cc | |
parent | ab794b6bda9482bd406d05d592849639887036d5 (diff) | |
download | fsf-binutils-gdb-686c8caf41c336e1cf0619e1b92f1ee10f7a2c21.zip fsf-binutils-gdb-686c8caf41c336e1cf0619e1b92f1ee10f7a2c21.tar.gz fsf-binutils-gdb-686c8caf41c336e1cf0619e1b92f1ee10f7a2c21.tar.bz2 |
* symtab.cc (Symbol_table::do_define_as_constant): Don't force a
version symbol to be local.
* testsuite/ver_test_4.sh: New file.
* testsuite/Makefile.am (check_SCRIPTS): Add ver_test_4.sh.
(check_DATA): Add ver_test_4.syms.
(ver_test_4.syms): New target.
* testsuite/Makefile.in: Rebuild.
Diffstat (limited to 'gold/symtab.cc')
-rw-r--r-- | gold/symtab.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gold/symtab.cc b/gold/symtab.cc index 08e5f92..a216b3b 100644 --- a/gold/symtab.cc +++ b/gold/symtab.cc @@ -1406,8 +1406,13 @@ Symbol_table::do_define_as_constant( if (oldsym == NULL) { - if (binding == elfcpp::STB_LOCAL - || this->version_script_.symbol_is_local(name)) + // Version symbols are absolute symbols with name == version. + // We don't want to force them to be local. + if ((version == NULL + || name != version + || value != 0) + && (binding == elfcpp::STB_LOCAL + || this->version_script_.symbol_is_local(name))) this->force_local(sym); return sym; } |