]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
pr18841 tests on powerpc64
authorAlan Modra <amodra@gmail.com>
Thu, 9 Jul 2020 07:05:27 +0000 (16:35 +0930)
committerAlan Modra <amodra@gmail.com>
Thu, 9 Jul 2020 13:28:16 +0000 (22:58 +0930)
The PR18841 test does cross-module calls from within an ifunc
resolver, which is nasty, and not supported in general since the
called function may not be relocated.  In this case the called
function (zoo) is just a stub so doesn't need relocating, but on ppc64
the function descriptor for zoo in the executable won't be relocated
at the time the shared library ifunc resolver runs.  That means the
test will fail if your compiler generates PIEs by default.

PR 18841
* testsuite/ld-ifunc/ifunc.exp: Run pr18841 tests non-pie.

ld/ChangeLog
ld/testsuite/ld-ifunc/ifunc.exp

index 1a3646aab789c151b96c7a1d0d5d2d47ee459441..fa45f161ed2f3cc860cb81c858dfbb25d6bf843a 100644 (file)
@@ -1,3 +1,8 @@
+2020-07-09  Alan Modra  <amodra@gmail.com>
+
+       PR 18841
+       * testsuite/ld-ifunc/ifunc.exp: Run pr18841 tests non-pie.
+
 2020-07-08  Alan Modra  <amodra@gmail.com>
 
        * testsuite/lib/ld-lib.exp (ar_simple_create): Pass options before
index 08cc87875c740fabb3e09e6737131832f6a9b7e5..f67808c266574371eba6468f29ed80c7625a6607 100644 (file)
@@ -559,7 +559,7 @@ run_cc_link_tests [list \
     [list \
        "Build pr18841a.o" \
        "" \
-       "" \
+       "$NOPIE_CFLAGS" \
        { pr18841a.c } \
        "" \
        "" \
@@ -687,32 +687,32 @@ run_ld_link_exec_tests [list \
     ] \
     [list \
        "Run pr18841 with libpr18841b.so" \
-       "-Wl,--no-as-needed tmpdir/pr18841a.o tmpdir/libpr18841b.so" \
-       "" \
+       "$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/pr18841a.o tmpdir/libpr18841b.so" \
+       "$NOPIE_CFLAGS" \
        { dummy.c } \
        "pr18841b" \
        "pr18841.out" \
     ] \
     [list \
        "Run pr18841 with libpr18841c.so" \
-       "-Wl,--as-needed tmpdir/pr18841a.o tmpdir/libpr18841c.so" \
-       "" \
+       "$NOPIE_LDFLAGS -Wl,--as-needed tmpdir/pr18841a.o tmpdir/libpr18841c.so" \
+       "$NOPIE_CFLAGS" \
        { dummy.c } \
        "pr18841c" \
        "pr18841.out" \
     ] \
     [list \
        "Run pr18841 with libpr18841bn.so (-z now)" \
-       "-Wl,-z,now -Wl,--no-as-needed tmpdir/pr18841a.o tmpdir/libpr18841bn.so" \
-       "" \
+       "$NOPIE_LDFLAGS -Wl,-z,now -Wl,--no-as-needed tmpdir/pr18841a.o tmpdir/libpr18841bn.so" \
+       "$NOPIE_CFLAGS" \
        { dummy.c } \
        "pr18841bn" \
        "pr18841.out" \
     ] \
     [list \
        "Run pr18841 with libpr18841cn.so (-z now)" \
-       "-Wl,-z,now -Wl,--as-needed tmpdir/pr18841a.o tmpdir/libpr18841cn.so" \
-       "" \
+       "$NOPIE_LDFLAGS -Wl,-z,now -Wl,--as-needed tmpdir/pr18841a.o tmpdir/libpr18841cn.so" \
+       "$NOPIE_CFLAGS" \
        { dummy.c } \
        "pr18841cn" \
        "pr18841.out" \