aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddesh.poyarekar@arm.com>2020-09-01 14:25:52 +0530
committerSiddhesh Poyarekar <siddhesh@gotplt.org>2020-09-10 21:42:37 +0530
commitc7cd291722779c9d4703ed0010388fe394c644c8 (patch)
tree23053bc30ff3bc5f846937c4588493635f3d14c1 /ld
parent93d49941edbb5274bee6ce3e547a07c7ce4c4301 (diff)
downloadfsf-binutils-gdb-c7cd291722779c9d4703ed0010388fe394c644c8.zip
fsf-binutils-gdb-c7cd291722779c9d4703ed0010388fe394c644c8.tar.gz
fsf-binutils-gdb-c7cd291722779c9d4703ed0010388fe394c644c8.tar.bz2
aarch64: Return an error on conditional branch to an undefined symbol
The fix in 7e05773767820b441b23a16628b55c98cb1aef46 introduced a PLT for conditional jumps when the target symbol is undefined. This is incorrect because conditional branch relocations are not allowed to clobber IP0/IP1 and hence, should not result in a dynamic relocation. Revert that change and in its place, issue an error when the target symbol is undefined. bfd/ 2020-09-10 Siddhesh Poyarekar <siddesh.poyarekar@arm.com> * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Revert changes in 7e05773767820b441b23a16628b55c98cb1aef46. Set error for undefined symbol in BFD_RELOC_AARCH64_BRANCH19 and BFD_RELOC_AARCH64_TSTBR14 relocations. ld/ 2020-09-10 Siddhesh Poyarekar <siddesh.poyarekar@arm.com> * testsuite/ld-aarch64/emit-relocs-560.d: Expect error instead of valid output.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/testsuite/ld-aarch64/emit-relocs-560.d7
2 files changed, 6 insertions, 6 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 3e86628..3b9a426 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2020-09-10 Siddhesh Poyarekar <siddesh.poyarekar@arm.com>
+
+ * testsuite/ld-aarch64/emit-relocs-560.d: Expect error instead
+ of valid output.
+
2020-09-10 H.J. Lu <hongjiu.lu@intel.com>
PR ld/26590
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-560.d b/ld/testsuite/ld-aarch64/emit-relocs-560.d
index 1535324..8751b74 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-560.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-560.d
@@ -1,8 +1,3 @@
#source: emit-relocs-560.s
#ld: -shared
-#readelf: -r
-
-Relocation section '.rela.plt' at offset 0x[0-9a-f]+ contains 2 entries:
- Offset Info Type Sym. Value Sym. Name \+ Addend
-[0-9a-f]+ 000100000402 R_AARCH64_JUMP_SL 0000000000000000 baz \+ 0
-[0-9a-f]+ 000200000402 R_AARCH64_JUMP_SL 0000000000000000 bar \+ 0
+#error: .*: conditional branch to undefined symbol `bar' not allowed