aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorTejas Belagod <tejas.belagod@arm.com>2015-03-26 16:20:38 +0000
committerJiong Wang <jiong.wang@arm.com>2015-03-26 16:20:38 +0000
commit93ca856967f274a08807135c098bf1bb3f2b59d8 (patch)
tree88fc7a381d5968a21f2361483e3ceb0f7817b9de /ld
parent332f5759ac985415b721a72dab7475824253c0c6 (diff)
downloadgdb-93ca856967f274a08807135c098bf1bb3f2b59d8.zip
gdb-93ca856967f274a08807135c098bf1bb3f2b59d8.tar.gz
gdb-93ca856967f274a08807135c098bf1bb3f2b59d8.tar.bz2
[AArch64] Fix branch stubs for BE
2015-03-26 Tejas Belagod <tejas.belagod@arm.com> ld/testsuite * ld-aarch64/farcall-back-be.d: New. bfd/ * elfnn-aarch64.c (aarch64_build_one_stub): Replace the call to generic _bfd_final_link_relocate with aarch64_relocate.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog4
-rw-r--r--ld/testsuite/ld-aarch64/farcall-back-be.d74
2 files changed, 78 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 31e6ffc..7aa7d9f 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2015-03-26 Tejas Belagod <tejas.belagod@arm.com>
+
+ * ld-aarch64/farcall-back-be.d: New.
+
2015-03-26 H.J. Lu <hongjiu.lu@intel.com>
PR ld/18160
diff --git a/ld/testsuite/ld-aarch64/farcall-back-be.d b/ld/testsuite/ld-aarch64/farcall-back-be.d
new file mode 100644
index 0000000..80992aa
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/farcall-back-be.d
@@ -0,0 +1,74 @@
+#name: aarch64-farcall-back-be
+#source: farcall-back.s
+#as:
+#ld: -Ttext 0x1000 --section-start .foo=0x100000000
+#objdump: -dr
+#target: aarch64_be-*-*
+#...
+
+Disassembly of section .text:
+
+0000000000001000 <_start>:
+ 1000: 14000413 b 204c <__bar1_veneer>
+ 1004: 94000412 bl 204c <__bar1_veneer>
+ 1008: 14000407 b 2024 <__bar2_veneer>
+ 100c: 94000406 bl 2024 <__bar2_veneer>
+ 1010: 14000409 b 2034 <__bar3_veneer>
+ 1014: 94000408 bl 2034 <__bar3_veneer>
+ 1018: d65f03c0 ret
+ ...
+
+000000000000201c <_back>:
+ 201c: d65f03c0 ret
+
+[ \t]+2020:[ \t]+14000013[ \t]+b[ \t]+206c <__bar1_veneer\+0x20>
+0000000000002024 <__bar2_veneer>:
+ 2024: f07ffff0 adrp x16, 100001000 <bar1\+0x1000>
+ 2028: 91002210 add x16, x16, #0x8
+ 202c: d61f0200 br x16
+ 2030: 00000000 .inst 0x00000000 ; undefined
+
+0000000000002034 <__bar3_veneer>:
+ 2034: 58000090 ldr x16, 2044 <__bar3_veneer\+0x10>
+ 2038: 10000011 adr x17, 2038 <__bar3_veneer\+0x4>
+ 203c: 8b110210 add x16, x16, x17
+ 2040: d61f0200 br x16
+ 2044: 00000000 .word 0x00000000
+ 2048: ffffffd8 .word 0xffffffd8
+
+000000000000204c <__bar1_veneer>:
+ 204c: d07ffff0 adrp x16, 100000000 <bar1>
+ 2050: 91000210 add x16, x16, #0x0
+ 2054: d61f0200 br x16
+ ...
+
+Disassembly of section .foo:
+
+0000000100000000 <bar1>:
+ 100000000: d65f03c0 ret
+ 100000004: 14000806 b 10000201c <___start_veneer>
+ ...
+
+0000000100001008 <bar2>:
+ 100001008: d65f03c0 ret
+ 10000100c: 14000404 b 10000201c <___start_veneer>
+ ...
+
+0000000100002010 <bar3>:
+ 100002010: d65f03c0 ret
+ 100002014: 14000008 b 100002034 <___back_veneer>
+
+[ \t]+100002018:[ \t]+1400000d[ \t]+b[ \t]+10000204c <___back_veneer\+0x18>
+000000010000201c <___start_veneer>:
+ 10000201c: 58000090 ldr x16, 10000202c <___start_veneer\+0x10>
+ 100002020: 10000011 adr x17, 100002020 <___start_veneer\+0x4>
+ 100002024: 8b110210 add x16, x16, x17
+ 100002028: d61f0200 br x16
+ 10000202c: fffffffe .word 0xfffffffe
+ 100002030: ffffefe0 .word 0xffffefe0
+
+0000000100002034 <___back_veneer>:
+ 100002034: 90800010 adrp x16, 2000 <_start\+0x1000>
+ 100002038: 91007210 add x16, x16, #0x1c
+ 10000203c: d61f0200 br x16
+ ...