summaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-plugin/plugin-18.d
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-02-09 03:30:03 -0800
committerH.J. Lu <hjl.tools@gmail.com>2015-02-09 05:04:11 -0800
commitff574ce49154d752a159fe53f11d688a5121294a (patch)
tree0bf1abc449fdf26ae852e052090797677bf14a3e /ld/testsuite/ld-plugin/plugin-18.d
parentd9039e33cfa3246ce5642ddfd8bc588be1875863 (diff)
downloadbinutils-gdb-ff574ce49154d752a159fe53f11d688a5121294a.tar.gz
Add tests for non-object IR fileusers/hjl/bfd_plugin_object
This patch adds linker, nm and ar tests for non-object IR file, including archive with non-object IR member. ld/ PR ld/17878 * Makefile.am (noinst_LTLIBRARIES): Add libldtestplug2.la and libldtestplug3.la. (libldtestplug2_la_SOURCES): New. (libldtestplug2_la_CFLAGS): Likewise. (libldtestplug2_la_LDFLAGS): Likewise. (libldtestplug3_la_SOURCES): New. (libldtestplug3_la_CFLAGS): Likewise. (libldtestplug3_la_LDFLAGS): Likewise. * Makefile.in: Regenerated. * testplug2.c: New file. * testplug3.c: Likewise. ld/testsuite/ PR ld/17878 * ld-plugin/func.c: Add some comments. * ld-plugin/plugin-13.d: New file. * ld-plugin/plugin-14.d: Likewise. * ld-plugin/plugin-15.d: Likewise. * ld-plugin/plugin-16.d: Likewise. * ld-plugin/plugin-17.d: Likewise. * ld-plugin/plugin-18.d: Likewise. * ld-plugin/plugin-19.d: Likewise. * ld-plugin/plugin-20.d: Likewise. * ld-plugin/plugin-21.d: Likewise. * ld-plugin/plugin-22.d: Likewise. * ld-plugin/plugin-23.d: Likewise. * ld-plugin/plugin-24.d: Likewise. * ld-plugin/plugin-25.d: Likewise. * ld-plugin/plugin-26.d: Likewise. * ld-plugin/plugin.exp (plugin2_name): New. (plugin3_name): Likewise. (plugin2_path): Likewise. (plugin3_path): Likewise. (testsrcfiles): Likewise. (testsrcfiles_notext): Likewise. (plugin_tests): Add tests for non-object IR file. (plugin_lib_tests): Likewise. (plugin_extra_elf_tests): Likewise. (plugin_src_tests): New tests for non-object IR file. Run nm --plugin test. Run ar --plugin test. Run plugin_src_tests.
Diffstat (limited to 'ld/testsuite/ld-plugin/plugin-18.d')
-rw-r--r--ld/testsuite/ld-plugin/plugin-18.d38
1 files changed, 38 insertions, 0 deletions
diff --git a/ld/testsuite/ld-plugin/plugin-18.d b/ld/testsuite/ld-plugin/plugin-18.d
new file mode 100644
index 00000000000..0200a05cfd6
--- /dev/null
+++ b/ld/testsuite/ld-plugin/plugin-18.d
@@ -0,0 +1,38 @@
+Hello from testplugin.
+.*: LDPT_MESSAGE func@0x.*
+.*: LDPT_API_VERSION value 0x1 \(1\)
+.*: LDPT_GNU_LD_VERSION value 0x.*
+.*: LDPT_LINKER_OUTPUT value 0x1 \(1\)
+.*: LDPT_OUTPUT_NAME 'tmpdir/main.x'
+.*: LDPT_REGISTER_CLAIM_FILE_HOOK func@0x.*
+.*: LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK func@0x.*
+.*: LDPT_REGISTER_CLEANUP_HOOK func@0x.*
+.*: LDPT_ADD_SYMBOLS func@0x.*
+.*: LDPT_GET_INPUT_FILE func@0x.*
+.*: LDPT_GET_VIEW func@0x.*
+.*: LDPT_RELEASE_INPUT_FILE func@0x.*
+.*: LDPT_GET_SYMBOLS func@0x.*
+.*: LDPT_GET_SYMBOLS_V2 func@0x.*
+.*: LDPT_ADD_INPUT_FILE func@0x.*
+.*: LDPT_ADD_INPUT_LIBRARY func@0x.*
+.*: LDPT_SET_EXTRA_LIBRARY_PATH func@0x.*
+.*: LDPT_OPTION 'registerclaimfile'
+.*: LDPT_OPTION 'registerallsymbolsread'
+.*: LDPT_OPTION 'registercleanup'
+.*: LDPT_OPTION 'claim:.*/ld/testsuite/ld-plugin/func.c'
+.*: LDPT_OPTION 'sym:_?func::0:0:0'
+.*: LDPT_OPTION 'sym:_?func2::0:0:0'
+.*: LDPT_OPTION 'dumpresolutions'
+.*: LDPT_OPTION 'add:tmpdir/func.o'
+.*: LDPT_NULL value 0x0 \(0\)
+#...
+hook called: claim_file tmpdir/main.o \[@0/.* not claimed
+hook called: claim_file .*/ld/testsuite/ld-plugin/func.c \[@0/.* CLAIMED
+#...
+hook called: claim_file tmpdir/libtext.a \[@.* not claimed
+#...
+hook called: all symbols read.
+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF
+Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
+hook called: cleanup.
+#...