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]

Re: New failures in linker testsuite for arm-elf targets


Hi Nick,

I suggest a simple solution - rearrange the order of the tests in arm-elf.exp so that the farcall support ones are all in the "armeabitests" list. Add a comment explaining that the farcall support is only EABI ARM (to arm-elf.exp and also ld.texinfo) and test to make sure that both arm-eabi and arm-elf toolchains now have reasonable results from the linker testsuite.


Here is my proposal: I have moved the farcalls-related tests to a section passed only for ARM-EABI, and I have reverted two tests to their contents prior farcalls support for other targets.


Regards,

Christophe.
2008-05-27  Christophe Lyon  <christophe.lyon@st.com>
	
	ld/testsuite/
	* ld-arm/arm-elf.exp: Skip farcalls tests for non-ARM-EABI
	targets.
	* ld-arm/thumb2-bl-as-thumb1-bad-noeabi.d: New file.
	* ld-arm/thumb2-bl-bad-noeabi.d: Likewise.

	ld/
	* ld.texinfo: State that farcalls stubs are supported for ARM-EABI
	only.
Index: ld/testsuite/ld-arm/arm-elf.exp
===================================================================
--- ld/testsuite/ld-arm/arm-elf.exp	(revision 747)
+++ ld/testsuite/ld-arm/arm-elf.exp	(working copy)
@@ -182,6 +182,37 @@ set armelftests {
     {"callweak" "-static -T arm.ld" "" {callweak.s}
      {{objdump -dr callweak.d}}
      "callweak"}
+}
+
+run_ld_link_tests $armelftests
+run_dump_test "group-relocs-alu-bad"
+run_dump_test "group-relocs-ldr-bad"
+run_dump_test "group-relocs-ldrs-bad"
+run_dump_test "group-relocs-ldc-bad"
+run_dump_test "emit-relocs1"
+
+# Exclude non-ARM-EABI targets.
+
+if { ![istarget "arm*-*-*eabi"] } {
+    # Special variants of these tests, as no farcall stub is generated
+    # for a non-ARM-EABI target
+    run_dump_test "thumb2-bl-as-thumb1-bad-noeabi"
+    run_dump_test "thumb2-bl-bad-noeabi"
+    return
+}
+
+# Farcalls stubs are fully supported for ARM-EABI only
+set armeabitests {
+     {"EABI attribute merging" "-r" "" {attr-merge.s attr-merge.s}
+      {{readelf -A attr-merge.attr}}
+      "attr-merge"}
+     {"EABI attribute merging 2" "-r" "" {attr-merge-2a.s attr-merge-2b.s}
+      {{readelf -A attr-merge-2.attr}}
+      "attr-merge-2"}
+     {"Thumb-2 BL" "-Ttext 0x1000 --section-start .foo=0x1001000" "" {thumb2-bl.s}
+      {{objdump -dr thumb2-bl.d}}
+      "thumb2-bl"}
+
     {"Thumb-2-as-Thumb-1 BL" "-Ttext 0x1000 --section-start .foo=0x40100c" "" {thumb2-bl-as-thumb1-bad.s}
      {{objdump -d thumb2-bl-as-thumb1-bad.d}}
      "thumb2-bl-as-thumb1-bad"}
@@ -247,34 +278,9 @@ set armelftests {
      "farcall-group-size2"}
 }
 
-run_ld_link_tests $armelftests
-run_dump_test "group-relocs-alu-bad"
-run_dump_test "group-relocs-ldr-bad"
-run_dump_test "group-relocs-ldrs-bad"
-run_dump_test "group-relocs-ldc-bad"
-run_dump_test "emit-relocs1"
+run_ld_link_tests $armeabitests
 run_dump_test "farcall-thumb-thumb"
 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"
-
-# Exclude non-ARM-EABI targets.
-
-if { ![istarget "arm*-*-*eabi"] } {
-    return
-}
-
-set armeabitests {
-     {"EABI attribute merging" "-r" "" {attr-merge.s attr-merge.s}
-      {{readelf -A attr-merge.attr}}
-      "attr-merge"}
-     {"EABI attribute merging 2" "-r" "" {attr-merge-2a.s attr-merge-2b.s}
-      {{readelf -A attr-merge-2.attr}}
-      "attr-merge-2"}
-     {"Thumb-2 BL" "-Ttext 0x1000 --section-start .foo=0x1001000" "" {thumb2-bl.s}
-      {{objdump -dr thumb2-bl.d}}
-      "thumb2-bl"}
-}
-
-run_ld_link_tests $armeabitests
Index: ld/testsuite/ld-arm/thumb2-bl-as-thumb1-bad-noeabi.d
===================================================================
--- ld/testsuite/ld-arm/thumb2-bl-as-thumb1-bad-noeabi.d	(revision 0)
+++ ld/testsuite/ld-arm/thumb2-bl-as-thumb1-bad-noeabi.d	(revision 0)
@@ -0,0 +1,4 @@
+#name: Thumb-2-as-Thumb-1 BL failure test
+#source: thumb2-bl-as-thumb1-bad.s
+#ld: -Ttext 0x1000 --section-start .foo=0x401004
+#error: .*\(.text\+0x0\): relocation truncated to fit: R_ARM_THM_CALL against `bar'
Index: ld/testsuite/ld-arm/thumb2-bl-bad-noeabi.d
===================================================================
--- ld/testsuite/ld-arm/thumb2-bl-bad-noeabi.d	(revision 0)
+++ ld/testsuite/ld-arm/thumb2-bl-bad-noeabi.d	(revision 0)
@@ -0,0 +1,4 @@
+#name: Thumb-2 BL failure test
+#source: thumb2-bl-bad.s
+#ld: -Ttext 0x1000 --section-start .foo=0x1001004
+#error: .*\(.text\+0x0\): relocation truncated to fit: R_ARM_THM_CALL against `bar'
Index: ld/ld.texinfo
===================================================================
--- ld.texinfo  2008-05-27 15:33:25.000000000 +0200
+++ ld.texinfo.patched  2008-05-27 15:59:45.000000000 +0200
@@ -5713,6 +5713,10 @@
 The default, if @option{--stub-group-size=} is not specified, is
 @samp{N = +1}.

+Farcalls stubs insertion is fully supported for the ARM-EABI target
+only, because it relies on object files properties not present
+otherwise.
+
 @ifclear GENERIC
 @lowersections
 @end ifclear

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