aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2008-03-08 14:58:14 +0000
committerPaul Brook <paul@codesourcery.com>2008-03-08 14:58:14 +0000
commit12a0a0fd8876a94fcafa35b30e23984f738cb400 (patch)
tree3b6ed7e0f3afbb00e892b634c8b583a241c2d821 /ld
parent39623e120c11861d80f4859ccf3e7b77b7c15fa3 (diff)
downloadgdb-12a0a0fd8876a94fcafa35b30e23984f738cb400.zip
gdb-12a0a0fd8876a94fcafa35b30e23984f738cb400.tar.gz
gdb-12a0a0fd8876a94fcafa35b30e23984f738cb400.tar.bz2
2008-03-08 Paul Brook <paul@codesourcery.com>
bfd/ * elf32-arm.c (insert_thumb_branch): Rewrite. (elf32_thumb_to_arm_stub): Use new insert_thumb_branch. ld/testsuite/ * ld-arm/arm-elf.exp (armeabitests): Add thumb2-b-interwork. * ld-arm/thumb2-b-interwork.d: New test. * ld-arm/thumb2-b-interwork.s: New test.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog6
-rw-r--r--ld/testsuite/ld-arm/arm-elf.exp3
-rw-r--r--ld/testsuite/ld-arm/thumb2-b-interwork.d19
-rw-r--r--ld/testsuite/ld-arm/thumb2-b-interwork.s20
4 files changed, 48 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index a30eba9..329d6fb 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2008-03-08 Paul Brook <paul@codesourcery.com>
+
+ * ld-arm/arm-elf.exp (armeabitests): Add thumb2-b-interwork.
+ * ld-arm/thumb2-b-interwork.d: New test.
+ * ld-arm/thumb2-b-interwork.s: New test.
+
2008-03-07 Paul Brook <paul@codesourcery.com>
* ld-arm/arm-elf.exp (armelftests): Add movw-merge and arm-app-movw.
diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp
index 7c6ee21..81b9f75 100644
--- a/ld/testsuite/ld-arm/arm-elf.exp
+++ b/ld/testsuite/ld-arm/arm-elf.exp
@@ -209,6 +209,9 @@ set armeabitests {
{"Thumb-2 BL" "-Ttext 0x1000 --section-start .foo=0x1001000" "" {thumb2-bl.s}
{{objdump -dr thumb2-bl.d}}
"thumb2-bl"}
+ {"Thumb-2 Interworked branch" "-T arm.ld" "" {thumb2-b-interwork.s}
+ {{objdump -dr thumb2-b-interwork.d}}
+ "thumb2-b-interwork"}
}
run_ld_link_tests $armeabitests
diff --git a/ld/testsuite/ld-arm/thumb2-b-interwork.d b/ld/testsuite/ld-arm/thumb2-b-interwork.d
new file mode 100644
index 0000000..00bc4d4
--- /dev/null
+++ b/ld/testsuite/ld-arm/thumb2-b-interwork.d
@@ -0,0 +1,19 @@
+
+.*thumb2-b-interwork: file format elf32-.*arm
+
+Disassembly of section .text:
+
+00008000 <_start>:
+ 8000: f000 b802 b.w 8008 <__bar_from_thumb>
+
+00008004 <bar>:
+ 8004: e12fff1e bx lr
+Disassembly of section .glue_7t:
+
+00008008 <__bar_from_thumb>:
+ 8008: 4778 bx pc
+ 800a: 46c0 nop \(mov r8, r8\)
+
+0000800c <__bar_change_to_arm>:
+ 800c: eafffffc b 8004 <bar>
+
diff --git a/ld/testsuite/ld-arm/thumb2-b-interwork.s b/ld/testsuite/ld-arm/thumb2-b-interwork.s
new file mode 100644
index 0000000..4452a8f
--- /dev/null
+++ b/ld/testsuite/ld-arm/thumb2-b-interwork.s
@@ -0,0 +1,20 @@
+@ Test to ensure that a Thumb-2 B.W can branch to an ARM funtion.
+
+ .arch armv7-a
+ .global _start
+ .syntax unified
+ .text
+ .thumb_func
+
+_start:
+ b.w bar
+
+@ Put this in a separate section to force the assembler to generate a reloc
+
+ .arm
+ .section .after, "xa"
+ .global bar
+ .type bar, %function
+bar:
+ bx lr
+