aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-02-21 17:41:47 +1030
committerAlan Modra <amodra@gmail.com>2019-02-21 18:05:05 +1030
commit160eba9301df423116377113f2d4189d785c7dde (patch)
tree4d7ea53d3c4c1622c7b8caeec879c639690c7a1d /ld
parent56b80d4c4c24c6acacad15530a3a7b483b6e0f3f (diff)
downloadgdb-160eba9301df423116377113f2d4189d785c7dde.zip
gdb-160eba9301df423116377113f2d4189d785c7dde.tar.gz
gdb-160eba9301df423116377113f2d4189d785c7dde.tar.bz2
PowerPC __tls_get_addr arg parsing
The syntax we ended up with for -m32 -fPIC calls to __tls_get_addr is rather weird. bl __tls_get_addr+0x8000(gd0@tlsgd)@plt This came about by accident, probably due to requiring the arg reloc before the call reloc. Of course the @plt really belongs with __tls_get_addr since it affects the call rather than the call arg, and it isn't a great deal of trouble to ensure the relocs are emitted in the correct order. This patch supports a newer syntax, like so: bl __tls_get_addr+0x8000@plt(gd0@tlsgd) gas/ * config/tc-ppc.c (parse_tls_arg): New function, extracted.. (md_assembler): ..from here. Call it after parsing other suffix modifiers too. ld/ * testsuite/ld-powerpc/tls32.s: Test new @plt syntax.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ld-powerpc/tls32.s3
1 files changed, 2 insertions, 1 deletions
diff --git a/ld/testsuite/ld-powerpc/tls32.s b/ld/testsuite/ld-powerpc/tls32.s
index 1c7a890..2893ad2 100644
--- a/ld/testsuite/ld-powerpc/tls32.s
+++ b/ld/testsuite/ld-powerpc/tls32.s
@@ -62,7 +62,8 @@ _start:
#LD
addi 3,31,ld0@got@tlsld #R_PPC_GOT_TLSLD16 ld0
.ifdef TLSMARK
- bl __tls_get_addr+0x8000(ld0@tlsld)@plt #R_PPC_TLSLD ld0
+#exercise saner new syntax with @plt before the arg
+ bl __tls_get_addr+0x8000@plt(ld0@tlsld) #R_PPC_TLSLD ld0
#R_PPC_PLTREL24 __tls_get_addr+0x8000
.else
bl __tls_get_addr+0x8000@plt #R_PPC_PLTREL24 __tls_get_addr+0x8000