This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, ARM] Fix Thumb-Thumb farcall v6-M (no profile) test


Hi,

Expected objdump output for test "Thumb-Thumb farcall v6-M (no profile)" 
account for the _stack symbol created by the default linker script. However, 
not all systems have the same linker script so the test fail for some 
platform. This patch follows what other farcall tests do: place the target of 
the bl call into a separate section. This way, the code sections (.text and 
.foo) are restricted to the function and veneers and do not encompass the 
address of _stack symbol if any, preventing objdump from displaying it.

ChangeLog entry is as follows:


*** ld/testsuite/ChangeLog ***

2016-01-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>

        * ld-arm/arm-elf.exp (Thumb-Thumb farcall v6-M (no profile)): Set
        address of .foo section when linking.
        * ld-arm/farcall-thumb-thumb-m-no-profile-b.s: Place myfunc in .foo
        section.
        * ld-arm/farcall-thumb-thumb-m-no-profile.d: Adapt expected output to
        the above changes.


diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp
index 1c5d3c1fe1c132f4854cae2be8f37bdafa9fc86e..
59992fb572f9026836186b1556ba06c95066506a 100644
--- a/ld/testsuite/ld-arm/arm-elf.exp
+++ b/ld/testsuite/ld-arm/arm-elf.exp
@@ -481,7 +481,7 @@ 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" "" ""
+    {"Thumb-Thumb farcall v6-M (no profile)" "-Ttext 0x1000 --section-start 
.foo=0x2001014" "" ""
      {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"}
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
index 
6590021351d77fa321fde23d5b05bb4ce5a7d612..7212be05a36b432d34a6debb52e506590d2bbc68 
100644
--- 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
@@ -2,7 +2,6 @@
 	.thumb
 	.type myfunc, function
 	.global myfunc
-	.text
-	.space 102400000
+	.section .foo, "xa"
 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
index 639fe5aa9f2d47e439d0bfde79a6a945b89589af..
7d89b52e0205e147a1371e54f0b2936461976c38 100644
--- a/ld/testsuite/ld-arm/farcall-thumb-thumb-m-no-profile.d
+++ b/ld/testsuite/ld-arm/farcall-thumb-thumb-m-no-profile.d
@@ -14,11 +14,9 @@ Disassembly of section .text:
     100e:	bc01      	pop	{r0}
     1010:	4760      	bx	ip
     1012:	bf00      	nop
-    1014:	061a9019 	.word	0x061a9019
-	\.\.\.
+    1014:	02001015 	.word	0x02001015
 
-00080000 <_stack>:
-	\.\.\.
+Disassembly of section .foo:
 
-061a9018 <myfunc>:
- 61a9018:	4770      	bx	lr
+02001014 <myfunc>:
+ 2001014:	4770      	bx	lr


Is this ok for master branch?

Best regards,

Thomas


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]