From 2822b09ff6024d042f1258194d6938c5a401b4fb Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 26 Jun 2018 14:30:16 +0930 Subject: [PATCH] PR23169 bogus test 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 | 6 ++++++ ld/testsuite/ld-ifunc/ifunc.exp | 15 ++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 2065c6ea71f..8951df6186b 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2018-06-26 Alan Modra + + PR 23169 + * testsuite/ld-ifunc/ifunc.exp: Don't run pr23169 tests on + powerpc. Comment. + 2018-06-26 Alan Modra * testsuite/ld-bootstrap/bootstrap.exp: Use parentheses rather diff --git a/ld/testsuite/ld-ifunc/ifunc.exp b/ld/testsuite/ld-ifunc/ifunc.exp index dd3abd475ae..612d91402fd 100644 --- a/ld/testsuite/ld-ifunc/ifunc.exp +++ b/ld/testsuite/ld-ifunc/ifunc.exp @@ -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" \ ] \ -] +]} -- 2.30.2