aboutsummaryrefslogtreecommitdiff
path: root/ld/testplug2.c
AgeCommit message (Collapse)AuthorFilesLines
2017-01-02Update year range in copyright notice of all files.Alan Modra1-1/+1
2016-05-14Remove redundant sizeof on EXPECTED_VIEW_LENGTHH.J. Lu1-1/+1
PR ld/20097 * testplug2.c (onall_symbols_read): Remove redundant sizeof on EXPECTED_VIEW_LENGTH. * testplug4.c (onall_symbols_read): Likewise.
2016-01-01Copyright update for binutilsAlan Modra1-1/+1
2015-02-14Add a testcase for PR ld/17973H.J. Lu1-1/+8
ld/ PR ld/17973 * testplug2.c (allsymbolsread_silent): New. (set_register_hook): Handle allsymbolsreadsilent. (onall_symbols_read): Skip a message if allsymbolsread_silent is TRUE. ld/testsuite/ PR ld/17973 * ld-plugin/plugin.exp (regassilent): New. Compile tmpdir/dummy.s and ld-plugin/pr17973.s. (plugin_tests): Add a test for PR ld/17973. * ld-plugin/pr17973.d: New file. * ld-plugin/pr17973.s: Likewise.
2015-02-11Output "warning:" or "error:" in plugin messagesH.J. Lu1-1/+16
When plugin generates LDPL_WARNING, LDPL_FATAL and LDPL_ERROR messages, linker should display "warning:" or "error:" in plugin messages like regular linker messages. ld/ * plugin.c (message): Output "warning:" for LDPL_WARNING. Output "error:" for LDPL_FATAL and LDPL_ERROR. * testplug2.c (parse_option): Handle fatal, error and warning. ld/testsuite/ * ld-plugin/plugin-27.d: New. * ld-plugin/plugin-28.d: Likewise. * ld-plugin/plugin-29.d: Likewise. * plugin.exp (plugin_tests): Add tests for LDPL_FATAL, LDPL_ERROR and LDPL_WARNING.
2015-02-11Remove unused dump_tv_tagH.J. Lu1-49/+2
* testplug2.c (dump_tv_tag): Removed. (onall_symbols_read): Return LDPS_ERR if the file descriptor isn't closed. * testplug3.c (dump_tv_tag): Removed. (onclaim_file): Fix typo.
2015-02-11Add tests for non-object IR fileH.J. Lu1-0/+693
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.