From 0ac83a32aac4a3f57ee20536b16eb957a009fdc9 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. * 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.36.1