From a5e0d2699d4423026958f6fef00c68202e56686e Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 22 Feb 2005 18:29:20 +0000 Subject: [PATCH] * 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. --- ld/testsuite/ChangeLog | 10 ++++++++++ ld/testsuite/ld-elf/start.s | 2 ++ ld/testsuite/ld-elf/warn1.d | 2 +- ld/testsuite/ld-elfcomm/elfcomm.exp | 10 ++++++++-- ld/testsuite/ld-elfvsb/hidden2.d | 2 +- ld/testsuite/ld-elfvsb/hidden2.ld | 1 + ld/testsuite/ld-elfvsb/hidden2.s | 1 + 7 files changed, 24 insertions(+), 4 deletions(-) diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 6b9f5fb2f7..bebbb15ab3 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2005-02-22 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. + 2005-02-21 Alan Modra * lib/ld-lib.exp (run_dump_test): Don't require a dump program if diff --git a/ld/testsuite/ld-elf/start.s b/ld/testsuite/ld-elf/start.s index f4c8af64e9..86fc17c240 100644 --- a/ld/testsuite/ld-elf/start.s +++ b/ld/testsuite/ld-elf/start.s @@ -1,4 +1,6 @@ .text .global _start _start: + .global __start +__start: .long 0 diff --git a/ld/testsuite/ld-elf/warn1.d b/ld/testsuite/ld-elf/warn1.d index 80f32b9149..d5ee7b4525 100644 --- a/ld/testsuite/ld-elf/warn1.d +++ b/ld/testsuite/ld-elf/warn1.d @@ -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*" diff --git a/ld/testsuite/ld-elfcomm/elfcomm.exp b/ld/testsuite/ld-elfcomm/elfcomm.exp index e5bd29b62f..e84377a818 100644 --- a/ld/testsuite/ld-elfcomm/elfcomm.exp +++ b/ld/testsuite/ld-elfcomm/elfcomm.exp @@ -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.o "-r tmpdir/common1a.o tmpdir/common1b. 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 } diff --git a/ld/testsuite/ld-elfvsb/hidden2.d b/ld/testsuite/ld-elfvsb/hidden2.d index 25cfa4d414..14b0b30c93 100644 --- a/ld/testsuite/ld-elfvsb/hidden2.d +++ b/ld/testsuite/ld-elfvsb/hidden2.d @@ -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 diff --git a/ld/testsuite/ld-elfvsb/hidden2.ld b/ld/testsuite/ld-elfvsb/hidden2.ld index 1e4a2b0b07..3c414dba48 100644 --- a/ld/testsuite/ld-elfvsb/hidden2.ld +++ b/ld/testsuite/ld-elfvsb/hidden2.ld @@ -3,4 +3,5 @@ SECTIONS . = 0x1000; PROVIDE (foo = .); .data : { *(.data) } + .dynamic : { *(.dynamic) } } diff --git a/ld/testsuite/ld-elfvsb/hidden2.s b/ld/testsuite/ld-elfvsb/hidden2.s index beb123b5e2..62f110702d 100644 --- a/ld/testsuite/ld-elfvsb/hidden2.s +++ b/ld/testsuite/ld-elfvsb/hidden2.s @@ -1,4 +1,5 @@ .data .hidden foo .global foo + .type foo,%object .dc.a foo