From f93c6e0a2ed1ad4f0a9bb8f38e859f3312c25282 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 26 Apr 2022 09:26:36 -0700 Subject: [PATCH] i386: Pass -z noexecstack to linker tests PR ld/29072 * testsuite/ld-i386/i386.exp: Pass -z noexecstack to gotpc1 and property-6. --- ld/testsuite/ld-i386/i386.exp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp index 471a1f79547..b4f7de49fd5 100644 --- a/ld/testsuite/ld-i386/i386.exp +++ b/ld/testsuite/ld-i386/i386.exp @@ -813,7 +813,8 @@ if { [isnative] ] \ [list \ "Build gotpc1" \ - "$NOPIE_LDFLAGS -Wl,--as-needed tmpdir/gotpc1.o tmpdir/got1d.so" \ + "$NOPIE_LDFLAGS -Wl,--as-needed,-z,noexecstack \ + tmpdir/gotpc1.o tmpdir/got1d.so" \ "-Wa,-mx86-used-note=no" \ { dummy.s } \ {{objdump {-dw} got1.dd}} \ @@ -990,7 +991,8 @@ if { [isnative] ] \ [list \ "Build property-6" \ - "-Wl,--as-needed tmpdir/property-6.o tmpdir/property-6.so" \ + "-Wl,--as-needed,-z,noexecstack \ + tmpdir/property-6.o tmpdir/property-6.so" \ "-Wa,-mx86-used-note=no" \ { dummy.s } \ {{readelf {-n} property-2.r}} \ -- 2.30.2