diff options
author | Andre Vieria <andre.simoesdiasvieira@arm.com> | 2016-07-05 11:39:06 +0100 |
---|---|---|
committer | Richard Earnshaw <Richard.Earnshaw@arm.com> | 2016-07-05 11:39:06 +0100 |
commit | d5a67c02901c0abe946546f2b3b1a3b67a876136 (patch) | |
tree | 795164805b191fd91aeb8bb584ab88e8d337b2b4 /ld | |
parent | f0728ee368f217f2473798ad7ccfe9feae4412ce (diff) | |
download | fsf-binutils-gdb-d5a67c02901c0abe946546f2b3b1a3b67a876136.zip fsf-binutils-gdb-d5a67c02901c0abe946546f2b3b1a3b67a876136.tar.gz fsf-binutils-gdb-d5a67c02901c0abe946546f2b3b1a3b67a876136.tar.bz2 |
[ARM] Purecode compatible long branch veneer for M-profile targets with MOVW.
2016-07-05 Andre Vieria <andre.simoesdiasvieira@arm.com>
* elf32-arm.c (THUMB32_MOVT): New veneer macro.
(THUMB32_MOVW): Likewise.
(elf32_arm_stub_long_branch_thumb2_only_pure): New.
(DEF_STUBS): Define long_branch_thumb2_only_pure.
(arm_stub_is_thumb): Add new veneer stub.
(arm_type_of_stub): Use new veneer.
(arm_stub_required_alignment): Add new veneer.
2016-07-05 Andre Vieria <andre.simoesdiasvieira@arm.com>
* testsuite/ld-arm/farcall-thumb2-purecode.d: New test result.
* testsuite/ld-arm/farcall-thumb2-purecode.s: New test.
* testsuite/ld-arm/arm-elf.exp: Run it.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/arm-elf.exp | 3 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/farcall-thumb2-purecode.d | 22 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/farcall-thumb2-purecode.s | 19 |
4 files changed, 50 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index cc598af..6ee54fc 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,5 +1,11 @@ 2016-07-05 Andre Vieria <andre.simoesdiasvieira@arm.com> + * testsuite/ld-arm/farcall-thumb2-purecode.d: New test result. + * testsuite/ld-arm/farcall-thumb2-purecode.s: New test. + * testsuite/ld-arm/arm-elf.exp: Run it. + +2016-07-05 Andre Vieria <andre.simoesdiasvieira@arm.com> + * testsuite/ld-arm/arm_noread.ld: Renamed to ... testsuite/ld-arm/arm_purecode.ld: ... this, and replaced all noread's by purecode. diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp index 597bdcf..d0c9a2f 100644 --- a/ld/testsuite/ld-arm/arm-elf.exp +++ b/ld/testsuite/ld-arm/arm-elf.exp @@ -505,6 +505,9 @@ set armeabitests_nonacl { {farcall-thumb-thumb-m-no-profile-a.s farcall-thumb-thumb-m-no-profile-b.s} {{objdump -d farcall-thumb-thumb-m-no-profile.d}} "farcall-thumb-thumb-m-no-profile"} + {"Thumb2 purecode farcall" "-Ttext 0x1000 --section-start .foo=0x2001020" "" "" {farcall-thumb2-purecode.s} + {{objdump -d farcall-thumb2-purecode.d}} + "farcall-thumb2-purecode"} {"Thumb-ARM farcall" "-Ttext 0x1c01010 --section-start .foo=0x2001014" "" "-W" {farcall-thumb-arm.s} {{objdump -d farcall-thumb-arm.d}} diff --git a/ld/testsuite/ld-arm/farcall-thumb2-purecode.d b/ld/testsuite/ld-arm/farcall-thumb2-purecode.d new file mode 100644 index 0000000..2a62fe4 --- /dev/null +++ b/ld/testsuite/ld-arm/farcall-thumb2-purecode.d @@ -0,0 +1,22 @@ +.*: file format .* + +Disassembly of section .text: + +00001000 <bar>: + 1000: 4770 bx lr + +Disassembly of section .foo: + +02001020 <_start>: + 2001020: f000 f802 bl 2001028 <__bar_veneer> + 2001024: 0000 movs r0, r0 + \.\.\. + +02001028 <__bar_veneer>: + 2001028: f241 0c01 movw ip, #4097 ; 0x1001 + 200102c: f2c0 0c00 movt ip, #0 + 2001030: 4760 bx ip + 2001032: 0000 movs r0, r0 + 2001034: 0000 movs r0, r0 + \.\.\. + diff --git a/ld/testsuite/ld-arm/farcall-thumb2-purecode.s b/ld/testsuite/ld-arm/farcall-thumb2-purecode.s new file mode 100644 index 0000000..a16731a --- /dev/null +++ b/ld/testsuite/ld-arm/farcall-thumb2-purecode.s @@ -0,0 +1,19 @@ +@ Test to ensure that a purecode Thumb2 call exceeding 4Mb generates a stub. + + .global _start + .syntax unified + .arch armv7-m + .thumb + .thumb_func + +@ We will place the section .text at 0x1000. + + .text +bar: + bx lr + +@ We will place the section .foo at 0x02001014. + + .section .foo, "0x20000006" +_start: + bl bar |