]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
PR23169 bogus test
authorAlan Modra <amodra@gmail.com>
Tue, 26 Jun 2018 05:00:16 +0000 (14:30 +0930)
committerAlan Modra <amodra@gmail.com>
Tue, 26 Jun 2018 13:50:04 +0000 (23:20 +0930)
The testcase isn't valid.  If it happens to run on your target, you're
lucky.

PR 23169
* testsuite/ld-ifunc/ifunc.exp: Don't run pr23169 tests on
powerpc.  Comment.

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

index 8d9432a7a89859e0952e38fd91b979989f9fa050..f9498f676c62f761fe283ca96d557145d5d693da 100644 (file)
@@ -1,3 +1,9 @@
+2018-06-26  Alan Modra  <amodra@gmail.com>
+
+       PR 23169
+       * testsuite/ld-ifunc/ifunc.exp: Don't run pr23169 tests on
+       powerpc.  Comment.
+
 2018-06-26  Alan Modra  <amodra@gmail.com>
 
        * testsuite/ld-bootstrap/bootstrap.exp: Use parentheses rather
index dd3abd475ae2c328212f5cc424a5c9e4f8b9e276..612d91402fdd4e1e04d19fc57a1d4571da45dc22 100644 (file)
@@ -702,6 +702,19 @@ run_ld_link_exec_tests [list \
        "pr18841cn" \
        "pr18841.out" \
     ] \
+]
+
+# The pr23169 testcase is not valid.  In general, you can't call ifunc
+# resolvers in another binary unless you know what you're doing.  In
+# particular you must ensure that the binary containing the resolver
+# is relocated before the resolver is called (for example, the
+# function addresses returned by the resolver may be loaded from the
+# GOT).
+# That does not happen for the pr23169 testcase where the resolver is
+# in the executable (which is relocated last by ld.so).
+if { [isnative]
+     && ![istarget "powerpc-*-*"] } {
+run_ld_link_exec_tests [list \
     [list \
        "Run pr23169a" \
        "$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/libpr23169a.so" \
@@ -756,4 +769,4 @@ run_ld_link_exec_tests [list \
        "pass.out" \
        "-fPIE -O2 -g" \
     ] \
-]
+]}