[PR ld/25062] arm: sign extend the addend of R_ARM_TLS_GOTDESC
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Thu, 3 Oct 2019 18:11:50 +0000 (19:11 +0100)
committerSzabolcs Nagy <szabolcs.nagy@arm.com>
Fri, 4 Oct 2019 09:54:16 +0000 (10:54 +0100)
commitb627f56244cb2930c5891cfde03586987d46b5d2
treebcf98c81badd1d49b135cd58671732a9589a8b9a
parent77c2dba3e843694fae090e237ccdf1b8f65b94e6
[PR ld/25062] arm: sign extend the addend of R_ARM_TLS_GOTDESC

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.
bfd/ChangeLog
bfd/elf32-arm.c
ld/ChangeLog
ld/testsuite/ld-arm/arm-elf.exp
ld/testsuite/ld-arm/tls-gdesc-neg.d [new file with mode: 0644]
ld/testsuite/ld-arm/tls-gdesc-neg.s [new file with mode: 0644]