This is the mail archive of the binutils@sources.redhat.com 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]

ld testsuite fixes


More tweaks necessary to make the align test work, and fix warn1 for alpha.

	* ld-elf/warn1.d: Specify -Ttext.
	* ld-scripts/align.exp (align2a, align2b: Don't run on aout targets.
	* ld-scripts/align2.t: Discard all but .text and .data.
	* ld-scripts/align2a.d: Accept non-readonly for coff.
	* ld-scripts/align2b.d: Likewise.
	* lib/ld-lib.exp (is_aout_format): New function.

Index: ld/testsuite/ld-elf/warn1.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elf/warn1.d,v
retrieving revision 1.2
diff -u -p -r1.2 warn1.d
--- ld/testsuite/ld-elf/warn1.d	13 Feb 2005 18:50:25 -0000	1.2
+++ ld/testsuite/ld-elf/warn1.d	21 Feb 2005 06:14:07 -0000
@@ -1,7 +1,7 @@
 #source: start.s
 #source: symbol1ref.s
 #source: symbol1w.s
-#ld: 
+#ld: -Ttext 0x1000
 #warning: ^[^\\n]*\): warning: witty one-liner$
 #readelf: -s
 #notarget: "sparc64-*-solaris2*" "sparcv9-*-solaris2*"
Index: ld/testsuite/ld-scripts/align.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-scripts/align.exp,v
retrieving revision 1.3
diff -u -p -r1.3 align.exp
--- ld/testsuite/ld-scripts/align.exp	17 Feb 2005 20:57:01 -0000	1.3
+++ ld/testsuite/ld-scripts/align.exp	21 Feb 2005 06:14:08 -0000
@@ -35,6 +35,8 @@ if ![ld_simple_link $ld tmpdir/align "-T
     pass $testname
 }
 
-run_dump_test align2a
-run_dump_test align2b
+if ![is_aout_format] {
+    run_dump_test align2a
+    run_dump_test align2b
+}
 run_dump_test align2c
Index: ld/testsuite/ld-scripts/align2.t
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-scripts/align2.t,v
retrieving revision 1.1
diff -u -p -r1.1 align2.t
--- ld/testsuite/ld-scripts/align2.t	17 Feb 2005 20:57:01 -0000	1.1
+++ ld/testsuite/ld-scripts/align2.t	21 Feb 2005 06:14:08 -0000
@@ -3,4 +3,5 @@ SECTIONS
   .text : {*(.text)}
   . = ALIGN(data_align);
   .data : {*(.data)}
+  /DISCARD/ : {*(*)}
 }
Index: ld/testsuite/ld-scripts/align2a.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-scripts/align2a.d,v
retrieving revision 1.2
diff -u -p -r1.2 align2a.d
--- ld/testsuite/ld-scripts/align2a.d	18 Feb 2005 01:55:16 -0000	1.2
+++ ld/testsuite/ld-scripts/align2a.d	21 Feb 2005 06:14:08 -0000
@@ -6,7 +6,7 @@
 Sections:
 Idx +Name +Size +VMA +LMA +File +off +Algn
  +0 +\.text +[^ ]* +0+ +0+ .*
- +CONTENTS, +ALLOC, +LOAD, +READONLY, +CODE
+ +CONTENTS, +ALLOC, +LOAD,.* CODE
  +1 +\.data +[^ ]* +0+10 +0+10 .*
  +CONTENTS, +ALLOC, +LOAD, +DATA
 #pass
Index: ld/testsuite/ld-scripts/align2b.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-scripts/align2b.d,v
retrieving revision 1.2
diff -u -p -r1.2 align2b.d
--- ld/testsuite/ld-scripts/align2b.d	18 Feb 2005 01:55:16 -0000	1.2
+++ ld/testsuite/ld-scripts/align2b.d	21 Feb 2005 06:14:08 -0000
@@ -6,7 +6,7 @@
 Sections:
 Idx +Name +Size +VMA +LMA +File off +Algn
  +0 +\.text +[^ ]* +0+ +0+ .*
- +CONTENTS, +ALLOC, +LOAD, +READONLY, +CODE
+ +CONTENTS, +ALLOC, +LOAD,.* CODE
  +1 +\.data +[^ ]* +0+20 +0+20 .*
  +CONTENTS, +ALLOC, +LOAD, +DATA
 #pass
Index: ld/testsuite/lib/ld-lib.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/lib/ld-lib.exp,v
retrieving revision 1.29
diff -u -p -r1.29 ld-lib.exp
--- ld/testsuite/lib/ld-lib.exp	7 Feb 2005 02:38:43 -0000	1.29
+++ ld/testsuite/lib/ld-lib.exp	21 Feb 2005 06:14:14 -0000
@@ -417,6 +417,36 @@ proc is_elf64 { binary_file } {
 }
 
 #
+# is_aout_format
+#	true if the object format is known to be aout
+proc is_aout_format {} {
+    if { [istarget *-*-*\[ab\]out*] \
+	     || [istarget *-*-linux*oldld*] \
+	     || [istarget *-*-msdos*] \
+	     || [istarget arm-*-netbsd] \
+	     || [istarget i?86-*-netbsd] \
+	     || [istarget i?86-*-mach*] \
+	     || [istarget i?86-*-vsta] \
+	     || [istarget pdp11-*-*] \
+	     || [istarget m68*-ericsson-ose] \
+	     || [istarget m68k-hp-bsd*] \
+	     || [istarget m68*-*-hpux*] \
+	     || [istarget m68*-*-netbsd] \
+	     || [istarget m68*-*-netbsd*4k*] \
+	     || [istarget m68k-sony-*] \
+	     || [istarget m68*-sun-sunos\[34\]*] \
+	     || [istarget m68*-wrs-vxworks*] \
+	     || [istarget ns32k-*-*] \
+	     || [istarget sparc*-*-netbsd] \
+	     || [istarget sparc-sun-sunos4*] \
+	     || [istarget vax-dec-ultrix*] \
+	     || [istarget vax-*-netbsd] } {
+	return 1
+    }
+    return 0
+}
+
+#
 # is_pecoff_format
 #	true if the object format is known to be PECOFF
 #

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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