From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7448 invoked by alias); 21 Feb 2005 15:51:18 -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 6996 invoked from network); 21 Feb 2005 15:51:01 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 21 Feb 2005 15:51:01 -0000 Received: from drow by nevyn.them.org with local (Exim 4.44 #1 (Debian)) id 1D3Fpp-00050c-2X for ; Mon, 21 Feb 2005 10:50:57 -0500 Date: Mon, 21 Feb 2005 18:30:00 -0000 From: Daniel Jacobowitz To: binutils@sources.redhat.com Subject: More MIPS testsuite fixes Message-ID: <20050221155056.GA19151@nevyn.them.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.5.6+20040907i X-SW-Source: 2005-02/txt/msg00468.txt.bz2 hidden2 needs to use .type, because MIPS defaults to OBJECT. It also needs to place .dynamic; this is because the PT_DYNAMIC segment on MIPS includes .dynsym, and orphan placement will happen to place .dynamic after .dynsym, which ld complains about. ld-elf/start.s needs to provide __start since that's the default entry point on MIPS. warn1.d needs to use a linker script without SIZEOF_HEADERS, because mips-linux will have a SEC_ALLOC reginfo section, which the linker script places up after 0x400000. So we run out of program headers. Using group.ld should handle the Alpha case as well as -Ttext did. Alan, I gather you have a list of targets that you run through the testsuite for; could you add mips-linux? Is the patch OK? -- Daniel Jacobowitz CodeSourcery, LLC 2005-02-21 Daniel Jacobowitz * ld-elfvsb/hidden2.d: Expect OBJECT. * ld-elfvsb/hidden2.s: Force type OBJECT. * ld-elfvsb/hidden2.ld: Place .dynamic explicitly. * ld-elf/start.s: Provide __start for MIPS. * ld-elfcomm/elfcomm.exp: Accept MIPS common section. XFAIL size change test. * ld-elf/warn1.d: Use group.ld instead of -Ttext. Index: binutils/ld/testsuite/ld-elfvsb/hidden2.d =================================================================== --- binutils.orig/ld/testsuite/ld-elfvsb/hidden2.d 2005-02-10 09:09:43.000000000 -0500 +++ binutils/ld/testsuite/ld-elfvsb/hidden2.d 2005-02-21 09:38:31.167154608 -0500 @@ -5,5 +5,5 @@ Symbol table for image: #... -[ ]*[0-9]+ +[0-9]+: [0-9a-fA-F]* +0 NOTYPE LOCAL HIDDEN +ABS foo +[ ]*[0-9]+ +[0-9]+: [0-9a-fA-F]* +0 OBJECT LOCAL HIDDEN +ABS foo #pass Index: binutils/ld/testsuite/ld-elfvsb/hidden2.ld =================================================================== --- binutils.orig/ld/testsuite/ld-elfvsb/hidden2.ld 2005-02-14 11:54:32.000000000 -0500 +++ binutils/ld/testsuite/ld-elfvsb/hidden2.ld 2005-02-21 09:38:31.167154608 -0500 @@ -3,4 +3,5 @@ SECTIONS . = 0x1000; PROVIDE (foo = .); .data : { *(.data) } + .dynamic : { *(.dynamic) } } Index: binutils/ld/testsuite/ld-elfvsb/hidden2.s =================================================================== --- binutils.orig/ld/testsuite/ld-elfvsb/hidden2.s 2005-02-21 09:37:18.221944952 -0500 +++ binutils/ld/testsuite/ld-elfvsb/hidden2.s 2005-02-21 09:38:49.649752748 -0500 @@ -1,4 +1,5 @@ .data .hidden foo .global foo + .type foo,%object .dc.a foo Index: binutils/ld/testsuite/ld-elf/start.s =================================================================== --- binutils.orig/ld/testsuite/ld-elf/start.s 2005-02-06 21:46:15.000000000 -0500 +++ binutils/ld/testsuite/ld-elf/start.s 2005-02-21 09:38:31.168154425 -0500 @@ -1,4 +1,6 @@ .text .global _start _start: + .global __start +__start: .long 0 Index: binutils/ld/testsuite/ld-elfcomm/elfcomm.exp =================================================================== --- binutils.orig/ld/testsuite/ld-elfcomm/elfcomm.exp 2003-06-17 23:38:05.000000000 -0400 +++ binutils/ld/testsuite/ld-elfcomm/elfcomm.exp 2005-02-21 09:38:31.168154425 -0500 @@ -45,7 +45,7 @@ proc dump_common1 { testname } { send_log "$READELF -s tmpdir/common1.o | grep foo\n" catch "exec $READELF -s tmpdir/common1.o | grep foo" exec_output - if { ![regexp "(\[ \]*)(\[0-9\]+):(\[ \]*)(\[0\]*)80(\[ \]+)4(\[ \]+)OBJECT(\[ \]+)GLOBAL(\[ \]+)DEFAULT(\[ \]+)COM(\[ \]+)_?foo2" $exec_output] + if { ![regexp "(\[ \]*)(\[0-9\]+):(\[ \]*)(\[0\]*)80(\[ \]+)4(\[ \]+)OBJECT(\[ \]+)GLOBAL(\[ \]+)DEFAULT(\[ \]+)(PRC\\\[0xff03\\\]|COM)(\[ \]+)_?foo2" $exec_output] || ![regexp "(\[ \]*)(\[0-9\]+):(\[ \]*)(\[0-9\]+)(\[ \]+)21(\[ \]+)OBJECT(\[ \]+)GLOBAL(\[ \]+)DEFAULT(\[ \]+)(\[0-9\]+)(\[ \]+)_?foo1" $exec_output] } { send_log "$exec_output\n" verbose $exec_output @@ -72,7 +72,13 @@ if { [ld_simple_link $ld tmpdir/common1. if { ![regexp "Warning: alignment (\[0-9\]+) of symbol \`_?foo1\' in tmpdir/common1b.o is smaller than 64 in tmpdir/common1a.o" $link_output] || ![regexp "Warning: size of symbol \`_?foo1\' changed from 2 in tmpdir/common1a.o to 21 in tmpdir/common1b.o" $link_output] } { - fail $test1w1 + if { [istarget mips*-*-*] } { + # This test fails on MIPS because the backend sets type_change_ok. The + # size change warning is suppressed. + xfail $test1w1 + } else { + fail $test1w1 + } } else { pass $test1w1 } Index: binutils/ld/testsuite/ld-elf/warn1.d =================================================================== --- binutils.orig/ld/testsuite/ld-elf/warn1.d 2005-02-21 09:37:17.218112989 -0500 +++ binutils/ld/testsuite/ld-elf/warn1.d 2005-02-21 10:39:19.599477177 -0500 @@ -1,7 +1,7 @@ #source: start.s #source: symbol1ref.s #source: symbol1w.s -#ld: -Ttext 0x1000 +#ld: -T group.ld #warning: ^[^\\n]*\): warning: witty one-liner$ #readelf: -s #notarget: "sparc64-*-solaris2*" "sparcv9-*-solaris2*"