mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-06 12:09:26 +08:00
b627f56244
On 64-bit host the 32-bit addend was loaded without sign extension into an unsigned long. bfd/ChangeLog: PR ld/25062 * elf32-arm.c (elf32_arm_final_link_relocate): Sign extend data. ld/ChangeLog: PR ld/25062 * testsuite/ld-arm/arm-elf.exp: Update. * testsuite/ld-arm/tls-gdesc-neg.d: New test. * testsuite/ld-arm/tls-gdesc-neg.s: New test.
30 lines
414 B
ArmAsm
30 lines
414 B
ArmAsm
.text
|
|
.arm
|
|
.globl foo
|
|
.type foo, %function
|
|
foo:
|
|
ldr r0, 1f
|
|
b 2f
|
|
1:
|
|
@ Negative addend for R_ARM_TLS_GOTDESC.
|
|
.word tlsdata(tlsdesc) + (. - 2f + 0)
|
|
2:
|
|
blx tlsdata(tlscall)
|
|
|
|
.thumb
|
|
.globl bar
|
|
.type bar, %function
|
|
bar:
|
|
ldr r0, 1f
|
|
b 2f
|
|
1:
|
|
@ Negative addend for R_ARM_TLS_GOTDESC.
|
|
.word tlsdata(tlsdesc) + (. - 2f + 1)
|
|
2:
|
|
blx tlsdata(tlscall)
|
|
|
|
.section .tdata,"awT"
|
|
.global tlsdata
|
|
tlsdata:
|
|
.space 4
|