ld: Pass -nostdlib to compiler with -r
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 19 Jul 2022 01:49:27 +0000 (18:49 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 19 Jul 2022 01:54:20 +0000 (18:54 -0700)
Pass -nostdlib to compiler with -r to avoid unnecessary .o file and
libraries.

PR ld/29377
* testsuite/ld-elf/linux-x86.exp: Pass -nostdlib with -r.

ld/testsuite/ld-elf/linux-x86.exp

index 0f0a6f01ec083388fa0ff35c4674b86fe54c8ad0..06379057ff2498794ed69c07cc4bd25862d084d8 100644 (file)
@@ -136,7 +136,7 @@ run_cc_link_tests [list \
     ] \
     [list \
        "Build pr29377.o" \
-       "-r -Wl,-z,noexecstack" \
+       "-r -nostdlib -Wl,-z,noexecstack" \
        "" \
        {pr29377a.c indirect-extern-access.S} \
        {} \