aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-powerpc/notoc2.d
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-09-26 15:10:09 +0930
committerAlan Modra <amodra@gmail.com>2020-09-26 19:03:02 +0930
commit3cd7c7d7ef38ec5dc0a0c137c47d9ad0fc9e2e5f (patch)
tree1b9ed3050e4eb9b5338592f702929c91e44be19e /ld/testsuite/ld-powerpc/notoc2.d
parent0be2fe677c53c6d363a40ae3612d4490ba377e02 (diff)
downloadgdb-3cd7c7d7ef38ec5dc0a0c137c47d9ad0fc9e2e5f.zip
gdb-3cd7c7d7ef38ec5dc0a0c137c47d9ad0fc9e2e5f.tar.gz
gdb-3cd7c7d7ef38ec5dc0a0c137c47d9ad0fc9e2e5f.tar.bz2
PPC64_OPT_LOCALENTRY is incompatible with tail calls
The save of r2 in __glink_PLTresolve is the culprit. Remove it, unless we know we need it for --plt-localentry. --plt-localentry should not be used with power10 pc-relative code that makes tail calls. The patch also removes use of r2 as a scratch reg in the ELFv2 __glink_PLTresolve. Using r2 isn't a problem, this is just reducing the number of scratch regs. bfd/ * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Depend on has_plt_localentry0. (LD_R0_0R11, ADD_R11_R0_R11): Define. (ppc64_elf_tls_setup): Disable params->plt_localentry0 when power10 code detected. (ppc64_elf_size_stubs): Update __glink_PLTresolve eh_frame. (ppc64_elf_build_stubs): Move r2 save to start of __glink_PLTresolve, and only emit for has_plt_localentry0. Don't use r2 in the stub. ld/ * testsuite/ld-powerpc/elfv2so.d, * testsuite/ld-powerpc/notoc2.d, * testsuite/ld-powerpc/tlsdesc.wf, * testsuite/ld-powerpc/tlsdesc2.d, * testsuite/ld-powerpc/tlsdesc2.wf, * testsuite/ld-powerpc/tlsopt5.d, * testsuite/ld-powerpc/tlsopt5.wf, * testsuite/ld-powerpc/tlsopt6.d, * testsuite/ld-powerpc/tlsopt6.wf: Update __glink_PLTresolve.
Diffstat (limited to 'ld/testsuite/ld-powerpc/notoc2.d')
-rw-r--r--ld/testsuite/ld-powerpc/notoc2.d4
1 files changed, 2 insertions, 2 deletions
diff --git a/ld/testsuite/ld-powerpc/notoc2.d b/ld/testsuite/ld-powerpc/notoc2.d
index 1e519c0..3448f8b 100644
--- a/ld/testsuite/ld-powerpc/notoc2.d
+++ b/ld/testsuite/ld-powerpc/notoc2.d
@@ -22,8 +22,8 @@ Disassembly of section \.text:
.*: (39 80 ff ff|ff ff 80 39)
.*: (06 10 00 00|00 00 10 06) pla r12,0
.*: (39 80 00 00|00 00 80 39)
-.*: (06 10 00 00|00 00 10 06) pla r3,92
-.*: (38 60 00 5c|5c 00 60 38)
+.*: (06 10 00 00|00 00 10 06) pla r3,88
+.*: (38 60 00 58|58 00 60 38)
.*: (4b ff ff 99|99 ff ff 4b) bl .* <.*\.plt_call\.puts>
.*: (60 00 00 00|00 00 00 60) nop
#pass