From 12a0a0fd8876a94fcafa35b30e23984f738cb400 Mon Sep 17 00:00:00 2001 From: Paul Brook Date: Sat, 8 Mar 2008 14:58:14 +0000 Subject: 2008-03-08 Paul Brook 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. --- ld/testsuite/ChangeLog | 6 ++++++ ld/testsuite/ld-arm/arm-elf.exp | 3 +++ ld/testsuite/ld-arm/thumb2-b-interwork.d | 19 +++++++++++++++++++ ld/testsuite/ld-arm/thumb2-b-interwork.s | 20 ++++++++++++++++++++ 4 files changed, 48 insertions(+) create mode 100644 ld/testsuite/ld-arm/thumb2-b-interwork.d create mode 100644 ld/testsuite/ld-arm/thumb2-b-interwork.s (limited to 'ld/testsuite') 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 + + * 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 * 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 : + 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 + 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 + -- cgit v1.1