
This fixes miscounting of dynamic relocations on GOT entries when a) there are both local-dynamic and global-dynamic tls accesss for a given symbol, and b) the symbol is global with non-default visibility, and c) the __tls_get_addr calls aren't optimised away. PR 30697 bfd/ * elf32-ppc.c (allocate_dynrelocs): Correct local-dynamic reloc count. ld/ * testsuite/ld-powerpc/tls32ldgd.d, * testsuite/ld-powerpc/tls32ldgd.s: New test. * testsuite/ld-powerpc/powerpc.exp: Run it.
16 lines
264 B
ArmAsm
16 lines
264 B
ArmAsm
#PR 30697
|
|
.section ".tbss","awT",@nobits
|
|
.global _start,x
|
|
.hidden x
|
|
.align 2
|
|
x: .space 4
|
|
|
|
.text
|
|
_start:
|
|
addi 3,30,x@got@tlsgd
|
|
bl __tls_get_addr(x@tlsgd)@plt
|
|
|
|
addi 3,30,x@got@tlsld
|
|
bl __tls_get_addr(x@tlsld)@plt
|
|
addis 3,3,x@dtprel@ha
|
|
addi 3,3,x@dtprel@l
|