diff options
author | Ian Lance Taylor <ian@airs.com> | 2008-07-18 07:03:27 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2008-07-18 07:03:27 +0000 |
commit | a18f591e924ea296bbf8f7fbdff40cbb07e98b21 (patch) | |
tree | dfe2cb1fa941e891d819cb07d57859093fde7159 /gold/testsuite/ver_test_main.cc | |
parent | c6e3f6ed8e0a050b7b49c1a82102eae736f595fd (diff) | |
download | gdb-a18f591e924ea296bbf8f7fbdff40cbb07e98b21.zip gdb-a18f591e924ea296bbf8f7fbdff40cbb07e98b21.tar.gz gdb-a18f591e924ea296bbf8f7fbdff40cbb07e98b21.tar.bz2 |
* symtab.cc (Symbol_table::add_from_object): Rewrite the case
where we see NAME/NULL and NAME/VERSION as separate symbols.
* testsuite/ver_test_main.cc (main): Call t4.
(t4, t4_2a): Define.
* testsuite/ver_test_2.cc (t4_2): Define.
* testsuite/ver_test_2.script: Put t4_2a in VER2.
* testsuite/ver_test_4.cc (t4_2a): Define.
* testsuite/ver_test_4.script: Put t4_2a in VER2.
* testsuite/ver_test.h (t4, t4_2, t4_2a): Declare.
Diffstat (limited to 'gold/testsuite/ver_test_main.cc')
-rw-r--r-- | gold/testsuite/ver_test_main.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gold/testsuite/ver_test_main.cc b/gold/testsuite/ver_test_main.cc index 10649f2..f8a7b75 100644 --- a/gold/testsuite/ver_test_main.cc +++ b/gold/testsuite/ver_test_main.cc @@ -30,6 +30,7 @@ main() assert(t1()); assert(t2()); assert(t3()); + assert(t4()); return 0; } @@ -52,3 +53,22 @@ t3() TRACE return t3_2() == 12; } + +// Call a function in a shared library that calls a function which is +// defined in the main program and defined with a default version in +// the shared library. The symbol in the main program should override +// even though it doesn't have a version. + +bool +t4() +{ + TRACE + return t4_2() == 42; +} + +int +t4_2a() +{ + TRACE + return 42; +} |