From 76e4fa70e79ee959c0e11eaacd4cf863291b1ddb Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 18 Jul 2022 18:49:27 -0700 Subject: [PATCH] ld: Pass -nostdlib to compiler with -r 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ld/testsuite/ld-elf/linux-x86.exp b/ld/testsuite/ld-elf/linux-x86.exp index 0f0a6f01ec0..06379057ff2 100644 --- a/ld/testsuite/ld-elf/linux-x86.exp +++ b/ld/testsuite/ld-elf/linux-x86.exp @@ -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} \ {} \ -- 2.30.2