mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-15 04:31:49 +08:00
663a1470e1
* elf32-ppc.c (ppc_elf_tls_optimize): Catch more cases where old-style __tls_get_addr calls without marker relocs don't match their arg setup insn one for one. If such mismatches are found report the reloc and don't do any tls optimization. * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise. ld/testsuite/ * ld-powerpc/tlsmark.s: Delete non-optimizable section. * ld-powerpc/tlsmark32.s: Likewise. * ld-powerpc/tlsmark.d: Adjust to suit. * ld-powerpc/tlsmark32.d: Likewise. * ld-powerpc/tlsopt1.d, * ld-powerpc/tlsopt1.s: New. * ld-powerpc/tlsopt2.d, * ld-powerpc/tlsopt2.s: New. * ld-powerpc/tlsopt3.d, * ld-powerpc/tlsopt3.s: New. * ld-powerpc/tlsopt4.d, * ld-powerpc/tlsopt4.s: New. * ld-powerpc/tlsopt1_32.d, * ld-powerpc/tlsopt1_32.s: New. * ld-powerpc/tlsopt2_32.d, * ld-powerpc/tlsopt2_32.s: New. * ld-powerpc/tlsopt3_32.d, * ld-powerpc/tlsopt3_32.s: New. * ld-powerpc/tlsopt4_32.d, * ld-powerpc/tlsopt4_32.s: New. * ld-powerpc/powerpc.exp: Run new tests.
47 lines
555 B
ArmAsm
47 lines
555 B
ArmAsm
.section ".tdata","awT",@progbits
|
|
x: .int 1
|
|
y: .int 2
|
|
|
|
.section ".toc","aw",@progbits
|
|
.p2align 3
|
|
.LC0:
|
|
.quad y@dtpmod
|
|
.quad y@dtprel
|
|
.LC1:
|
|
.quad y@dtpmod
|
|
.quad 0
|
|
|
|
.text
|
|
.global _start
|
|
_start:
|
|
b .L2
|
|
|
|
.L1:
|
|
bl __tls_get_addr(x@tlsgd)
|
|
nop
|
|
ld 4,0(3)
|
|
addi 3,2,x@got@tlsld
|
|
b .L3
|
|
.L2:
|
|
addi 3,2,x@got@tlsgd
|
|
b .L1
|
|
.L3:
|
|
bl __tls_get_addr(x@tlsld)
|
|
nop
|
|
ld 4,x@dtprel(3)
|
|
|
|
addi 3,2,.LC0@toc
|
|
b .L5
|
|
.L4:
|
|
addi 3,2,.LC1@toc
|
|
b .L6
|
|
.L5:
|
|
bl .__tls_get_addr(.LC0@tlsgd)
|
|
nop
|
|
ld 5,0(3)
|
|
b .L4
|
|
.L6:
|
|
bl .__tls_get_addr(.LC1@tlsld)
|
|
nop
|
|
ld 5,y@dtprel(3)
|