diff options
author | Christophe Lyon <christophe.lyon@st.com> | 2009-02-26 15:37:53 +0000 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@st.com> | 2009-02-26 15:37:53 +0000 |
commit | a94fa89fff54d3cb97cd6ebe2ef61d3e4d039e88 (patch) | |
tree | 6fa07b6eda0847baae2d266a07c45e2a30fec3f6 /ld | |
parent | f17d642b1e046036850aad18984196eeffdeea5c (diff) | |
download | binutils-redhat-a94fa89fff54d3cb97cd6ebe2ef61d3e4d039e88.tar.gz |
2009-02-26 Christophe Lyon <christophe.lyon@st.com>
bfd/
* elf32-arm.c (stub_reloc_type): Removed.
(insn_sequence): Renamed reloc_type field to r_type.
(elf32_arm_stub_long_branch_v4t_arm_thumb_pic): New stub.
(elf32_arm_stub_long_branch_v4t_thumb_arm_pic): Likewise.
(elf32_arm_stub_long_branch_thumb_only_pic): Likewise.
(elf32_arm_stub_type): Add new enum entries for the new stubs.
(arm_stub_is_thumb): Catch new stubs.
(arm_type_of_stub): Handle new stubs.
(arm_size_one_stub): Use ARRAY_SIZE. Handle new stubs.
(bfd_elf32_arm_process_before_allocation): Remove useless
condition.
testsuite/
* ld-arm/arm-elf.exp: Add 3 tests for the 3 new stubs.
* ld-arm/farcall-thumb-arm-pic-veneer.d: New expected result, the
test is now expected to pass.
* ld-arm/farcall-thumb-thumb-m-pic-veneer.d: Likewise.
* ld-arm/farcall-thumb-thumb-pic-veneer.d: Likewise.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ChangeLog | 9 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/arm-elf.exp | 12 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/farcall-thumb-arm-pic-veneer.d | 25 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/farcall-thumb-thumb-m-pic-veneer.d | 27 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/farcall-thumb-thumb-pic-veneer.d | 27 |
5 files changed, 81 insertions, 19 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index a214deaf93..d78062d8b2 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,6 +1,13 @@ +2009-02-26 Christophe Lyon <christophe.lyon@st.com> + + * ld-arm/arm-elf.exp: Add 3 tests for the 3 new stubs. + * ld-arm/farcall-thumb-arm-pic-veneer.d: New expected result, the + test is now expected to pass. + * ld-arm/farcall-thumb-thumb-m-pic-veneer.d: Likewise. + * ld-arm/farcall-thumb-thumb-pic-veneer.d: Likewise. + 2009-02-25 Christophe Lyon <christophe.lyon@st.com> - testsuite/ * ld-arm/thumb2-bl-as-thumb1-bad-noeabi.d: Update expected result, as stubs are now generated and the end of the .text section. * ld-arm/thumb2-bl-bad-noeabi.d: Likewise. diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp index da63b40d1b..48b2b51ea7 100644 --- a/ld/testsuite/ld-arm/arm-elf.exp +++ b/ld/testsuite/ld-arm/arm-elf.exp @@ -296,6 +296,12 @@ set armeabitests { {"Thumb-Thumb farcall with BLX (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "-march=armv5t" {farcall-thumb-thumb.s} {{objdump -d farcall-thumb-thumb-blx-pic-veneer.d}} "farcall-thumb-thumb-blx-pic-veneer"} + {"Thumb-Thumb farcall M profile (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "-march=armv7m" {farcall-thumb-thumb.s} + {{objdump -d farcall-thumb-thumb-m-pic-veneer.d}} + "farcall-thumb-thumb-m-pic-veneer"} + {"Thumb-Thumb farcall (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "-march=armv4t" {farcall-thumb-thumb.s} + {{objdump -d farcall-thumb-thumb-pic-veneer.d}} + "farcall-thumb-thumb-pic-veneer"} {"Thumb-ARM farcall" "-Ttext 0x1000 --section-start .foo=0x2001014" "-W" {farcall-thumb-arm.s} {{objdump -d farcall-thumb-arm.d}} @@ -315,6 +321,9 @@ set armeabitests { {"Thumb-ARM farcall with BLX (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "-W -march=armv5t" {farcall-thumb-arm.s} {{objdump -d farcall-thumb-arm-blx-pic-veneer.d}} "farcall-thumb-arm-blx-pic-veneer"} + {"Thumb-ARM farcall (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "-W" {farcall-thumb-arm.s} + {{objdump -d farcall-thumb-arm-pic-veneer.d}} + "farcall-thumb-arm-pic-veneer"} {"Multiple farcalls" "-Ttext 0x1000 --section-start .foo=0x2002020" "" {farcall-mix.s} {{objdump -d farcall-mix.d}} @@ -350,9 +359,6 @@ run_dump_test "attr-merge-wchar-24-nowarn" run_dump_test "attr-merge-wchar-40-nowarn" run_dump_test "attr-merge-wchar-42-nowarn" run_dump_test "attr-merge-wchar-44-nowarn" -run_dump_test "farcall-thumb-thumb-pic-veneer" -run_dump_test "farcall-thumb-thumb-m-pic-veneer" -run_dump_test "farcall-thumb-arm-pic-veneer" run_dump_test "farcall-section" run_dump_test "attr-merge-unknown-1" run_dump_test "attr-merge-unknown-2" diff --git a/ld/testsuite/ld-arm/farcall-thumb-arm-pic-veneer.d b/ld/testsuite/ld-arm/farcall-thumb-arm-pic-veneer.d index a2c09d29b4..6ac6e5c0f9 100644 --- a/ld/testsuite/ld-arm/farcall-thumb-arm-pic-veneer.d +++ b/ld/testsuite/ld-arm/farcall-thumb-arm-pic-veneer.d @@ -1,5 +1,20 @@ -#name: Thumb-ARM farcall without BLX (PIC veneer) -#source: farcall-thumb-arm.s -#as: -march=armv4t -W -#ld: -Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer -#error: .*\(.text\+0x0\): relocation truncated to fit: R_ARM_THM_CALL against `bar' +.*: file format .* + +Disassembly of section .text: + +00001000 <_start>: + 1000: f000 f802 bl 1008 <__bar_from_thumb> + 1004: 0000 lsls r0, r0, #0 + ... + +00001008 <__bar_from_thumb>: + 1008: 4778 bx pc + 100a: 46c0 nop \(mov r8, r8\) + 100c: e59fc000 ldr ip, \[pc, #0\] ; 1014 <__bar_from_thumb\+0xc> + 1010: e08cf00f add pc, ip, pc + 1014: 01fffffc .word 0x01fffffc + +Disassembly of section .foo: + +02001014 <bar>: + 2001014: e12fff1e bx lr diff --git a/ld/testsuite/ld-arm/farcall-thumb-thumb-m-pic-veneer.d b/ld/testsuite/ld-arm/farcall-thumb-thumb-m-pic-veneer.d index f8308ff37d..c96ea3f19a 100644 --- a/ld/testsuite/ld-arm/farcall-thumb-thumb-m-pic-veneer.d +++ b/ld/testsuite/ld-arm/farcall-thumb-thumb-m-pic-veneer.d @@ -1,5 +1,22 @@ -#name: Thumb-Thumb farcall M profile (PIC veneer) -#source: farcall-thumb-thumb.s -#as: -march=armv4t -#ld: -Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer -#error: .*\(.text\+0x0\): relocation truncated to fit: R_ARM_THM_CALL against `bar' +.*: file format .* + +Disassembly of section .text: + +00001000 <_start>: + 1000: f000 f802 bl 1008 <__bar_veneer> + 1004: 0000 lsls r0, r0, #0 + ... + +00001008 <__bar_veneer>: + 1008: b401 push {r0} + 100a: 4802 ldr r0, \[pc, #8\] \(1014 <__bar_veneer\+0xc>\) + 100c: 46fc mov ip, pc + 100e: 4484 add ip, r0 + 1010: bc01 pop {r0} + 1012: 4760 bx ip + 1014: 02000005 .word 0x02000005 + +Disassembly of section .foo: + +02001014 <bar>: + 2001014: 4770 bx lr diff --git a/ld/testsuite/ld-arm/farcall-thumb-thumb-pic-veneer.d b/ld/testsuite/ld-arm/farcall-thumb-thumb-pic-veneer.d index f97671bbf0..c96ea3f19a 100644 --- a/ld/testsuite/ld-arm/farcall-thumb-thumb-pic-veneer.d +++ b/ld/testsuite/ld-arm/farcall-thumb-thumb-pic-veneer.d @@ -1,5 +1,22 @@ -#name: Thumb-Thumb farcall without BLX (PIC veneer) -#source: farcall-thumb-thumb.s -#as: -march=armv4t -#ld: -Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer -#error: .*\(.text\+0x0\): relocation truncated to fit: R_ARM_THM_CALL against `bar' +.*: file format .* + +Disassembly of section .text: + +00001000 <_start>: + 1000: f000 f802 bl 1008 <__bar_veneer> + 1004: 0000 lsls r0, r0, #0 + ... + +00001008 <__bar_veneer>: + 1008: b401 push {r0} + 100a: 4802 ldr r0, \[pc, #8\] \(1014 <__bar_veneer\+0xc>\) + 100c: 46fc mov ip, pc + 100e: 4484 add ip, r0 + 1010: bc01 pop {r0} + 1012: 4760 bx ip + 1014: 02000005 .word 0x02000005 + +Disassembly of section .foo: + +02001014 <bar>: + 2001014: 4770 bx lr |