From bcac599f73874fd63a3901f0a9f7d24e50c2ad24 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 16 Dec 2020 13:40:42 -0800 Subject: ld: Skip libdep plugin if not all plugin hooks are available Skip plugin if not all required plugin hooks are available. 2020-12-16 Howard Chu H.J. Lu PR ld/27081 * libdep_plugin.c (onload): Skip if not all required plugin hooks are available. * testsuite/config/default.exp (dep_plug_opt): New. * testsuite/ld-elf/elf.exp: Pass $dep_plug_opt to nm. * testsuite/ld-elf/pr26391.fd: New file. --- ld/testsuite/ld-elf/elf.exp | 5 ++++- ld/testsuite/ld-elf/pr26391.fd | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 ld/testsuite/ld-elf/pr26391.fd (limited to 'ld/testsuite/ld-elf') diff --git a/ld/testsuite/ld-elf/elf.exp b/ld/testsuite/ld-elf/elf.exp index e08a6f5..a58b17b 100644 --- a/ld/testsuite/ld-elf/elf.exp +++ b/ld/testsuite/ld-elf/elf.exp @@ -415,7 +415,10 @@ run_ld_link_tests [list \ "" \ "" \ {pr26391a.c pr26391b.c pr26391c.c pr26391d.c} \ - {{nm "" pr26391.nd}} \ + [list \ + [list "nm" "$dep_plug_opt" "pr26391.nd"] \ + [list "nm" "$dep_plug_opt" "pr26391.fd"] \ + ] \ "pr26391-5.o" \ "-fno-function-sections" \ ] \ diff --git a/ld/testsuite/ld-elf/pr26391.fd b/ld/testsuite/ld-elf/pr26391.fd new file mode 100644 index 0000000..1921cd6 --- /dev/null +++ b/ld/testsuite/ld-elf/pr26391.fd @@ -0,0 +1,4 @@ +#failif +#... +bfd plugin: No register_all_symbols_read hook +#... -- cgit v1.1