aboutsummaryrefslogtreecommitdiff
path: root/gold/testsuite/Makefile.am
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2017-09-20 15:43:37 -0700
committerSriraman Tallam <tmsriram@google.com>2017-09-20 15:45:04 -0700
commitca464aac1b0a444f7debb8fc1e5e8b3f30602a35 (patch)
tree65a29f37988cc32f48c563741031c8bd3e40b5e0 /gold/testsuite/Makefile.am
parent223ffa714ce1cf1dc6e0c361189fa80417ff90d9 (diff)
downloadbinutils-ca464aac1b0a444f7debb8fc1e5e8b3f30602a35.zip
binutils-ca464aac1b0a444f7debb8fc1e5e8b3f30602a35.tar.gz
binutils-ca464aac1b0a444f7debb8fc1e5e8b3f30602a35.tar.bz2
Check for export dynamic symbol options when doing symbol resolution in plugins.
2017-09-20 Teresa Johnson <tejohnson@google.com> * plugin.cc (is_visible_from_outside): Check for export dynamic symbol option and list. * testsuite/Makefile.am (plugin_test_12): New test. * testsuite/Makefile.in: Regenerate. * testsuite/export_dynamic_plugin.cc: New test source. * testsuite/plugin_test_12.sh: New test script.
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 b9d9c8c..cae47f1 100644
--- a/gold/testsuite/Makefile.am
+++ b/gold/testsuite/Makefile.am
@@ -2295,6 +2295,18 @@ plugin_test_thin.a: two_file_test_1.o two_file_test_1b.o two_file_test_2.o
rm -f $@
$(TEST_AR) crT $@ $^
+check_PROGRAMS += plugin_test_12
+check_SCRIPTS += plugin_test_12.sh
+check_DATA += plugin_test_12.err
+MOSTLYCLEANFILES += plugin_test_12.err
+export_dynamic_plugin.o.syms: export_dynamic_plugin.o
+ $(TEST_READELF) -sW $< >$@ 2>/dev/null
+export_dynamic_plugin.o: export_dynamic_plugin.cc
+ $(COMPILE) -c -o $@ $<
+plugin_test_12: export_dynamic_plugin.o gcctestdir/ld plugin_test.so export_dynamic_plugin.o.syms
+ $(CXXLINK) -Bgcctestdir/ -Wl,--no-demangle,--plugin,"./plugin_test.so",--plugin-opt,"_Z3foov" -Wl,--export-dynamic-symbol,"_Z3foov" export_dynamic_plugin.o.syms 2>plugin_test_12.err
+plugin_test_12.err: plugin_test_12
+ @touch plugin_test_12.err
check_PROGRAMS += plugin_test_start_lib
check_SCRIPTS += plugin_test_start_lib.sh