aboutsummaryrefslogtreecommitdiff
path: root/gold/testsuite/Makefile.am
diff options
context:
space:
mode:
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