aboutsummaryrefslogtreecommitdiff
path: root/ld/testplug2.c
AgeCommit message (Collapse)AuthorFilesLines
2021-03-31Use bool in ldAlan Modra1-13/+13
* sysdep.h (POISON_BFD_BOOLEAN): Define. * configure.ac (elf_list_options, elf_shlib_list_options=false), (elf_plt_unwind_list_options=false): Replace FALSE with false, and TRUE with true. * emulparams/call_nop.sh, * emulparams/cet.sh, * emulparams/dynamic_undefined_weak.sh, * emulparams/elf32b4300.sh, * emulparams/elf32lm32.sh, * emulparams/elf32lr5900.sh, * emulparams/elf32lr5900n32.sh, * emulparams/elf32visium.sh, * emulparams/elf_x86_64.sh, * emulparams/extern_protected_data.sh, * emulparams/plt_unwind.sh, * emulparams/reloc_overflow.sh, * emulparams/static.sh, * emulparams/x86-64-lam.sh, * emultempl/aarch64elf.em, * emultempl/aix.em, * emultempl/alphaelf.em, * emultempl/armcoff.em, * emultempl/armelf.em, * emultempl/avrelf.em, * emultempl/beos.em, * emultempl/bfin.em, * emultempl/cr16elf.em, * emultempl/crxelf.em, * emultempl/cskyelf.em, * emultempl/elf.em, * emultempl/genelf.em, * emultempl/hppaelf.em, * emultempl/linux.em, * emultempl/m68hc1xelf.em, * emultempl/metagelf.em, * emultempl/mipself.em, * emultempl/mmix-elfnmmo.em, * emultempl/mmixelf.em, * emultempl/mmo.em, * emultempl/msp430.em, * emultempl/nios2elf.em, * emultempl/pdp11.em, * emultempl/pe.em, * emultempl/pep.em, * emultempl/ppc32elf.em, * emultempl/ppc64elf.em, * emultempl/rxelf.em, * emultempl/rxlinux.em, * emultempl/scoreelf.em, * emultempl/solaris2.em, * emultempl/spuelf.em, * emultempl/ticoff.em, * emultempl/v850elf.em, * emultempl/vms.em, * emultempl/xtensaelf.em, * emultempl/z80.em, * ld.h, * ldbuildid.c, * ldbuildid.h, * ldcref.c, * ldctor.c, * ldctor.h, * ldelf.c, * ldelf.h, * ldelfgen.c, * ldelfgen.h, * ldemul.c, * ldemul.h, * ldexp.c, * ldexp.h, * ldfile.c, * ldfile.h, * ldgram.y, * ldlang.c, * ldlang.h, * ldmain.c, * ldmain.h, * ldmisc.c, * ldmisc.h, * ldwrite.c, * lexsup.c, * mri.c, * pe-dll.c, * pe-dll.h, * pep-dll.h, * plugin.c, * plugin.h, * testplug.c, * testplug2.c, * testplug3.c, * testplug4.c: Replace bfd_boolean with bool, FALSE with false, and TRUE with true. * configure: Regenerate.
2021-01-01Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2020-06-21Do without ld ENABLE_PLUGINSAlan Modra1-0/+2
Instead, use BFD_SUPPORTS_PLUGINS. * ldfile.c: Replace uses of ENABLE_PLUGINS with BFD_SUPPORTS_PLUGINS. * ldlang.c: Likewise. * ldlang.h: Likewise. * ldlex.h: Likewise. * ldmain.c: Likewise. * lexsup.c: Likewise. * plugin.c: Wrap body of file in #if BFD_SUPPORTS_PLUGINS. * testplug.c: Likewise. * testplug2.c: Likewise. * testplug3.c: Likewise. * testplug4.c: Likewise. * configure.ac (ENABLE_PLUGINS): Don't define AM_CONTITIONAL. * Makefile.am: Remove ENABLE_PLUGINS conditionals. (PLUGIN_CFLAGS): Don't define. (PLUGIN_C, PLUGIN_H, PLUGIN_OBJECT): Likewise. Substitute all uses with plugin file name. * configure: Regenerate. * Makefile.in: Regenerate.
2020-03-20Silence warnings due to plugin API changeAlan Modra1-1/+4
* testplug.c (parse_symdefstr): Use %hhi to read sym->def, and clear new fields. * testplug2.c (parse_symdefstr): Likewise. * testplug3.c (parse_symdefstr): Likewise. * testplug4.c (parse_symdefstr): Likewise.
2020-01-01Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2019-01-01Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2018-01-03Update year range in copyright notice of binutils filesAlan Modra1-1/+1
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.