aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite
diff options
context:
space:
mode:
authorRamana Radhakrishnan <ramana.r@gmail.com>2010-02-01 10:33:16 +0000
committerRamana Radhakrishnan <ramana.r@gmail.com>2010-02-01 10:33:16 +0000
commit8fac31798547b3780757d72ba5e30de68c35719a (patch)
tree01d9ba6d8ba84928465edc88f2bb8697f792ec35 /ld/testsuite
parent0930eddd65bd8f1e41f8eaec99f9d9bef22553cd (diff)
downloadgdb-8fac31798547b3780757d72ba5e30de68c35719a.zip
gdb-8fac31798547b3780757d72ba5e30de68c35719a.tar.gz
gdb-8fac31798547b3780757d72ba5e30de68c35719a.tar.bz2
Fix testsuite for Thumb2 jump reloc veneers.
2010-02-01 Matthew Gretton-Dann <matthew.gretton-dann@arm.com> * ld-arm/jump-reloc-veneers-long.d: New test. * ld-arm/jump-reloc-veneers-short1.d: Likewise. * ld-arm/jump-reloc-veneers-short2.d: Likewise. * ld-arm/jump-reloc-veneers.s: Likewise. * ld-arm/arm-elf.exp (armelftests): Run them.
Diffstat (limited to 'ld/testsuite')
-rw-r--r--ld/testsuite/ChangeLog8
-rw-r--r--ld/testsuite/ld-arm/arm-elf.exp19
-rw-r--r--ld/testsuite/ld-arm/jump-reloc-veneers-long.d21
-rw-r--r--ld/testsuite/ld-arm/jump-reloc-veneers-short1.d13
-rw-r--r--ld/testsuite/ld-arm/jump-reloc-veneers-short2.d13
-rw-r--r--ld/testsuite/ld-arm/jump-reloc-veneers.s12
6 files changed, 86 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 9e3e0f1..e3d20bf 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2010-02-01 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
+
+ * ld-arm/jump-reloc-veneers-long.d: New test.
+ * ld-arm/jump-reloc-veneers-short1.d: Likewise.
+ * ld-arm/jump-reloc-veneers-short2.d: Likewise.
+ * ld-arm/jump-reloc-veneers.s: Likewise.
+ * ld-arm/arm-elf.exp (armelftests): Run them.
+
2010-01-28 Nick Clifton <nickc@redhat.com>
PR 11225
diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp
index 050471d..9d60084 100644
--- a/ld/testsuite/ld-arm/arm-elf.exp
+++ b/ld/testsuite/ld-arm/arm-elf.exp
@@ -433,6 +433,25 @@ set armeabitests {
{"Long branch with mixed text and data" "-T arm.ld" "" {farcall-data.s}
{{objdump -dr farcall-data.d}}
"farcall-data"}
+
+ {"R_ARM_THM_JUMP24 Relocation veneers: Short 1"
+ "-defsym _start=0x8000 --section-start destsect=0x00009000"
+ "-march=armv7-a -mthumb"
+ {jump-reloc-veneers.s}
+ {{objdump -d jump-reloc-veneers-short1.d}}
+ "jump-reloc-veneers-short1"}
+ {"R_ARM_THM_JUMP24 Relocation veneers: Short 2"
+ "-defsym _start=0x8000 --section-start destsect=0x00900000"
+ "-march=armv7-a -mthumb"
+ {jump-reloc-veneers.s}
+ {{objdump -d jump-reloc-veneers-short2.d}}
+ "jump-reloc-veneers-short2"}
+ {"R_ARM_THM_JUMP24 Relocation veneers: Long"
+ "-defsym _start=0x8000 --section-start destsect=0x09000000"
+ "-march=armv7-a -mthumb"
+ {jump-reloc-veneers.s}
+ {{objdump -d jump-reloc-veneers-long.d}}
+ "jump-reloc-veneers-long"}
}
run_ld_link_tests $armeabitests
diff --git a/ld/testsuite/ld-arm/jump-reloc-veneers-long.d b/ld/testsuite/ld-arm/jump-reloc-veneers-long.d
new file mode 100644
index 0000000..16abe36
--- /dev/null
+++ b/ld/testsuite/ld-arm/jump-reloc-veneers-long.d
@@ -0,0 +1,21 @@
+
+.*: file format.*
+
+
+Disassembly of section destsect:
+
+09000000 <[^>]*>:
+ 9000000: e7fe b.n 9000000 <dest>
+
+Disassembly of section .text:
+
+00008058 <[^>]*>:
+ 8058: b802f000 .word 0xb802f000
+ 805c: 00000000 andeq r0, r0, r0
+
+00008060 <[^>]*>:
+ 8060: 4778 bx pc
+ 8062: 46c0 nop ; \(mov r8, r8\)
+ 8064: e59fc000 ldr ip, \[pc, #0\] ; 806c <__dest_veneer\+0xc>
+ 8068: e12fff1c bx ip
+ 806c: 09000001 .word 0x09000001
diff --git a/ld/testsuite/ld-arm/jump-reloc-veneers-short1.d b/ld/testsuite/ld-arm/jump-reloc-veneers-short1.d
new file mode 100644
index 0000000..8ba0195
--- /dev/null
+++ b/ld/testsuite/ld-arm/jump-reloc-veneers-short1.d
@@ -0,0 +1,13 @@
+
+.*: file format.*
+
+
+Disassembly of section destsect:
+
+00009000 <[^>]*>:
+ 9000: e7fe b.n 9000 <dest>
+
+Disassembly of section .text:
+
+00008054 <[^>]*>:
+ 8054: f000 bfd4 b.w 9000 <dest>
diff --git a/ld/testsuite/ld-arm/jump-reloc-veneers-short2.d b/ld/testsuite/ld-arm/jump-reloc-veneers-short2.d
new file mode 100644
index 0000000..538ff91
--- /dev/null
+++ b/ld/testsuite/ld-arm/jump-reloc-veneers-short2.d
@@ -0,0 +1,13 @@
+
+.*: file format.*
+
+
+Disassembly of section destsect:
+
+00900000 <[^>]*>:
+ 900000: e7fe b.n 900000 <dest>
+
+Disassembly of section .text:
+
+00008054 <[^>]*>:
+ 8054: f0f7 9fd4 b.w 900000 <dest>
diff --git a/ld/testsuite/ld-arm/jump-reloc-veneers.s b/ld/testsuite/ld-arm/jump-reloc-veneers.s
new file mode 100644
index 0000000..d307c08
--- /dev/null
+++ b/ld/testsuite/ld-arm/jump-reloc-veneers.s
@@ -0,0 +1,12 @@
+ .text
+ .syntax unified
+ .thumb_func
+ .global _start
+ .type _start,%function
+_start:
+ b.w dest
+
+ .section destsect, "x"
+ .thumb_func
+dest:
+ b dest