summaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorJiong Wang <jiong.wang@arm.com>2015-06-17 16:36:04 +0100
committerJiong Wang <jiong.wang@arm.com>2015-06-17 16:36:04 +0100
commit696ddf4b52bd4b4d3997ca1a514b1d07fcea3715 (patch)
tree431df6b9fa0b29e48126f3b002a6e0aab018b306 /ld
parent5fc177c89526035dfa5ac5329f88b02af01d8ca5 (diff)
[AArch64] Select correct linker emulation for ILP32 according to endianes
2015-06-17 Jiong Wang <jiong.wang@arm.com> ld/testsuite/ * ld-aarch64/aarch64-elf.exp (aarch64_choose_ilp32_emul): New function. * ld-aarch64/emit-relocs-28.d: Use aarch64_choose_ilp32_emul to choose emulation mode.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog6
-rw-r--r--ld/testsuite/ld-aarch64/aarch64-elf.exp8
-rw-r--r--ld/testsuite/ld-aarch64/emit-relocs-28.d20
3 files changed, 24 insertions, 10 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 39cbab6b06..e81e616aec 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2015-06-17 Jiong Wang <jiong.wang@arm.com>
+
+ * ld-aarch64/aarch64-elf.exp (aarch64_choose_ilp32_emul): New function.
+ * ld-aarch64/emit-relocs-28.d: Use aarch64_choose_ilp32_emul to choose
+ emulation mode.
+
2015-06-16 Alan Modra <amodra@gmail.com>
* ld-powerpc/ppc476-shared.s: Repeat dynamic reloc generating insns.
diff --git a/ld/testsuite/ld-aarch64/aarch64-elf.exp b/ld/testsuite/ld-aarch64/aarch64-elf.exp
index 021343b3f8..531ec0eab4 100644
--- a/ld/testsuite/ld-aarch64/aarch64-elf.exp
+++ b/ld/testsuite/ld-aarch64/aarch64-elf.exp
@@ -45,6 +45,14 @@ set aarch64elftests {
"erratum835769"}
}
+proc aarch64_choose_ilp32_emul {} {
+ if [istarget aarch64_be*-*-*] then {
+ return "aarch64elf32b"
+ } else {
+ return "aarch64linux32"
+ }
+}
+
run_ld_link_tests $aarch64elftests
run_dump_test "erratum843419"
diff --git a/ld/testsuite/ld-aarch64/emit-relocs-28.d b/ld/testsuite/ld-aarch64/emit-relocs-28.d
index f138fb1faf..24424b9387 100644
--- a/ld/testsuite/ld-aarch64/emit-relocs-28.d
+++ b/ld/testsuite/ld-aarch64/emit-relocs-28.d
@@ -1,6 +1,6 @@
#source: emit-relocs-28.s
#as: -mabi=ilp32
-#ld: -m aarch64linux32 --defsym globala=0x11000 --defsym globalb=0x45000 --defsym globalc=0x1234 -e0 --emit-relocs
+#ld: -m [aarch64_choose_ilp32_emul] --defsym globala=0x11000 --defsym globalb=0x45000 --defsym globalc=0x1234 -e0 --emit-relocs
#objdump: -dr
.*: +file format .*
@@ -8,12 +8,12 @@
Disassembly of section .text:
-00400074 <\.text>:
- 400074: 90000082 adrp x2, 410000 <globalb\+0x3cb000>
- 400074: R_AARCH64_P32_ADR_PREL_PG_HI21 _GLOBAL_OFFSET_TABLE_
- 400078: f9408c40 ldr x0, \[x2,#280\]
- 400078: R_AARCH64_P32_LD32_GOTPAGE_LO14 globala
- 40007c: f9409040 ldr x0, \[x2,#288\]
- 40007c: R_AARCH64_P32_LD32_GOTPAGE_LO14 globalb
- 400080: f9408840 ldr x0, \[x2,#272\]
- 400080: R_AARCH64_P32_LD32_GOTPAGE_LO14 globalc
+.* <\.text>:
+ .*: .* adrp x2, .* <.*>
+ .*: R_AARCH64_P32_ADR_PREL_PG_HI21 _GLOBAL_OFFSET_TABLE_
+ .*: .* ldr x0, \[x2,#.*\]
+ .*: R_AARCH64_P32_LD32_GOTPAGE_LO14 globala
+ .*: .* ldr x0, \[x2,#.*\]
+ .*: R_AARCH64_P32_LD32_GOTPAGE_LO14 globalb
+ .*: .* ldr x0, \[x2,#.*\]
+ .*: R_AARCH64_P32_LD32_GOTPAGE_LO14 globalc