From 0b65c07b97c43e8891c2e14061270878a85222c8 Mon Sep 17 00:00:00 2001 From: Sriraman Tallam Date: Thu, 22 Feb 2018 13:56:46 -0800 Subject: New plugin interface to get list of symbols wrapped with --wrap option. 2018-02-22 Sriraman Tallam * plugin.cc (get_wrap_symbols): New plugin interface. (load): Add get_wrap_symbols to transfer vector. * plugin-api.h (ld_plugin_get_wrap_symbols): New plugin interface. * testsuite/plugin_test.c (onload): Call and check get_wrap_symbols interface. * testsuite/plugin_test_wrap_symbols.sh: New test script. * testsuite/plugin_test_wrap_symbols_1.cc: New file. * testsuite/plugin_test_wrap_symbols_2.cc: New file. * testsuite/Makefile.am (plugin_test_wrap_symbols): New test. * testsuite/Makefile.in: Regenerate. --- gold/testsuite/Makefile.am | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'gold/testsuite/Makefile.am') diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am index 7ec3e8d..bb486ed 100644 --- a/gold/testsuite/Makefile.am +++ b/gold/testsuite/Makefile.am @@ -2322,6 +2322,19 @@ plugin_test_12: export_dynamic_plugin.o gcctestdir/ld plugin_test.so export_dyna plugin_test_12.err: plugin_test_12 @touch plugin_test_12.err +check_PROGRAMS += plugin_test_wrap_symbols +check_SCRIPTS += plugin_test_wrap_symbols.sh +check_DATA += plugin_test_wrap_symbols.err +MOSTLYCLEANFILES += plugin_test_wrap_symbols.err +plugin_test_wrap_symbols_1.o: plugin_test_wrap_symbols_1.cc + $(COMPILE) -c -o $@ $< +plugin_test_wrap_symbols_2.o: plugin_test_wrap_symbols_2.cc + $(COMPILE) -c -o $@ $< +plugin_test_wrap_symbols: plugin_test_wrap_symbols_1.o plugin_test_wrap_symbols_2.o gcctestdir/ld plugin_test.so + $(CXXLINK) -Bgcctestdir/ -Wl,--plugin,"./plugin_test.so" -Wl,--wrap=hello,--wrap=jello plugin_test_wrap_symbols_1.o plugin_test_wrap_symbols_2.o 2>plugin_test_wrap_symbols.err +plugin_test_wrap_symbols.err: plugin_test_wrap_symbols + @touch plugin_test_wrap_symbols.err + check_PROGRAMS += plugin_test_start_lib check_SCRIPTS += plugin_test_start_lib.sh check_DATA += plugin_test_start_lib.err -- cgit v1.1