[GOLD][PATCH] Fix test regressions for ARM.

Doug Kwan (關振德) dougkwan@google.com
Wed Sep 15 08:52:00 GMT 2010
Hi,

    This patch fixes a number of regressions in the test suite.  We
need to add special ARM sections .ARM.exidx and .ARM.extab for some of
the section script tests.  These special sections are required also by
the GNU ld to link the same tests.  For non-ARM targets, the special
sections should be ignored.  I also fixed an alignment bug in one of
the test case.   I tested this on both x86_64 and ARM.  On the x86_64
all tests passed except the memory_test, which was a known issue.  On
ARM, all tests passed except the memory tests and the
incremental_test, which were expected to fail.

-Doug


2010-09-15  Doug Kwan  <dougkwan@google.com>

        * gold/testsuite/script_test_3.t: Add ARM special sections.
        * gold/testsuite/script_test_4.t: Same.
        * gold/testsuite/script_test_5.t: Same.
        * gold/testsuite/script_test_6.t: Same.
        * gold/testsuite/script_test_7.t: Same.
        * gold/testsuite/script_test_7.t: Same.
        * gold/testsuite/thumb_blx_out_of_range.s: Fix instruction alignment.
-------------- next part --------------
? ld/testsuite/ld-arm/.arm-elf.exp.swp
Index: gold/testsuite/script_test_3.t
===================================================================
RCS file: /cvs/src/src/gold/testsuite/script_test_3.t,v
retrieving revision 1.4
diff -u -u -p -r1.4 script_test_3.t
--- gold/testsuite/script_test_3.t	23 Apr 2010 04:47:33 -0000	1.4
+++ gold/testsuite/script_test_3.t	15 Sep 2010 04:34:34 -0000
@@ -28,6 +28,9 @@ SECTIONS
   /* With luck this will be enough to get the program working.  */
   .interp : { *(.interp) } :text :interp
   .text : { *(.text) } :text
+  /* Required by the ARM target. */
+  .ARM.extab : { *(.ARM.extab*) }
+  .ARM.exidx : { *(.ARM.exidx*) }
   . += 0x100000;
   . = ALIGN(0x100);
   .dynamic : { *(.dynamic) } :data :dynamic
Index: gold/testsuite/script_test_4.t
===================================================================
RCS file: /cvs/src/src/gold/testsuite/script_test_4.t,v
retrieving revision 1.1
diff -u -u -p -r1.1 script_test_4.t
--- gold/testsuite/script_test_4.t	15 Apr 2008 22:50:37 -0000	1.1
+++ gold/testsuite/script_test_4.t	15 Sep 2010 04:34:34 -0000
@@ -30,6 +30,9 @@ SECTIONS
   /* With luck this will be enough to get the program working.  */
   .interp : { *(.interp) }
   .text : { *(.text) }
+  /* Required by the ARM target. */
+  .ARM.extab : { *(.ARM.extab*) }
+  .ARM.exidx : { *(.ARM.exidx*) }
   . += 0x100000;
   . = ALIGN(0x100);
   .dynamic : { *(.dynamic) }
Index: gold/testsuite/script_test_5.t
===================================================================
RCS file: /cvs/src/src/gold/testsuite/script_test_5.t,v
retrieving revision 1.1
diff -u -u -p -r1.1 script_test_5.t
--- gold/testsuite/script_test_5.t	25 Feb 2009 19:05:21 -0000	1.1
+++ gold/testsuite/script_test_5.t	15 Sep 2010 04:34:34 -0000
@@ -30,6 +30,9 @@ SECTIONS
   /* With luck this will be enough to get the program working.  */
   .interp : { *(.interp) }
   .text : { *(.text) }
+  /* Required by the ARM target. */
+  .ARM.extab : { *(.ARM.extab*) }
+  .ARM.exidx : { *(.ARM.exidx*) }
   . += 0x100000;
   . = ALIGN(0x100);
   .dynamic : { *(.dynamic) }
Index: gold/testsuite/script_test_6.t
===================================================================
RCS file: /cvs/src/src/gold/testsuite/script_test_6.t,v
retrieving revision 1.1
diff -u -u -p -r1.1 script_test_6.t
--- gold/testsuite/script_test_6.t	16 Oct 2009 18:56:07 -0000	1.1
+++ gold/testsuite/script_test_6.t	15 Sep 2010 04:34:34 -0000
@@ -31,6 +31,9 @@ SECTIONS
   .interp : { *(.interp) }
   .text : { *(.text .text.*) }
   .rodata : { *(.rodata .rodata.*) }
+  /* Required by the ARM target. */
+  .ARM.extab : { *(.ARM.extab*) }
+  .ARM.exidx : { *(.ARM.exidx*) }
   . += 0x100000;
   . = ALIGN(0x100);
   .dynamic : { *(.dynamic) }
Index: gold/testsuite/script_test_7.t
===================================================================
RCS file: /cvs/src/src/gold/testsuite/script_test_7.t,v
retrieving revision 1.1
diff -u -u -p -r1.1 script_test_7.t
--- gold/testsuite/script_test_7.t	16 Oct 2009 18:56:07 -0000	1.1
+++ gold/testsuite/script_test_7.t	15 Sep 2010 04:34:34 -0000
@@ -31,6 +31,9 @@ SECTIONS
   .interp : { *(.interp) }
   .text : { *(.text .text.*) }
   .rodata : { *(.rodata .rodata.*) }
+  /* Required by the ARM target. */
+  .ARM.extab : { *(.ARM.extab*) }
+  .ARM.exidx : { *(.ARM.exidx*) }
   .dynamic : { *(.dynamic) }
 
   . = SEGMENT_START(".data", 0x10200000);
Index: gold/testsuite/thumb_blx_out_of_range.s
===================================================================
RCS file: /cvs/src/src/gold/testsuite/thumb_blx_out_of_range.s,v
retrieving revision 1.2
diff -u -u -p -r1.2 thumb_blx_out_of_range.s
--- gold/testsuite/thumb_blx_out_of_range.s	8 Sep 2010 23:54:51 -0000	1.2
+++ gold/testsuite/thumb_blx_out_of_range.s	15 Sep 2010 04:34:34 -0000
@@ -5,7 +5,7 @@
 	.section	.text.pre,"x"
 
 # Add padding so that target is just output of branch range. 
-	.space	6
+	.space	4
 
 	.global	_forward_target
 	.global	_backward_target


More information about the Binutils mailing list