diff options
author | Siddhesh Poyarekar <siddesh.poyarekar@arm.com> | 2020-05-19 11:07:52 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2020-05-19 11:07:52 +0100 |
commit | 7e05773767820b441b23a16628b55c98cb1aef46 (patch) | |
tree | 76a372538e574c4de9168c05126acc4908be6f81 /cpu | |
parent | 607b483327fdfc75fb193870b3c4e7445ce3f64d (diff) | |
download | binutils-gdb-7e05773767820b441b23a16628b55c98cb1aef46.tar.gz |
[PATCH v3] aarch64: Emit jump slot for conditional branch to undefined symbols
The linker silently writes out a conditional branch to 0 if the
target symbol in R_AARCH64_CONDBR19 or R_AARCH64_TSTBR14 relocations is
undefined. Emit a PLT instead so that behaviour is the same for these
relocations as the llvm linker.
The special behaviour for undefined weak symbols, where conditional
branches to such symbols result in a branch unto themselves, has been
retained. This is because the weak-undefined.s test explicitly checks
for that, leading me to conclude that it's expected behaviour.
bfd * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Club
BFD_RELOC_AARCH64_BRANCH19 and BFD_RELOC_AARCH64_TSTBR14
cases with BFD_RELOC_AARCH64_JUMP26.
(elfNN_aarch64_check_relocs): Likewise.
ld * testsuite/ld-aarch64/aarch64-elf.exp: New test
emit-relocs-560.
* testsuite/ld-aarch64/emit-relocs-560.d: New file.
* testsuite/ld-aarch64/emit-relocs-560.s: New file.
Diffstat (limited to 'cpu')
0 files changed, 0 insertions, 0 deletions