aboutsummaryrefslogtreecommitdiff
path: root/gold/testsuite
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2008-07-23 14:36:09 +0000
committerIan Lance Taylor <ian@airs.com>2008-07-23 14:36:09 +0000
commit95d14cd31e8c12b180adeba4aa840250004ca534 (patch)
tree364a2d3a68ee0857ecdf382a3fb9ffbf1053a9bd /gold/testsuite
parent14ef7606b7caabbde8afd1e7a8b54eeb8c26e555 (diff)
downloadgdb-95d14cd31e8c12b180adeba4aa840250004ca534.zip
gdb-95d14cd31e8c12b180adeba4aa840250004ca534.tar.gz
gdb-95d14cd31e8c12b180adeba4aa840250004ca534.tar.bz2
* symtab.cc (Symbol_table::resolve): Remove version parameter.
Change all callers. * symtab.h (class Symbol_table): Update declaration. * testsuite/ver_test_9.cc: New file. * testsuite/Makefile.am (check_PROGRAMS): Add ver_test_9. (ver_test_9_SOURCES, ver_test_9_DEPENDENCIES): Define. (ver_test_9_LDFLAGS, ver_test_9_LDADD): Define. (ver_test_9.so, ver_test_9.o): New targets. * testsuite/Makefile.in: Rebuild.
Diffstat (limited to 'gold/testsuite')
-rw-r--r--gold/testsuite/Makefile.am10
-rw-r--r--gold/testsuite/Makefile.in26
-rw-r--r--gold/testsuite/ver_test_9.cc50
3 files changed, 81 insertions, 5 deletions
diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am
index 590e435..8e4ae0d 100644
--- a/gold/testsuite/Makefile.am
+++ b/gold/testsuite/Makefile.am
@@ -774,6 +774,16 @@ ver_test_8_1.so: two_file_test_1_pic.o two_file_test_1b_pic.o ver_test_8_2.so gc
ver_test_8_2.so: two_file_test_2_pic.o $(srcdir)/ver_test_8.script gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ -shared -Wl,--version-script,$(srcdir)/ver_test_8.script two_file_test_2_pic.o
+check_PROGRAMS += ver_test_9
+ver_test_9_SOURCES = ver_test_main.cc
+ver_test_9_DEPENDENCIES = gcctestdir/ld ver_test_9.so
+ver_test_9_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
+ver_test_9_LDADD = ver_test_9.so
+ver_test_9.so: ver_test_9.o ver_test_4.so ver_test_5.so gcctestdir/ld
+ $(CXXLINK) -Bgcctestdir/ -shared ver_test_9.o ver_test_5.so ver_test_4.so
+ver_test_9.o: ver_test_9.cc
+ $(CXXCOMPILE) -c -fpic -o $@ $<
+
check_PROGRAMS += protected_1
protected_1_SOURCES = \
protected_main_1.cc protected_main_2.cc protected_main_3.cc
diff --git a/gold/testsuite/Makefile.in b/gold/testsuite/Makefile.in
index 52aed26..beec5be 100644
--- a/gold/testsuite/Makefile.in
+++ b/gold/testsuite/Makefile.in
@@ -226,7 +226,7 @@ check_PROGRAMS = object_unittest$(EXEEXT) binary_unittest$(EXEEXT) \
# Test symbol versioning.
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_19 = ver_test ver_test_2 \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_6 ver_test_8 \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_6 ver_test_8 ver_test_9 \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ protected_1 protected_2 \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_test script_test_1 \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_2 justsyms \
@@ -345,6 +345,7 @@ libgoldtest_a_OBJECTS = $(am_libgoldtest_a_OBJECTS)
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_2$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_6$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_8$(EXEEXT) \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_9$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ protected_1$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ protected_2$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_test$(EXEEXT) \
@@ -726,6 +727,10 @@ am__ver_test_8_SOURCES_DIST = two_file_test_main.cc
@GCC_TRUE@@NATIVE_LINKER_TRUE@am_ver_test_8_OBJECTS = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_main.$(OBJEXT)
ver_test_8_OBJECTS = $(am_ver_test_8_OBJECTS)
+am__ver_test_9_SOURCES_DIST = ver_test_main.cc
+@GCC_TRUE@@NATIVE_LINKER_TRUE@am_ver_test_9_OBJECTS = \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_main.$(OBJEXT)
+ver_test_9_OBJECTS = $(am_ver_test_9_OBJECTS)
am__weak_alias_test_SOURCES_DIST = weak_alias_test_main.cc
@GCC_TRUE@@NATIVE_LINKER_TRUE@am_weak_alias_test_OBJECTS = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ weak_alias_test_main.$(OBJEXT)
@@ -797,9 +802,9 @@ SOURCES = $(libgoldtest_a_SOURCES) basic_pic_test.c \
$(two_file_static_test_SOURCES) two_file_strip_test.c \
$(two_file_test_SOURCES) $(ver_test_SOURCES) \
$(ver_test_2_SOURCES) $(ver_test_6_SOURCES) \
- $(ver_test_8_SOURCES) $(weak_alias_test_SOURCES) \
- $(weak_test_SOURCES) $(weak_undef_nonpic_test_SOURCES) \
- $(weak_undef_test_SOURCES)
+ $(ver_test_8_SOURCES) $(ver_test_9_SOURCES) \
+ $(weak_alias_test_SOURCES) $(weak_test_SOURCES) \
+ $(weak_undef_nonpic_test_SOURCES) $(weak_undef_test_SOURCES)
DIST_SOURCES = $(libgoldtest_a_SOURCES) basic_pic_test.c \
basic_static_pic_test.c basic_static_test.c basic_test.c \
$(am__binary_test_SOURCES_DIST) $(binary_unittest_SOURCES) \
@@ -852,7 +857,7 @@ DIST_SOURCES = $(libgoldtest_a_SOURCES) basic_pic_test.c \
$(am__two_file_static_test_SOURCES_DIST) two_file_strip_test.c \
$(am__two_file_test_SOURCES_DIST) $(am__ver_test_SOURCES_DIST) \
$(am__ver_test_2_SOURCES_DIST) $(am__ver_test_6_SOURCES_DIST) \
- $(am__ver_test_8_SOURCES_DIST) \
+ $(am__ver_test_8_SOURCES_DIST) $(am__ver_test_9_SOURCES_DIST) \
$(am__weak_alias_test_SOURCES_DIST) \
$(am__weak_test_SOURCES_DIST) \
$(am__weak_undef_nonpic_test_SOURCES_DIST) \
@@ -1310,6 +1315,10 @@ binary_unittest_SOURCES = binary_unittest.cc
@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_8_DEPENDENCIES = gcctestdir/ld ver_test_8_1.so ver_test_8_2.so
@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_8_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_8_LDADD = ver_test_8_1.so ver_test_8_2.so
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_9_SOURCES = ver_test_main.cc
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_9_DEPENDENCIES = gcctestdir/ld ver_test_9.so
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_9_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_9_LDADD = ver_test_9.so
@GCC_TRUE@@NATIVE_LINKER_TRUE@protected_1_SOURCES = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ protected_main_1.cc protected_main_2.cc protected_main_3.cc
@@ -1611,6 +1620,9 @@ ver_test_6$(EXEEXT): $(ver_test_6_OBJECTS) $(ver_test_6_DEPENDENCIES)
ver_test_8$(EXEEXT): $(ver_test_8_OBJECTS) $(ver_test_8_DEPENDENCIES)
@rm -f ver_test_8$(EXEEXT)
$(CXXLINK) $(ver_test_8_LDFLAGS) $(ver_test_8_OBJECTS) $(ver_test_8_LDADD) $(LIBS)
+ver_test_9$(EXEEXT): $(ver_test_9_OBJECTS) $(ver_test_9_DEPENDENCIES)
+ @rm -f ver_test_9$(EXEEXT)
+ $(CXXLINK) $(ver_test_9_LDFLAGS) $(ver_test_9_OBJECTS) $(ver_test_9_LDADD) $(LIBS)
weak_alias_test$(EXEEXT): $(weak_alias_test_OBJECTS) $(weak_alias_test_DEPENDENCIES)
@rm -f weak_alias_test$(EXEEXT)
$(CXXLINK) $(weak_alias_test_LDFLAGS) $(weak_alias_test_OBJECTS) $(weak_alias_test_LDADD) $(LIBS)
@@ -2218,6 +2230,10 @@ uninstall-am: uninstall-info-am
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -shared two_file_test_1_pic.o two_file_test_1b_pic.o ver_test_8_2.so
@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_8_2.so: two_file_test_2_pic.o $(srcdir)/ver_test_8.script gcctestdir/ld
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -shared -Wl,--version-script,$(srcdir)/ver_test_8.script two_file_test_2_pic.o
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_9.so: ver_test_9.o ver_test_4.so ver_test_5.so gcctestdir/ld
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -shared ver_test_9.o ver_test_5.so ver_test_4.so
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_9.o: ver_test_9.cc
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -c -fpic -o $@ $<
@GCC_TRUE@@NATIVE_LINKER_TRUE@protected_1.so: gcctestdir/ld protected_1_pic.o protected_2_pic.o protected_3_pic.o
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -shared protected_1_pic.o protected_2_pic.o protected_3_pic.o
diff --git a/gold/testsuite/ver_test_9.cc b/gold/testsuite/ver_test_9.cc
new file mode 100644
index 0000000..5d06d4e
--- /dev/null
+++ b/gold/testsuite/ver_test_9.cc
@@ -0,0 +1,50 @@
+// ver_test_9.cc -- a test case for gold
+
+// Copyright 2008 Free Software Foundation, Inc.
+// Written by Ian Lance Taylor <iant@google.com>.
+
+// This file is part of gold.
+
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+// MA 02110-1301, USA.
+
+#include "ver_test.h"
+
+bool
+t1()
+{
+ return true;
+}
+
+int
+t2_2()
+{
+ TRACE
+ return 22;
+}
+
+int
+t3_2()
+{
+ TRACE
+ return 12;
+}
+
+int
+t4_2()
+{
+ TRACE
+ return 42;
+}