i386: Pass -z noexecstack to linker tests
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 26 Apr 2022 16:26:36 +0000 (09:26 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 26 Apr 2022 16:28:24 +0000 (09:28 -0700)
PR ld/29072
* testsuite/ld-i386/i386.exp: Pass -z noexecstack to gotpc1
and property-6.

ld/testsuite/ld-i386/i386.exp

index 471a1f79547357c753baddabe81e2f5cf0fc8a34..b4f7de49fd57116a64aec4e7dabde7f2a224239c 100644 (file)
@@ -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}} \