aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2010-09-18 02:30:41 +0000
committerAlan Modra <amodra@gmail.com>2010-09-18 02:30:41 +0000
commitde5c4ae21cc13f5e590e4a75d9ef98e879e55618 (patch)
tree6f4669636c2960fc55420d7d75932db47299998e /ld
parentFix date. (diff)
downloadbinutils-gdb-de5c4ae21cc13f5e590e4a75d9ef98e879e55618.tar.gz
binutils-gdb-de5c4ae21cc13f5e590e4a75d9ef98e879e55618.tar.bz2
binutils-gdb-de5c4ae21cc13f5e590e4a75d9ef98e879e55618.zip
* 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')
-rw-r--r--ld/testsuite/ChangeLog37
-rw-r--r--ld/testsuite/ld-discard/discard.exp3
-rw-r--r--ld/testsuite/ld-discard/extern.d2
-rw-r--r--ld/testsuite/ld-discard/start.d2
-rw-r--r--ld/testsuite/ld-discard/static.d2
-rw-r--r--ld/testsuite/ld-elf/binutils.exp31
-rw-r--r--ld/testsuite/ld-elf/empty2.d1
-rw-r--r--ld/testsuite/ld-elf/flags1.d3
-rw-r--r--ld/testsuite/ld-elf/group1.d4
-rw-r--r--ld/testsuite/ld-elf/group2.d3
-rw-r--r--ld/testsuite/ld-elf/group3b.d3
-rw-r--r--ld/testsuite/ld-elf/group4.d3
-rw-r--r--ld/testsuite/ld-elf/group5.d3
-rw-r--r--ld/testsuite/ld-elf/group6.d3
-rw-r--r--ld/testsuite/ld-elf/group7.d3
-rw-r--r--ld/testsuite/ld-elf/group8a.d8
-rw-r--r--ld/testsuite/ld-elf/group8b.d8
-rw-r--r--ld/testsuite/ld-elf/group9a.d8
-rw-r--r--ld/testsuite/ld-elf/group9b.d8
-rw-r--r--ld/testsuite/ld-elf/linkonce2.d3
-rw-r--r--ld/testsuite/ld-elf/merge2.d2
-rw-r--r--ld/testsuite/ld-elf/multibss1.d2
-rw-r--r--ld/testsuite/ld-elf/nobits-1.d2
-rw-r--r--ld/testsuite/ld-elf/note-1.d2
-rw-r--r--ld/testsuite/ld-elf/note-2.d2
-rw-r--r--ld/testsuite/ld-elf/orphan-region.d6
-rw-r--r--ld/testsuite/ld-elf/orphan-region.ld1
-rw-r--r--ld/testsuite/ld-elf/orphan.d3
-rw-r--r--ld/testsuite/ld-elf/orphan.ld2
-rw-r--r--ld/testsuite/ld-elf/orphan3.d4
-rw-r--r--ld/testsuite/ld-elf/pr349.d3
-rw-r--r--ld/testsuite/ld-elf/warn2.d6
-rw-r--r--ld/testsuite/ld-scripts/rgn-at5.t9
-rw-r--r--ld/testsuite/lib/ld-lib.exp14
34 files changed, 151 insertions, 45 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 7092f987041..0c0729a95af 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 2131ffeb4d8..deb5dfdefb3 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 903379209bd..bb596d5c6c3 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 5c685e81041..06207ee4050 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 3b5255bce3a..b001d72b8f5 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 8eba578f308..422c5d71ba9 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 bf6e3438d3e..d91569ec6fd 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 35ad981cbad..502a42d2094 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 4c9558b4baa..6ee74cb4041 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 b4d0b819a23..f914930c3a9 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 f2f663c472e..1b8a2a2d486 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 92a54bd9154..068279663e8 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 7d6eff61d09..773fda69e9c 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 b1134146e6a..56601930fa3 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 bfd1f3fbbb8..401836aaa6b 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 455e02ff87a..ce40a383dbd 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 6e88454c088..bb928c58cf7 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 1410ea5daef..fd04c480c75 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 89418dd71f3..3f19fd6ebd8 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 c8dcf64231f..0cbb3ad6164 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 40884a39818..47706218d7b 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 8074fe3347f..a6fd9b3ed2b 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 9b90b6f76af..89f0e10f6fe 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 a5fc40f2e69..345a2bb8b32 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 aff32406de2..289134e3eb8 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 8e799537760..7b0d83a7da6 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 3951fcbf720..b7dfdba266b 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 54d10df4cda..7955c8b6bf0 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 8ce83f16e84..d23222b49ac 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 493ba584fc1..ea600d32837 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 62bbb425425..48e32569800 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 c2ff12ada27..95b7ef49998 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 7bcb877e523..53ad2422cc9 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 709702a5b68..9f2e249c901 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