aboutsummaryrefslogtreecommitdiff
path: root/gold/testsuite/Makefile.am
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2009-08-12 18:30:39 +0000
committerCary Coutant <ccoutant@google.com>2009-08-12 18:30:39 +0000
commit645afe0c5b028b013231f5890f66376e4dfc811d (patch)
treee07a17f8369fa623c2b137dc6ffcde513d9097e1 /gold/testsuite/Makefile.am
parentc1742541e6541c035b26f17b463f48ac71575653 (diff)
downloadgdb-645afe0c5b028b013231f5890f66376e4dfc811d.zip
gdb-645afe0c5b028b013231f5890f66376e4dfc811d.tar.gz
gdb-645afe0c5b028b013231f5890f66376e4dfc811d.tar.bz2
PR 10471
* resolve.cc (Symbol_table::resolve): Check for references from dynamic objects to hidden and internal symbols. * testsuite/Makefile.am (hidden_test.sh): New test. * testsuite/Makefile.in: Regenerate. * testsuite/hidden_test.sh: New script. * testsuite/hidden_test_1.c: New test source. * testsuite/hidden_test_main.c: New test source.
Diffstat (limited to 'gold/testsuite/Makefile.am')
-rw-r--r--gold/testsuite/Makefile.am12
1 files changed, 12 insertions, 0 deletions
diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am
index 6693f00..6e3169d 100644
--- a/gold/testsuite/Makefile.am
+++ b/gold/testsuite/Makefile.am
@@ -1118,5 +1118,17 @@ large_DEPENDENCIES = gcctestdir/ld
large_LDFLAGS = -Bgcctestdir/
endif MCMODEL_MEDIUM
+# Test that hidden and internal symbols in the main program cannot be
+# referenced by a shared library.
+check_SCRIPTS += hidden_test.sh
+check_DATA += hidden_test.err
+MOSTLYCLEANFILES += hidden_test hidden_test.err
+libhidden.so: hidden_test_1.c gcctestdir/ld
+ $(COMPILE) -Bgcctestdir/ -g -shared -fPIC -w -o $@ $(srcdir)/hidden_test_1.c
+hidden_test: hidden_test_main.o libhidden.so gcctestdir/ld
+ $(LINK) -Bgcctestdir/ -Wl,-R,. hidden_test_main.o libhidden.so 2>hidden_test.err
+hidden_test.err: hidden_test
+ @touch hidden_test.err
+
endif GCC
endif NATIVE_LINKER