This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
RE: [PATCH, ARM 4/7] Add support for linking ARMv8-M object files
- From: "Thomas Preud'homme" <thomas dot preudhomme at foss dot arm dot com>
- To: "Richard Earnshaw" <Richard dot Earnshaw at arm dot com>, <binutils at sourceware dot org>
- Date: Sat, 26 Dec 2015 10:42:36 +0800
- Subject: RE: [PATCH, ARM 4/7] Add support for linking ARMv8-M object files
- Authentication-results: sourceware.org; auth=none
- References: <001d01d13873$10d9aab0$328d0010$ at foss dot arm dot com> <56741D1E dot 50203 at arm dot com> <004301d13d4f$dc651da0$952f58e0$ at foss dot arm dot com> <567AA9D5 dot 3050705 at arm dot com> <000401d13e2e$bf66d420$3e347c60$ at foss dot arm dot com>
> From: binutils-owner@sourceware.org [mailto:binutils-
> owner@sourceware.org] On Behalf Of Thomas Preud'homme
> Sent: Thursday, December 24, 2015 5:38 PM
>
> >
> > As a follow-up could you please convert the example I gave into a
> > testcase? I'll pre-approve that :-)
>
> Will do tomorrow, as a nice Christmas gift :-)
One day late but here you go:
*** ld/testsuite/ChangeLog ***
2015-12-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
* ld-arm/arm-elf.exp: Run new test "Thumb-Thumb farcall v6-M (no
profile)".
* ld-arm/farcall-thumb-thumb-m-no-profile-a.s: New file.
* ld-arm/farcall-thumb-thumb-m-no-profile-b.s: Likewise.
* ld-arm/farcall-thumb-thumb-m-no-profile.d: Likewise.
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 879aab4..bcbd203 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2015-12-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ * ld-arm/arm-elf.exp: Run new test "Thumb-Thumb farcall v6-M (no
+ profile)".
+ * ld-arm/farcall-thumb-thumb-m-no-profile-a.s: New file.
+ * ld-arm/farcall-thumb-thumb-m-no-profile-b.s: Likewise.
+ * ld-arm/farcall-thumb-thumb-m-no-profile.d: Likewise.
+
2015-12-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
* ld-arm/arm-elf.exp (armeabitests_common): Run new tests
diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp
index 724e338..2a10177 100644
--- a/ld/testsuite/ld-arm/arm-elf.exp
+++ b/ld/testsuite/ld-arm/arm-elf.exp
@@ -481,6 +481,10 @@ set armeabitests_nonacl {
{"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-Thumb farcall v6-M (no profile)" "-Ttext 0x1000" "" ""
+ {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"}
{"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-thumb-thumb-m-no-profile-a.s b/ld/testsuite/ld-arm/farcall-thumb-thumb-m-no-profile-a.s
new file mode 100644
index 0000000..cecd5a5
--- /dev/null
+++ b/ld/testsuite/ld-arm/farcall-thumb-thumb-m-no-profile-a.s
@@ -0,0 +1,8 @@
+ .eabi_attribute Tag_CPU_arch, 11 @ V6-M
+ .thumb
+ .type _start, function
+ .global _start
+ .text
+_start:
+ bl myfunc
+ b .
diff --git a/ld/testsuite/ld-arm/farcall-thumb-thumb-m-no-profile-b.s b/ld/testsuite/ld-arm/farcall-thumb-thumb-m-no-profile-b.s
new file mode 100644
index 0000000..6590021
--- /dev/null
+++ b/ld/testsuite/ld-arm/farcall-thumb-thumb-m-no-profile-b.s
@@ -0,0 +1,8 @@
+ .eabi_attribute Tag_CPU_arch, 11 @ V6-M
+ .thumb
+ .type myfunc, function
+ .global myfunc
+ .text
+ .space 102400000
+myfunc:
+ bx lr
diff --git a/ld/testsuite/ld-arm/farcall-thumb-thumb-m-no-profile.d b/ld/testsuite/ld-arm/farcall-thumb-thumb-m-no-profile.d
new file mode 100644
index 0000000..639fe5a
--- /dev/null
+++ b/ld/testsuite/ld-arm/farcall-thumb-thumb-m-no-profile.d
@@ -0,0 +1,24 @@
+.*: file format .*
+
+Disassembly of section .text:
+
+00001000 <_start>:
+ 1000: f000 f802 bl 1008 <__myfunc_veneer>
+ 1004: e7fe b.n 1004 <_start\+0x4>
+ \.\.\.
+
+00001008 <__myfunc_veneer>:
+ 1008: b401 push {r0}
+ 100a: 4802 ldr r0, \[pc, #8\] ; \(1014 <__myfunc_veneer\+0xc>\)
+ 100c: 4684 mov ip, r0
+ 100e: bc01 pop {r0}
+ 1010: 4760 bx ip
+ 1012: bf00 nop
+ 1014: 061a9019 .word 0x061a9019
+ \.\.\.
+
+00080000 <_stack>:
+ \.\.\.
+
+061a9018 <myfunc>:
+ 61a9018: 4770 bx lr
Best regards,
Thomas