From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14555 invoked by alias); 21 Feb 2005 08:21:38 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 14487 invoked from network); 21 Feb 2005 08:21:28 -0000 Received: from unknown (HELO gizmo10bw.bigpond.com) (144.140.70.20) by sourceware.org with SMTP; 21 Feb 2005 08:21:28 -0000 Received: (qmail 25927 invoked from network); 21 Feb 2005 08:21:25 -0000 Received: from unknown (HELO bwmam12.bigpond.com) (144.135.24.103) by gizmo10bw.bigpond.com with SMTP; 21 Feb 2005 08:21:25 -0000 Received: from cpe-144-136-221-26.sa.bigpond.net.au ([144.136.221.26]) by bwmam12.bigpond.com(MAM REL_3_4_2a 189/9874599) with SMTP id 9874599; Mon, 21 Feb 2005 18:21:25 +1000 Received: by bubble.modra.org (Postfix, from userid 500) id 5018318EFC9; Mon, 21 Feb 2005 18:51:25 +1030 Date: Mon, 21 Feb 2005 13:56:00 -0000 From: Alan Modra To: binutils@sources.redhat.com Subject: ld testsuite fixes Message-ID: <20050221082125.GG3780@bubble.modra.org> Mail-Followup-To: binutils@sources.redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-SW-Source: 2005-02/txt/msg00459.txt.bz2 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