]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
elf: Wire up PR ld/21086 test
authorH.J. Lu <hjl.tools@gmail.com>
Sat, 15 Nov 2025 23:08:27 +0000 (07:08 +0800)
committerH.J. Lu <hjl.tools@gmail.com>
Sat, 15 Nov 2025 23:14:09 +0000 (07:14 +0800)
commit 3c5fce9bc29b216af7d10f8d6e4d8c3f11a48359
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Apr 21 12:00:55 2017 -0700

    Require --no-dynamic-linker with -static -E/--dynamic-list

added pr21086.c and pr21086.list without wiring them up.  Wire them up to
verify that there is no dynamic section with -static -E/--dynamic-list.

PR ld/21086
PR ld/33630
* testsuite/ld-elf/pr21086.rd: New file.
* testsuite/ld-elf/shared.exp: Wire PR ld/21086 test.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
ld/testsuite/ld-elf/pr21086.rd [new file with mode: 0644]
ld/testsuite/ld-elf/shared.exp

diff --git a/ld/testsuite/ld-elf/pr21086.rd b/ld/testsuite/ld-elf/pr21086.rd
new file mode 100644 (file)
index 0000000..62a4b01
--- /dev/null
@@ -0,0 +1 @@
+There is no dynamic section in this file.
index 80a67929cfb4e8150b760e4fae79c53df8893b44..2888ca0b10eb9f9427cd32687a7a415935e99ad9 100644 (file)
@@ -935,6 +935,14 @@ run_cc_link_tests [list \
        {} \
        "pr31482d-no-lto.a" \
     ] \
+    [list \
+       "Build pr21086" \
+       "-static -Wl,--dynamic-list=pr21086.list" \
+       "" \
+       {pr21086.c} \
+       {{readelf -d pr21086.rd}} \
+       "pr21086" \
+    ] \
 ]
 
 # pr19073.s uses .set, which has a different meaning on alpha.