ld: Use run_cc_link_tests for PR ld/26391 tests
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 16 Jan 2023 22:03:02 +0000 (14:03 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 28 Apr 2023 15:38:17 +0000 (08:38 -0700)
Use run_cc_link_tests for PR ld/26391 tests to compile PR ld/26391 tests
in C.

PR ld/30002
* testsuite/ld-elf/elf.exp: Use run_cc_link_tests for PR ld/26391
tests.

ld/testsuite/ld-elf/elf.exp

index a4f7f60fefc0684d869c0b30dfda411caed7cf58..cf0e949a966bd747a81e14b105442628784879b5 100644 (file)
@@ -524,31 +524,24 @@ run_cc_link_tests [list \
        {{nm "" pr26391.nd}} \
        "pr26391-4" \
     ] \
-]
-
-run_ld_link_tests [list \
     [list \
        "Build pr26391-5.o" \
-       "-z unique-symbol -r" \
-       "" \
-       "" \
+       "-Wl,-z,unique-symbol -r -nostdlib -nostartfiles" \
+       "-fno-function-sections" \
        {pr26391a.c pr26391b.c pr26391c.c pr26391d.c} \
        [list \
            [list "nm" "$dep_plug_opt" "pr26391.nd"] \
            [list "nm" "$dep_plug_opt" "pr26391.fd"] \
        ] \
        "pr26391-5.o" \
-       "-fno-function-sections" \
     ] \
     [list \
        "Build pr26391-6.o" \
-       "-z unique-symbol -r" \
-       "" \
-       "" \
+       "-Wl,-z,unique-symbol -r -nostdlib -nostartfiles" \
+       "-ffunction-sections" \
        {pr26391a.c pr26391b.c pr26391c.c pr26391d.c} \
        {{nm "" pr26391.nd}} \
        "pr26391-6.o" \
-       "-ffunction-sections" \
     ] \
 ]