diff options
author | Nick Clifton <nickc@redhat.com> | 2008-08-26 11:46:41 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2008-08-26 11:46:41 +0000 |
commit | c820be077e039666a0dec7a4d95668fb46d0a375 (patch) | |
tree | 436b00f94184bcbe354ea9873497d00fe5227c00 /ld | |
parent | 8716772cc56cb5beb0cbea672eed1b10d6486484 (diff) | |
download | gdb-c820be077e039666a0dec7a4d95668fb46d0a375.zip gdb-c820be077e039666a0dec7a4d95668fb46d0a375.tar.gz gdb-c820be077e039666a0dec7a4d95668fb46d0a375.tar.bz2 |
bfd/
* elf32-arm.c (arm_thumb_arm_v4t_short_branch_stub): Define.
(elf32_arm_stub_type): Add arm_thumb_arm_v4t_stub_short_branch.
(arm_type_of_stub): Handle armv4t short branches. Update
prototype.
(arm_stub_is_thumb): Handle arm_thumb_arm_v4t_stub_short_branch.
(arm_build_one_stub): Likewise.
(arm_size_one_stub): Likewise.
(elf32_arm_size_stubs): Use new arm_type_of_stub prototype.
(arm_map_one_stub): Handle arm_thumb_arm_v4t_stub_short_branch.
ld/testsuite/
* ld-arm/arm-elf.exp: Add farcall-thumb-arm-short test.
* ld-arm/farcall-group2.s: Fix comment.
* ld-arm/farcall-thumb-arm-short.d: New test.
* ld-arm/farcall-thumb-arm-short.s: New test.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/arm-elf.exp | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/farcall-group2.s | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/farcall-thumb-arm-short.d | 14 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/farcall-thumb-arm-short.s | 21 |
5 files changed, 47 insertions, 5 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 117f5b7..a2c3050 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2008-08-26 Nick Clifton <nickc@redhat.com> + + * ld-arm/arm-elf.exp: Add farcall-thumb-arm-short test. + * ld-arm/farcall-group2.s: Fix comment. + * ld-arm/farcall-thumb-arm-short.d: New test. + * ld-arm/farcall-thumb-arm-short.s: New test. + 2008-08-22 Jan Kratochvil <jan.kratochvil@redhat.com> * ld-x86-64/dwarfreloc.exp, ld-x86-64/dwarfreloc.rd, diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp index c01c795..6075e68 100644 --- a/ld/testsuite/ld-arm/arm-elf.exp +++ b/ld/testsuite/ld-arm/arm-elf.exp @@ -207,7 +207,7 @@ set armeabitests { {"Thumb-2 BL" "-Ttext 0x1000 --section-start .foo=0x1001000" "" {thumb2-bl.s} {{objdump -dr thumb2-bl.d}} "thumb2-bl"} - + {"ARMv4 interworking" "-static -T arm.ld --fix-v4bx-interworking" "--fix-v4bx -meabi=4" {armv4-bx.s} {{objdump -d armv4-bx.d}} "armv4-bx"} @@ -260,6 +260,9 @@ set armeabitests { {"Thumb-ARM farcall" "-Ttext 0x1000 --section-start .foo=0x2001014" "-W" {farcall-thumb-arm.s} {{objdump -d farcall-thumb-arm.d}} "farcall-thumb-arm"} + {"Thumb-ARM (short) call" "-Ttext 0x1000 --section-start .foo=0x0002014" "-W" {farcall-thumb-arm-short.s} + {{objdump -d farcall-thumb-arm-short.d}} + "farcall-thumb-arm-short"} {"Thumb-ARM farcall with BLX" "-Ttext 0x1000 --section-start .foo=0x2001014" "-W -march=armv5t" {farcall-thumb-arm.s} {{objdump -d farcall-thumb-arm-blx.d}} "farcall-thumb-arm-blx"} diff --git a/ld/testsuite/ld-arm/farcall-group2.s b/ld/testsuite/ld-arm/farcall-group2.s index 4624804..774869f 100644 --- a/ld/testsuite/ld-arm/farcall-group2.s +++ b/ld/testsuite/ld-arm/farcall-group2.s @@ -1,10 +1,7 @@ - @ Test to ensure that ARM calls exceeding 32Mb generate stubs. -@ We will place the section .foo at 0x2000. - .text -myfunc: +myfunc: bl bar3 bl bar4 bl bar5 diff --git a/ld/testsuite/ld-arm/farcall-thumb-arm-short.d b/ld/testsuite/ld-arm/farcall-thumb-arm-short.d new file mode 100644 index 0000000..2e7a17a --- /dev/null +++ b/ld/testsuite/ld-arm/farcall-thumb-arm-short.d @@ -0,0 +1,14 @@ +.*: file format .* + +Disassembly of section .text: + +00001000 <__bar_from_thumb>: + 1000: 4778 bx pc + 1002: 46c0 nop \(mov r8, r8\) + 1004: ea000402 b 2014 <bar> +00001008 <_start>: + 1008: f7ff fffa bl 1000 <__bar_from_thumb> +Disassembly of section .foo: + +00002014 <bar>: + 2014: e12fff1e bx lr diff --git a/ld/testsuite/ld-arm/farcall-thumb-arm-short.s b/ld/testsuite/ld-arm/farcall-thumb-arm-short.s new file mode 100644 index 0000000..1865380 --- /dev/null +++ b/ld/testsuite/ld-arm/farcall-thumb-arm-short.s @@ -0,0 +1,21 @@ +@ Test to ensure that a Thumb to ARM call within 4Mb does not generate a stub. + + .global _start + .syntax unified + +@ We will place the section .text at 0x1000. + + .text + .thumb_func +_start: + bl bar + +@ We will place the section .foo at 0x2014. + + .section .foo, "xa" + + .arm + .type bar, %function +bar: + bx lr + |