diff options
author | Alan Modra <amodra@gmail.com> | 2010-09-18 02:30:41 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2010-09-18 02:30:41 +0000 |
commit | de5c4ae21cc13f5e590e4a75d9ef98e879e55618 (patch) | |
tree | 6f4669636c2960fc55420d7d75932db47299998e /ld/testsuite | |
parent | 553c67174702040fbd61e6d5b6f0f2fc171c5ada (diff) | |
download | gdb-de5c4ae21cc13f5e590e4a75d9ef98e879e55618.zip gdb-de5c4ae21cc13f5e590e4a75d9ef98e879e55618.tar.gz gdb-de5c4ae21cc13f5e590e4a75d9ef98e879e55618.tar.bz2 |
* lib/ld-lib.exp (check_gc_sections_available): Fail more targets.
* ld-discard/discard.exp: Move xfails from here..
* ld-discard/extern.d: ..to here.
* ld-discard/start.d: ..and here.
* ld-discard/static.d: ..and here.
* ld-elf/binutils.exp: Don't run tbss1 and tbss2 tests on hppa64.
* ld-elf/empty2.d: Remove xfails.
* ld-elf/flags1.d: xfail hppa64.
* ld-elf/group1.d: Add comment.
* ld-elf/group2.d: xfail cr16 and crx.
* ld-elf/group3b.d: Correct xfail and add comment.
* ld-elf/group4.d: xfail cr16 and crx.
* ld-elf/group5.d: Likewise.
* ld-elf/group6.d: Likewise.
* ld-elf/group7.d: Likewise.
* ld-elf/group8a.d: Add more notarget and xfail entries. Comment.
* ld-elf/group8b.d: Likewise.
* ld-elf/group9a.d: Likewise.
* ld-elf/group9b.d: Likewise.
* ld-elf/linkonce2.d: Correct notarget and comment.
* ld-elf/merge2.d: Remove iq2000 from xfail.
* ld-elf/multibss1.d: xfail hppa64.
* ld-elf/nobits-1.d: Likewise.
* ld-elf/note-1.d: Likewise.
* ld-elf/note-2.d: Likewise.
* ld-elf/orphan-region.d: Add xfails.
* ld-elf/orphan-region.ld: Discard some sections.
* ld-elf/orphan.d: Add xfails.
* ld-elf/orphan.ld: Discard some sections.
* ld-elf/orphan3.d: Replace xfail frv-*-* with frv-*-elf. Remove
cr16, crx and d10v.
* ld-elf/pr349.d: Add xfails.
* ld-elf/warn2.d: Add xfails. Tweak symbol section for hppa64.
* ld-scripts/rgn-at5.t: Discard .reginfo.
Diffstat (limited to 'ld/testsuite')
34 files changed, 151 insertions, 45 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 7092f98..0c0729a 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,40 @@ +2010-09-18 Alan Modra <amodra@gmail.com> + + * lib/ld-lib.exp (check_gc_sections_available): Fail more targets. + * ld-discard/discard.exp: Move xfails from here.. + * ld-discard/extern.d: ..to here. + * ld-discard/start.d: ..and here. + * ld-discard/static.d: ..and here. + * ld-elf/binutils.exp: Don't run tbss1 and tbss2 tests on hppa64. + * ld-elf/empty2.d: Remove xfails. + * ld-elf/flags1.d: xfail hppa64. + * ld-elf/group1.d: Add comment. + * ld-elf/group2.d: xfail cr16 and crx. + * ld-elf/group3b.d: Correct xfail and add comment. + * ld-elf/group4.d: xfail cr16 and crx. + * ld-elf/group5.d: Likewise. + * ld-elf/group6.d: Likewise. + * ld-elf/group7.d: Likewise. + * ld-elf/group8a.d: Add more notarget and xfail entries. Comment. + * ld-elf/group8b.d: Likewise. + * ld-elf/group9a.d: Likewise. + * ld-elf/group9b.d: Likewise. + * ld-elf/linkonce2.d: Correct notarget and comment. + * ld-elf/merge2.d: Remove iq2000 from xfail. + * ld-elf/multibss1.d: xfail hppa64. + * ld-elf/nobits-1.d: Likewise. + * ld-elf/note-1.d: Likewise. + * ld-elf/note-2.d: Likewise. + * ld-elf/orphan-region.d: Add xfails. + * ld-elf/orphan-region.ld: Discard some sections. + * ld-elf/orphan.d: Add xfails. + * ld-elf/orphan.ld: Discard some sections. + * ld-elf/orphan3.d: Replace xfail frv-*-* with frv-*-elf. Remove + cr16, crx and d10v. + * ld-elf/pr349.d: Add xfails. + * ld-elf/warn2.d: Add xfails. Tweak symbol section for hppa64. + * ld-scripts/rgn-at5.t: Discard .reginfo. + 2010-09-16 Alan Modra <amodra@gmail.com> * ld-elf/orphan-region.d: xfail for spu. diff --git a/ld/testsuite/ld-discard/discard.exp b/ld/testsuite/ld-discard/discard.exp index 2131ffe..deb5dfd 100644 --- a/ld/testsuite/ld-discard/discard.exp +++ b/ld/testsuite/ld-discard/discard.exp @@ -43,8 +43,5 @@ set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]] for { set i 0 } { $i < [llength $test_list] } { incr i } { # We need to strip the ".d", but can leave the dirname. verbose [file rootname [lindex $test_list $i]] - # These fail because they use the generic linker. - setup_xfail "arc-*" "d30v-*" "dlx-*" "i960-*" "m6812-*" "m68hc12-*" - setup_xfail "or32-*" "pj-*" run_dump_test [file rootname [lindex $test_list $i]] } diff --git a/ld/testsuite/ld-discard/extern.d b/ld/testsuite/ld-discard/extern.d index 9033792..bb596d5 100644 --- a/ld/testsuite/ld-discard/extern.d +++ b/ld/testsuite/ld-discard/extern.d @@ -2,6 +2,8 @@ #ld: -T discard.ld #error: .*data.* referenced in section `\.text' of tmpdir/dump0.o: defined in discarded section `\.data\.exit' of tmpdir/dump0.o #objdump: -p +#xfail: arc-*-* d30v-*-* dlx-*-* i960-*-* or32-*-* pj*-*-* +#xfail: m68hc12-*-* m6812-*-* #pass # The expected warning used to start with "`data' referenced..." but # this has two problems: 1) It does not include the name of the linker diff --git a/ld/testsuite/ld-discard/start.d b/ld/testsuite/ld-discard/start.d index 5c685e8..06207ee 100644 --- a/ld/testsuite/ld-discard/start.d +++ b/ld/testsuite/ld-discard/start.d @@ -3,4 +3,6 @@ #ld: -T discard.ld #error: `data' referenced in section `\.text' of tmpdir/dump0.o: defined in discarded section `\.data\.exit' of tmpdir/dump1.o #objdump: -p +#xfail: arc-*-* d30v-*-* dlx-*-* i960-*-* or32-*-* pj*-*-* +#xfail: m68hc12-*-* m6812-*-* #pass diff --git a/ld/testsuite/ld-discard/static.d b/ld/testsuite/ld-discard/static.d index 3b5255b..b001d72 100644 --- a/ld/testsuite/ld-discard/static.d +++ b/ld/testsuite/ld-discard/static.d @@ -2,4 +2,6 @@ #ld: -T discard.ld #error: `(\.data\.exit|data)' referenced in section `\.text' of tmpdir/dump0.o: defined in discarded section `\.data\.exit' of tmpdir/dump0.o #objdump: -p +#xfail: arc-*-* d30v-*-* dlx-*-* i960-*-* or32-*-* pj*-*-* +#xfail: m68hc12-*-* m6812-*-* #pass diff --git a/ld/testsuite/ld-elf/binutils.exp b/ld/testsuite/ld-elf/binutils.exp index 8eba578..422c5d7 100644 --- a/ld/testsuite/ld-elf/binutils.exp +++ b/ld/testsuite/ld-elf/binutils.exp @@ -120,24 +120,31 @@ if { ([istarget "i?86-*-elf*"] binutils_test strip "-T ${srcdir}/${subdir}/lma.lnk" lma -binutils_test objcopy "" tbss1 -binutils_test objcopy "-z relro" tbss1 -binutils_test objcopy "-shared" tbss1 -binutils_test objcopy "-shared -z relro" tbss1 -binutils_test objcopy "-z max-page-size=0x100000" tbss1 -binutils_test objcopy "-z max-page-size=0x100000 -z common-page-size=0x1000" tbss1 +# hppa64 has its own .tbss section, with different flags. +if { ![istarget "hppa64-*-*"] } { + binutils_test objcopy "" tbss1 + binutils_test objcopy "-z relro" tbss1 + binutils_test objcopy "-shared" tbss1 + binutils_test objcopy "-shared -z relro" tbss1 + binutils_test objcopy "-z max-page-size=0x100000" tbss1 + binutils_test objcopy "-z max-page-size=0x100000 -z common-page-size=0x1000" tbss1 +} + binutils_test objcopy "" tdata1 binutils_test objcopy "-z relro" tdata1 binutils_test objcopy "-shared" tdata1 binutils_test objcopy "-shared -z relro" tdata1 binutils_test objcopy "-z max-page-size=0x100000" tdata1 binutils_test objcopy "-z max-page-size=0x100000 -z common-page-size=0x1000" tdata1 -binutils_test objcopy "" tbss2 -binutils_test objcopy "-z relro" tbss2 -binutils_test objcopy "-shared" tbss2 -binutils_test objcopy "-shared -z relro" tbss2 -binutils_test objcopy "-z max-page-size=0x100000" tbss2 -binutils_test objcopy "-z max-page-size=0x100000 -z common-page-size=0x1000" tbss2 + +if { ![istarget "hppa64-*-*"] } { + binutils_test objcopy "" tbss2 + binutils_test objcopy "-z relro" tbss2 + binutils_test objcopy "-shared" tbss2 + binutils_test objcopy "-shared -z relro" tbss2 + binutils_test objcopy "-z max-page-size=0x100000" tbss2 + binutils_test objcopy "-z max-page-size=0x100000 -z common-page-size=0x1000" tbss2 +} binutils_test objcopy "" tdata2 binutils_test objcopy "-z relro" tdata2 diff --git a/ld/testsuite/ld-elf/empty2.d b/ld/testsuite/ld-elf/empty2.d index bf6e343..d91569e 100644 --- a/ld/testsuite/ld-elf/empty2.d +++ b/ld/testsuite/ld-elf/empty2.d @@ -1,7 +1,6 @@ #source: empty2.s #ld: #readelf: -s -#xfail: "d30v-*-*" "dlx-*-*" "i960-*-*" "or32-*-*" "pj-*-*" #... [ ]+[0-9]+:[ ]+0+[ ]+0[ ]+FILE[ ]+LOCAL[ ]+DEFAULT[ ]+ABS empty2.s diff --git a/ld/testsuite/ld-elf/flags1.d b/ld/testsuite/ld-elf/flags1.d index 35ad981..502a42d 100644 --- a/ld/testsuite/ld-elf/flags1.d +++ b/ld/testsuite/ld-elf/flags1.d @@ -4,12 +4,13 @@ #readelf: -l --wide #xfail: "arm*-*-*" "xscale-*-*" #xfail: "avr-*-*" "dlx-*-*" "h8300-*-*" "m32r-*-*" "msp430-*-*" "tic6x-*-*" -#xfail: "*-*-hpux*" +#xfail: "*-*-hpux*" "hppa*64*-*-*" # Fails on the ARM because the .section type character is % rather than @. # Fails on the AVR, DLX, H8300, M32R, MSP430 and TI C6X because the two # sections are not merged into one segment. (There is no good reason why # they have to be). # Fails on HPUX systems because the .type pseudo-op behaves differently. +# Fails on hppa64 because a PHDR is always added. #... Program Headers: diff --git a/ld/testsuite/ld-elf/group1.d b/ld/testsuite/ld-elf/group1.d index 4c9558b..6ee74cb 100644 --- a/ld/testsuite/ld-elf/group1.d +++ b/ld/testsuite/ld-elf/group1.d @@ -2,7 +2,9 @@ #source: group1b.s #ld: -T group.ld #readelf: -s -#xfail: "arc-*-*" "d30v-*-*" "dlx-*-*" "i960-*-*" "or32-*-*" "pj-*-*" +#xfail: arc-*-* d30v-*-* dlx-*-* i960-*-* or32-*-* pj*-*-* +# generic linker targets don't comply with all symbol merging rules + Symbol table '.symtab' contains .* entries: #... .*: 0+1000 +0 +(NOTYPE|OBJECT) +WEAK +DEFAULT +. foo diff --git a/ld/testsuite/ld-elf/group2.d b/ld/testsuite/ld-elf/group2.d index b4d0b81..f914930 100644 --- a/ld/testsuite/ld-elf/group2.d +++ b/ld/testsuite/ld-elf/group2.d @@ -1,6 +1,9 @@ #source: ../../../binutils/testsuite/binutils-all/group.s #ld: -r #readelf: -Sg --wide +#xfail: cr16-*-* crx-*-* +# cr16 and crx use non-standard scripts with memory regions, which don't play +# well with unique group sections under ld -r. #... \[[ 0-9]+\] foo_group[ \t]+GROUP[ \t]+.* diff --git a/ld/testsuite/ld-elf/group3b.d b/ld/testsuite/ld-elf/group3b.d index f2f663c..1b8a2a2 100644 --- a/ld/testsuite/ld-elf/group3b.d +++ b/ld/testsuite/ld-elf/group3b.d @@ -2,7 +2,8 @@ #source: group3a.s #ld: -T group.ld #readelf: -s -#notarget arc-*-* d30v-*-* dlx-*-* i960-*-* or32-*-* pj*-*-* +#xfail: arc-*-* d30v-*-* dlx-*-* i960-*-* or32-*-* pj*-*-* +# generic linker targets don't comply with all symbol merging rules Symbol table '.symtab' contains .* entries: #... diff --git a/ld/testsuite/ld-elf/group4.d b/ld/testsuite/ld-elf/group4.d index 92a54bd..0682796 100644 --- a/ld/testsuite/ld-elf/group4.d +++ b/ld/testsuite/ld-elf/group4.d @@ -1,6 +1,9 @@ #source: ../../../binutils/testsuite/binutils-all/group-2.s #ld: -r #readelf: -Sg --wide +#xfail: cr16-*-* crx-*-* +# cr16 and crx use non-standard scripts with memory regions, which don't play +# well with unique group sections under ld -r. #... \[[ 0-9]+\] .group[ \t]+GROUP[ \t]+.* diff --git a/ld/testsuite/ld-elf/group5.d b/ld/testsuite/ld-elf/group5.d index 7d6eff6..773fda6 100644 --- a/ld/testsuite/ld-elf/group5.d +++ b/ld/testsuite/ld-elf/group5.d @@ -1,6 +1,9 @@ #source: ../../../binutils/testsuite/binutils-all/group-3.s #ld: -r #readelf: -Sg --wide +#xfail: cr16-*-* crx-*-* +# cr16 and crx use non-standard scripts with memory regions, which don't play +# well with unique group sections under ld -r. #... \[[ 0-9]+\] .group[ \t]+GROUP[ \t]+.* diff --git a/ld/testsuite/ld-elf/group6.d b/ld/testsuite/ld-elf/group6.d index b113414..5660193 100644 --- a/ld/testsuite/ld-elf/group6.d +++ b/ld/testsuite/ld-elf/group6.d @@ -1,6 +1,9 @@ #source: ../../../binutils/testsuite/binutils-all/group-4.s #ld: -r #readelf: -Sg --wide +#xfail: cr16-*-* crx-*-* +# cr16 and crx use non-standard scripts with memory regions, which don't play +# well with unique group sections under ld -r. #... \[[ 0-9]+\] .group[ \t]+GROUP[ \t]+.* diff --git a/ld/testsuite/ld-elf/group7.d b/ld/testsuite/ld-elf/group7.d index bfd1f3f..401836a 100644 --- a/ld/testsuite/ld-elf/group7.d +++ b/ld/testsuite/ld-elf/group7.d @@ -4,6 +4,9 @@ #source: ../../../binutils/testsuite/binutils-all/group-4.s #ld: -r #readelf: -g --wide +#xfail: cr16-*-* crx-*-* +# cr16 and crx use non-standard scripts with memory regions, which don't play +# well with unique group sections under ld -r. #... COMDAT group section \[[ 0-9]+\] `foo_group' \[foo_group\] contains 2 sections: diff --git a/ld/testsuite/ld-elf/group8a.d b/ld/testsuite/ld-elf/group8a.d index 455e02f..ce40a38 100644 --- a/ld/testsuite/ld-elf/group8a.d +++ b/ld/testsuite/ld-elf/group8a.d @@ -1,8 +1,12 @@ #source: group8.s #ld: -r --gc-sections --entry foo #readelf: -g --wide -#notarget: ia64-*-* mep-*-* -#xfail: dlx-*-* openrisc-*-* or32-*-* alpha-*-* arc-*-* hppa64-*-* +#notarget: arc-*-* d30v-*-* dlx-*-* i960-*-* or32-*-* pj*-*-* +#notarget: alpha-*-* hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-* +#xfail: cr16-*-* crx-*-* +# generic linker targets don't support --gc-sections, nor do a bunch of others +# cr16 and crx use non-standard scripts with memory regions, which don't play +# well with unique group sections under ld -r. COMDAT group section \[[ 0-9]+\] `.group' \[foo\] contains 1 sections: \[Index\] Name diff --git a/ld/testsuite/ld-elf/group8b.d b/ld/testsuite/ld-elf/group8b.d index 6e88454..bb928c5 100644 --- a/ld/testsuite/ld-elf/group8b.d +++ b/ld/testsuite/ld-elf/group8b.d @@ -1,8 +1,12 @@ #source: group8.s #ld: -r --gc-sections --entry bar #readelf: -g --wide -#notarget: ia64-*-* mep-*-* -#xfail: dlx-*-* openrisc-*-* or32-*-* alpha-*-* arc-*-* hppa64-*-* +#notarget: arc-*-* d30v-*-* dlx-*-* i960-*-* or32-*-* pj*-*-* +#notarget: alpha-*-* hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-* +#xfail: cr16-*-* crx-*-* +# generic linker targets don't support --gc-sections, nor do a bunch of others +# cr16 and crx use non-standard scripts with memory regions, which don't play +# well with unique group sections under ld -r. COMDAT group section \[[ 0-9]+\] `.group' \[bar\] contains 1 sections: \[Index\] Name diff --git a/ld/testsuite/ld-elf/group9a.d b/ld/testsuite/ld-elf/group9a.d index 1410ea5..fd04c48 100644 --- a/ld/testsuite/ld-elf/group9a.d +++ b/ld/testsuite/ld-elf/group9a.d @@ -1,8 +1,12 @@ #source: group9.s #ld: -r --gc-sections --entry foo #readelf: -g --wide -#notarget: ia64-*-* mep-*-* -#xfail: dlx-*-* openrisc-*-* or32-*-* alpha-*-* arc-*-* +#notarget: arc-*-* d30v-*-* dlx-*-* i960-*-* or32-*-* pj*-*-* +#notarget: alpha-*-* hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-* +#xfail: cr16-*-* crx-*-* +# generic linker targets don't support --gc-sections, nor do a bunch of others +# cr16 and crx use non-standard scripts with memory regions, which don't play +# well with unique group sections under ld -r. COMDAT group section \[[ 0-9]+\] `.group' \[foo\] contains 2 sections: \[Index\] Name diff --git a/ld/testsuite/ld-elf/group9b.d b/ld/testsuite/ld-elf/group9b.d index 89418dd..3f19fd6 100644 --- a/ld/testsuite/ld-elf/group9b.d +++ b/ld/testsuite/ld-elf/group9b.d @@ -1,8 +1,12 @@ #source: group9.s #ld: -r --gc-sections --entry bar #readelf: -g --wide -#notarget: ia64-*-* mep-*-* -#xfail: dlx-*-* openrisc-*-* or32-*-* alpha-*-* hppa64-*-* arc-*-* +#notarget: arc-*-* d30v-*-* dlx-*-* i960-*-* or32-*-* pj*-*-* +#notarget: alpha-*-* hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-* +#xfail: cr16-*-* crx-*-* +# generic linker targets don't support --gc-sections, nor do a bunch of others +# cr16 and crx use non-standard scripts with memory regions, which don't play +# well with unique group sections under ld -r. COMDAT group section \[[ 0-9]+\] `.group' \[foo\] contains 2 sections: \[Index\] Name diff --git a/ld/testsuite/ld-elf/linkonce2.d b/ld/testsuite/ld-elf/linkonce2.d index c8dcf64..0cbb3ad6 100644 --- a/ld/testsuite/ld-elf/linkonce2.d +++ b/ld/testsuite/ld-elf/linkonce2.d @@ -2,7 +2,8 @@ #source: linkonce1b.s #ld: -emit-relocs #objdump: -r -#notarget arc-*-* d30v-*-* dlx-*-* i960-*-* or32-*-* pj*-*-* +#notarget: arc-*-* d30v-*-* dlx-*-* i960-*-* or32-*-* pj*-*-* +# generic elf targets don't emit relocs .*: file format .* diff --git a/ld/testsuite/ld-elf/merge2.d b/ld/testsuite/ld-elf/merge2.d index 40884a3..4770621 100644 --- a/ld/testsuite/ld-elf/merge2.d +++ b/ld/testsuite/ld-elf/merge2.d @@ -2,7 +2,7 @@ #ld: -T merge.ld #objdump: -s #xfail: "arc-*-*" "d30v-*-*" "dlx-*-*" "hppa64-*-*" -#xfail: "i960-*-*" "ip2k-*-*" "iq2000-*-*" "or32-*-*" "pj-*-*" +#xfail: "i960-*-*" "ip2k-*-*" "or32-*-*" "pj-*-*" .*: file format .*elf.* diff --git a/ld/testsuite/ld-elf/multibss1.d b/ld/testsuite/ld-elf/multibss1.d index 8074fe3..a6fd9b3 100644 --- a/ld/testsuite/ld-elf/multibss1.d +++ b/ld/testsuite/ld-elf/multibss1.d @@ -2,6 +2,8 @@ #ld: -e 0 #readelf: -l --wide #target: *-*-linux* +#xfail: hppa64-*-* +# hppa64 default script add 16 bytes at start of .data giving 0x500010 p_memsz #... +LOAD +0x[^ ]+ +0x[^ ]+ +0x[^ ]+ +0x[^ ]+ +0x500000 .* diff --git a/ld/testsuite/ld-elf/nobits-1.d b/ld/testsuite/ld-elf/nobits-1.d index 9b90b6f..89f0e10 100644 --- a/ld/testsuite/ld-elf/nobits-1.d +++ b/ld/testsuite/ld-elf/nobits-1.d @@ -1,5 +1,7 @@ #ld: -Tnobits-1.t #readelf: -l --wide +#xfail: hppa64-*-* +# hppa64 adds PHDR #... Section to Segment mapping: diff --git a/ld/testsuite/ld-elf/note-1.d b/ld/testsuite/ld-elf/note-1.d index a5fc40f..345a2bb 100644 --- a/ld/testsuite/ld-elf/note-1.d +++ b/ld/testsuite/ld-elf/note-1.d @@ -1,5 +1,7 @@ #ld: -Tnote-1.t #readelf: -l --wide +#xfail: hppa64-*-* +# hppa64 adds PHDR #... Section to Segment mapping: diff --git a/ld/testsuite/ld-elf/note-2.d b/ld/testsuite/ld-elf/note-2.d index aff3240..289134e 100644 --- a/ld/testsuite/ld-elf/note-2.d +++ b/ld/testsuite/ld-elf/note-2.d @@ -1,6 +1,8 @@ #ld: -Tnote-2.t #objcopy_linked_file: -R .foo #readelf: -l --wide +#xfail: hppa64-*-* +# hppa64 adds PHDR #... Program Headers: diff --git a/ld/testsuite/ld-elf/orphan-region.d b/ld/testsuite/ld-elf/orphan-region.d index 8e79953..7b0d83a 100644 --- a/ld/testsuite/ld-elf/orphan-region.d +++ b/ld/testsuite/ld-elf/orphan-region.d @@ -1,7 +1,11 @@ #source: orphan-region.s #ld: -T orphan-region.ld -N #readelf: -S -l --wide -#xfail: spu-*-* +#xfail: arc-*-* d30v-*-* dlx-*-* fr30-*-* frv-*-elf i860-*-* i960-*-* +#xfail: iq*-*-* mn10200-*-* moxie-*-* msp*-*-* mt-*-* or32-*-* pj*-*-* +#xfail: spu-*-* hppa*64*-*-* +# if not using elf32.em, you don't get fancy orphan handling +# spu twiddles LOAD range, hppa64 adds PHDR #... \[[ 0-9]+\] \.text[ \t]+PROGBITS[ \t]+0*40000000[ \t]+.* diff --git a/ld/testsuite/ld-elf/orphan-region.ld b/ld/testsuite/ld-elf/orphan-region.ld index 3951fcb..b7dfdba 100644 --- a/ld/testsuite/ld-elf/orphan-region.ld +++ b/ld/testsuite/ld-elf/orphan-region.ld @@ -7,4 +7,5 @@ SECTIONS { .text : ALIGN (4) { *(.text) } > region .rodata : ALIGN (4) { *(.rodata) } > region + /DISCARD/ : { *(.reginfo) *(.trampolines) } } diff --git a/ld/testsuite/ld-elf/orphan.d b/ld/testsuite/ld-elf/orphan.d index 54d10df..7955c8b 100644 --- a/ld/testsuite/ld-elf/orphan.d +++ b/ld/testsuite/ld-elf/orphan.d @@ -1,6 +1,9 @@ #source: orphan.s #ld: -T orphan.ld #readelf: -S --wide +#xfail: arc-*-* d30v-*-* dlx-*-* fr30-*-* frv-*-elf i860-*-* i960-*-* +#xfail: iq*-*-* mn10200-*-* moxie-*-* msp*-*-* mt-*-* or32-*-* pj*-*-* +# if not using elf32.em, you don't get fancy orphan handling #... \[[ 0-9]+\] \.(text|notbad)[ \t]+PROGBITS[ \t0-9a-f]+AX?.* diff --git a/ld/testsuite/ld-elf/orphan.ld b/ld/testsuite/ld-elf/orphan.ld index 8ce83f1..d23222b 100644 --- a/ld/testsuite/ld-elf/orphan.ld +++ b/ld/testsuite/ld-elf/orphan.ld @@ -4,5 +4,5 @@ SECTIONS .data : { *(.data) } .bss : { *(.bss) *(COMMON) } .note : { *(.note) } - .reginfo : { *(.reginfo) } + /DISCARD/ : { *(.reginfo) *(.trampolines) } } diff --git a/ld/testsuite/ld-elf/orphan3.d b/ld/testsuite/ld-elf/orphan3.d index 493ba58..ea600d3 100644 --- a/ld/testsuite/ld-elf/orphan3.d +++ b/ld/testsuite/ld-elf/orphan3.d @@ -6,10 +6,10 @@ #source: orphan3f.s #ld: #readelf: -S --wide -#xfail: "arc-*-*" "d30v-*-*" "dlx-*-*" "fr30-*-*" "frv-*-*" +#xfail: "arc-*-*" "d30v-*-*" "dlx-*-*" "fr30-*-*" "frv-*-elf" #xfail: "i860-*-*" "i960-*-*" "iq2000-*-*" "mn10200-*-*" "msp430-*-*" "mt-*-*" #xfail: "or32-*-*" "pj-*-*" -#xfail: "cr16-*-*" "crx-*-*" "d10v-*-*" "xstormy16-*-*" +#xfail: "xstormy16-*-*" #... \[[ 0-9]+\] \.foo +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+20 +0+ +A +0 +0 +[0-9]+ diff --git a/ld/testsuite/ld-elf/pr349.d b/ld/testsuite/ld-elf/pr349.d index 62bbb42..48e3256 100644 --- a/ld/testsuite/ld-elf/pr349.d +++ b/ld/testsuite/ld-elf/pr349.d @@ -2,6 +2,9 @@ #source: pr349-2.s #ld: -r #readelf: -S +#xfail: arc-*-* d30v-*-* dlx-*-* fr30-*-* frv-*-elf i860-*-* i960-*-* +#xfail: iq*-*-* mn10200-*-* moxie-*-* msp*-*-* mt-*-* or32-*-* pj*-*-* +# if not using elf32.em, you don't get fancy section handling #... .* .abcxyz .* diff --git a/ld/testsuite/ld-elf/warn2.d b/ld/testsuite/ld-elf/warn2.d index c2ff12a..95b7ef4 100644 --- a/ld/testsuite/ld-elf/warn2.d +++ b/ld/testsuite/ld-elf/warn2.d @@ -5,11 +5,13 @@ #warning: ^[^\\n]*\.[obj]+: warning: function 'Foo' used$ #readelf: -s #notarget: "sparc64-*-solaris2*" "sparcv9-*-solaris2*" -#xfail: "arc-*-*" "d30v-*-*" "dlx-*-*" "i960-*-*" "or32-*-*" "pj-*-*" +#xfail: arc-*-* d30v-*-* dlx-*-* fr30-*-* frv-*-elf i860-*-* i960-*-* +#xfail: iq*-*-* mn10200-*-* moxie-*-* msp*-*-* mt-*-* or32-*-* pj*-*-* +# if not using elf32.em, you don't get fancy section handling # Check that warnings are generated for the symbols in .gnu.warning # construct and that the symbol still appears as expected. #... - +[0-9]+: +[0-9a-f]+ +20 +OBJECT +GLOBAL +DEFAULT +[1-3] Foo + +[0-9]+: +[0-9a-f]+ +20 +OBJECT +GLOBAL +DEFAULT +[1-9] Foo #pass diff --git a/ld/testsuite/ld-scripts/rgn-at5.t b/ld/testsuite/ld-scripts/rgn-at5.t index 7bcb877..53ad242 100644 --- a/ld/testsuite/ld-scripts/rgn-at5.t +++ b/ld/testsuite/ld-scripts/rgn-at5.t @@ -18,12 +18,5 @@ SECTIONS .sec3 0x5000 : { *(*.sec3) } - /* In theory we could put: - - /DISCARD/ : { *(*) } - - here as we do not need any other sections for this test. - In practice however doing so breaks GOLD as it relies upon - being able to create/find various other sections such as - .dynamic, .dynsym and .gnu.hash. */ + /DISCARD/ : { *(.reginfo) } } diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp index 709702a..9f2e249 100644 --- a/ld/testsuite/lib/ld-lib.exp +++ b/ld/testsuite/lib/ld-lib.exp @@ -1656,9 +1656,19 @@ proc check_gc_sections_available { } { if {![info exists gc_sections_available_saved]} { # Some targets don't support gc-sections despite whatever's # advertised by ld's options. - if { [istarget alpha*-*-*] - || [istarget mep-*-*] + if {[istarget arc-*-*] + || [istarget d30v-*-*] + || [istarget dlx-*-*] + || [istarget i960-*-*] + || [istarget or32-*-*] + || [istarget pj*-*-*] + || [istarget alpha-*-*] + || [istarget hppa64-*-*] + || [istarget i370-*-*] + || [istarget i860-*-*] || [istarget ia64-*-*] + || [istarget mep-*-*] + || [istarget mn10200-*-*] || [istarget *-*-cygwin] || [istarget *-*-mingw*] } { set gc_sections_available_saved 0 |