summaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elf
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2017-06-16 19:41:41 +0930
committerAlan Modra <amodra@gmail.com>2017-06-16 23:38:28 +0930
commit7dba9362c172f1073487536eb137feb2da30b0ff (patch)
tree6dad1f8f6d06e52dd42e155c9ead55e5781af4a8 /ld/testsuite/ld-elf
parentd68f19767dfbb33c1813563d5a4af0731a1855c5 (diff)
downloadbinutils-gdb-7dba9362c172f1073487536eb137feb2da30b0ff.tar.gz
Rewrite __start and __stop symbol handling
This arranges for __start and __stop symbols to be defined before garbage collection, for all target formats. That should allow the COFF and PE --gc-sections to keep a singleton orphan input section, a feature lost by 2017-06-13 commit cbd0eecf26. The fancier ELF treatment of keeping all input sections associated with a __start or __stop symbol, from 2015-10-23 commit 1cce69b9dc, is retained. .startof. and .sizeof. symbols are deliberately not defined before garbage collection, so these won't affect garbage collection of sections. The patch also ensures __start, __stop, .startof. and .sizeof. symbols are defined before target size_dynamic_sections is called, albeit with a preliminary value, so that target code doesn't need to cope with a symbol changing from undefined at size_dynamic_sections to defined at relocate_section. Also, a number of problems with the testcases have been fixed. PR ld/20022 PR ld/21557 PR ld/21562 PR ld/21571 include/ * bfdlink.h (struct bfd_link_hash_entry): Delete undef.section. bfd/ * targets.c (struct bfd_target): Add _bfd_define_start_stop. (BFD_JUMP_TABLE_LINK): Likewise. * elf-bfd.h (bfd_elf_define_start_stop): Declare. * elflink.c (_bfd_elf_gc_mark_rsec): Update comment. (bfd_elf_define_start_stop): New function. * linker.c (bfd_generic_define_start_stop): New function. * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init new field. * aout-adobe.c (aout_32_bfd_define_start_stop): Define. * aout-target.h (MY_bfd_define_start_stop): Define. * aout-tic30.c (MY_bfd_define_start_stop): Define. * binary.c (binary_bfd_define_start_stop): Define. * bout.c (b_out_bfd_define_start_stop): Define. * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define. * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define. * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define. * coffcode.h (coff_bfd_define_start_stop): Define. * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define. * i386msdos.c (msdos_bfd_define_start_stop): Define. * i386os9k.c (os9k_bfd_define_start_stop): Define. * ieee.c (ieee_bfd_define_start_stop): Define. * ihex.c (ihex_bfd_define_start_stop): Define. * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define. * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define. * mmo.c (mmo_bfd_define_start_stop): Define. * nlm-target.h (nlm_bfd_define_start_stop): Define. * oasys.c (oasys_bfd_define_start_stop): Define. * pef.c (bfd_pef_bfd_define_start_stop): Define. * plugin.c (bfd_plugin_bfd_define_start_stop): Define. * ppcboot.c (ppcboot_bfd_define_start_stop): Define. * som.c (som_bfd_define_start_stop): Define. * srec.c (srec_bfd_define_start_stop): Define. * tekhex.c (tekhex_bfd_define_start_stop): Define. * versados.c (versados_bfd_define_start_stop): Define. * vms-alpha.c (vms_bfd_define_start_stop): Define. (alpha_vms_bfd_define_start_stop): Define. * xsym.c (bfd_sym_bfd_define_start_stop): Define. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. ld/ * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Don't set __start/__stop syms here. * ldlang.c (lang_set_startof): Delete. (start_stop_syms, start_stop_count, start_stop_alloc): New vars. (lang_define_start_stop, lang_init_start_stop, foreach_start_stop, undef_start_stop, lang_undef_start_stop, lang_init_startof_sizeof, set_start_stop, lang_finalize_start_stop): New functions. (lang_process): Call _start_stop functions. * testsuite/ld-elf/pr21562a.d: Use xfail rather than notarget. Correct typos and list of xfail targets. * testsuite/ld-elf/pr21562b.d: Likewise. * testsuite/ld-elf/pr21562c.d: Likewise. * testsuite/ld-elf/pr21562d.d: Likewise. * testsuite/ld-elf/pr21562e.d: Likewise. * testsuite/ld-elf/pr21562f.d: Likewise. * testsuite/ld-elf/pr21562g.d: Likewise. * testsuite/ld-elf/pr21562h.d: Likewise. * testsuite/ld-elf/pr21562i.d: Likewise. * testsuite/ld-elf/pr21562j.d: Likewise. * testsuite/ld-elf/pr21562k.d: Likewise. * testsuite/ld-elf/pr21562l.d: Likewise. * testsuite/ld-elf/pr21562m.d: Likewise. * testsuite/ld-elf/pr21562n.d: Likewise. * testsuite/ld-elf/sizeofa.d: Likewise. Adjust to pass for generic ELF. * testsuite/ld-elf/sizeofb.d: Likewise. * testsuite/ld-elf/startofa.d: Likewise. * testsuite/ld-elf/startofb.d: Likewise.
Diffstat (limited to 'ld/testsuite/ld-elf')
-rw-r--r--ld/testsuite/ld-elf/pr21562a.d12
-rw-r--r--ld/testsuite/ld-elf/pr21562b.d12
-rw-r--r--ld/testsuite/ld-elf/pr21562c.d12
-rw-r--r--ld/testsuite/ld-elf/pr21562d.d12
-rw-r--r--ld/testsuite/ld-elf/pr21562e.d8
-rw-r--r--ld/testsuite/ld-elf/pr21562f.d8
-rw-r--r--ld/testsuite/ld-elf/pr21562g.d8
-rw-r--r--ld/testsuite/ld-elf/pr21562h.d8
-rw-r--r--ld/testsuite/ld-elf/pr21562i.d12
-rw-r--r--ld/testsuite/ld-elf/pr21562j.d12
-rw-r--r--ld/testsuite/ld-elf/pr21562k.d12
-rw-r--r--ld/testsuite/ld-elf/pr21562l.d12
-rw-r--r--ld/testsuite/ld-elf/pr21562m.d12
-rw-r--r--ld/testsuite/ld-elf/pr21562n.d12
-rw-r--r--ld/testsuite/ld-elf/sizeofa.d11
-rw-r--r--ld/testsuite/ld-elf/sizeofb.d10
-rw-r--r--ld/testsuite/ld-elf/startofa.d13
-rw-r--r--ld/testsuite/ld-elf/startofb.d10
18 files changed, 99 insertions, 97 deletions
diff --git a/ld/testsuite/ld-elf/pr21562a.d b/ld/testsuite/ld-elf/pr21562a.d
index 3b0dc6517e3..1f57569d3ea 100644
--- a/ld/testsuite/ld-elf/pr21562a.d
+++ b/ld/testsuite/ld-elf/pr21562a.d
@@ -1,12 +1,12 @@
#ld: -shared -z defs --gc-sections
#readelf: -s -S --wide
#target: *-*-linux* *-*-gnu*
-#notarget: d30v-*-* dlx-*-* i960-*-* pj*-*-*
-#notarget: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
-#notarget: bfin-*-* cr16-*-* cr16c-*-* cris*-*-* crx-*-* epiphany-*-*
-#notarget: h8300-*-* ip2k-*-* m10200-*-* m10300-*-* m32c-*-* metag-*-*
-#notarget: metag-*-* rl78-*-* rx-*-* sh*-*-* v850*-*-*
-# Targets with a leading char will faill this test.
+#xfail: d30v-*-* dlx-*-* i960-*-* pj*-*-*
+#xfail: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
+#xfail: bfin-*-* cr16-*-* cr16c-*-* crx-*-* epiphany-*-*
+#xfail: h8300-*-* ip2k-*-* mn10200-*-* mn10300-*-* m32c-*-* metag-*-*
+#xfail: rl78-*-* rx-*-* v850*-*-*
+# Targets with a leading char will fail this test.
# generic linker targets don't support --gc-sections, nor do a bunch of others
#...
diff --git a/ld/testsuite/ld-elf/pr21562b.d b/ld/testsuite/ld-elf/pr21562b.d
index af82bb8b69b..dd28b66ca69 100644
--- a/ld/testsuite/ld-elf/pr21562b.d
+++ b/ld/testsuite/ld-elf/pr21562b.d
@@ -1,12 +1,12 @@
#ld: -shared -z defs --gc-sections
#readelf: -s -S --wide
#target: *-*-linux* *-*-gnu*
-#notarget: d30v-*-* dlx-*-* i960-*-* pj*-*-*
-#notarget: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
-#notarget: bfin-*-* cr16-*-* cr16c-*-* cris*-*-* crx-*-* epiphany-*-*
-#notarget: h8300-*-* ip2k-*-* m10200-*-* m10300-*-* m32c-*-* metag-*-*
-#notarget: metag-*-* rl78-*-* rx-*-* sh*-*-* v850*-*-*
-# Targets with a leading char will faill this test.
+#xfail: d30v-*-* dlx-*-* i960-*-* pj*-*-*
+#xfail: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
+#xfail: bfin-*-* cr16-*-* cr16c-*-* crx-*-* epiphany-*-*
+#xfail: h8300-*-* ip2k-*-* mn10200-*-* mn10300-*-* m32c-*-* metag-*-*
+#xfail: rl78-*-* rx-*-* v850*-*-*
+# Targets with a leading char will fail this test.
# generic linker targets don't support --gc-sections, nor do a bunch of others
#...
diff --git a/ld/testsuite/ld-elf/pr21562c.d b/ld/testsuite/ld-elf/pr21562c.d
index 0fcc25ab9d7..69eb6aacb4d 100644
--- a/ld/testsuite/ld-elf/pr21562c.d
+++ b/ld/testsuite/ld-elf/pr21562c.d
@@ -2,12 +2,12 @@
#ld: -shared -z defs --gc-sections -T pr21562a.t
#readelf: -s -S --wide
#target: *-*-linux* *-*-gnu*
-#notarget: d30v-*-* dlx-*-* i960-*-* pj*-*-*
-#notarget: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
-#notarget: bfin-*-* cr16-*-* cr16c-*-* cris*-*-* crx-*-* epiphany-*-*
-#notarget: h8300-*-* ip2k-*-* m10200-*-* m10300-*-* m32c-*-* metag-*-*
-#notarget: metag-*-* rl78-*-* rx-*-* sh*-*-* v850*-*-*
-# Targets with a leading char will faill this test.
+#xfail: d30v-*-* dlx-*-* i960-*-* pj*-*-*
+#xfail: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
+#xfail: bfin-*-* cr16-*-* cr16c-*-* crx-*-* epiphany-*-*
+#xfail: h8300-*-* ip2k-*-* mn10200-*-* mn10300-*-* m32c-*-* metag-*-*
+#xfail: rl78-*-* rx-*-* v850*-*-*
+# Targets with a leading char will fail this test.
# generic linker targets don't support --gc-sections, nor do a bunch of others
#...
diff --git a/ld/testsuite/ld-elf/pr21562d.d b/ld/testsuite/ld-elf/pr21562d.d
index b966b801147..7e138219033 100644
--- a/ld/testsuite/ld-elf/pr21562d.d
+++ b/ld/testsuite/ld-elf/pr21562d.d
@@ -2,12 +2,12 @@
#ld: -shared -z defs --gc-sections -T pr21562a.t
#readelf: -s -S --wide
#target: *-*-linux* *-*-gnu*
-#notarget: d30v-*-* dlx-*-* i960-*-* pj*-*-*
-#notarget: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
-#notarget: bfin-*-* cr16-*-* cr16c-*-* cris*-*-* crx-*-* epiphany-*-*
-#notarget: h8300-*-* ip2k-*-* m10200-*-* m10300-*-* m32c-*-* metag-*-*
-#notarget: metag-*-* rl78-*-* rx-*-* sh*-*-* v850*-*-*
-# Targets with a leading char will faill this test.
+#xfail: d30v-*-* dlx-*-* i960-*-* pj*-*-*
+#xfail: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
+#xfail: bfin-*-* cr16-*-* cr16c-*-* crx-*-* epiphany-*-*
+#xfail: h8300-*-* ip2k-*-* mn10200-*-* mn10300-*-* m32c-*-* metag-*-*
+#xfail: rl78-*-* rx-*-* v850*-*-*
+# Targets with a leading char will fail this test.
# generic linker targets don't support --gc-sections, nor do a bunch of others
#...
diff --git a/ld/testsuite/ld-elf/pr21562e.d b/ld/testsuite/ld-elf/pr21562e.d
index 6f73c7b7182..0172a069d8b 100644
--- a/ld/testsuite/ld-elf/pr21562e.d
+++ b/ld/testsuite/ld-elf/pr21562e.d
@@ -2,10 +2,10 @@
#ld: -shared -z defs
#readelf: -s -S --wide
#target: *-*-linux* *-*-gnu*
-#notarget: bfin-*-* cr16-*-* cr16c-*-* cris*-*-* crx-*-* epiphany-*-*
-#notarget: h8300-*-* ip2k-*-* m10200-*-* m10300-*-* m32c-*-* metag-*-*
-#notarget: metag-*-* rl78-*-* rx-*-* sh*-*-* v850*-*-*
-# Targets with a leading char will faill this test.
+#xfail: bfin-*-* cr16-*-* cr16c-*-* crx-*-* epiphany-*-*
+#xfail: h8300-*-* ip2k-*-* mn10200-*-* mn10300-*-* m32c-*-* metag-*-*
+#xfail: rl78-*-* rx-*-* v850*-*-*
+# Targets with a leading char will fail this test.
#...
\[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*
diff --git a/ld/testsuite/ld-elf/pr21562f.d b/ld/testsuite/ld-elf/pr21562f.d
index 244f917c52c..a0f1a24d82a 100644
--- a/ld/testsuite/ld-elf/pr21562f.d
+++ b/ld/testsuite/ld-elf/pr21562f.d
@@ -2,10 +2,10 @@
#ld: -shared -z defs
#readelf: -s -S --wide
#target: *-*-linux* *-*-gnu*
-#notarget: bfin-*-* cr16-*-* cr16c-*-* cris*-*-* crx-*-* epiphany-*-*
-#notarget: h8300-*-* ip2k-*-* m10200-*-* m10300-*-* m32c-*-* metag-*-*
-#notarget: metag-*-* rl78-*-* rx-*-* sh*-*-* v850*-*-*
-# Targets with a leading char will faill this test.
+#xfail: bfin-*-* cr16-*-* cr16c-*-* crx-*-* epiphany-*-*
+#xfail: h8300-*-* ip2k-*-* mn10200-*-* mn10300-*-* m32c-*-* metag-*-*
+#xfail: rl78-*-* rx-*-* v850*-*-*
+# Targets with a leading char will fail this test.
#...
\[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*
diff --git a/ld/testsuite/ld-elf/pr21562g.d b/ld/testsuite/ld-elf/pr21562g.d
index 411e1e31e73..289ab75191b 100644
--- a/ld/testsuite/ld-elf/pr21562g.d
+++ b/ld/testsuite/ld-elf/pr21562g.d
@@ -2,10 +2,10 @@
#ld: -shared -z defs -T pr21562a.t
#readelf: -s -S --wide
#target: *-*-linux* *-*-gnu*
-#notarget: bfin-*-* cr16-*-* cr16c-*-* cris*-*-* crx-*-* epiphany-*-*
-#notarget: h8300-*-* ip2k-*-* m10200-*-* m10300-*-* m32c-*-* metag-*-*
-#notarget: metag-*-* rl78-*-* rx-*-* sh*-*-* v850*-*-*
-# Targets with a leading char will faill this test.
+#xfail: bfin-*-* cr16-*-* cr16c-*-* crx-*-* epiphany-*-*
+#xfail: h8300-*-* ip2k-*-* mn10200-*-* mn10300-*-* m32c-*-* metag-*-*
+#xfail: rl78-*-* rx-*-* v850*-*-*
+# Targets with a leading char will fail this test.
#...
\[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*
diff --git a/ld/testsuite/ld-elf/pr21562h.d b/ld/testsuite/ld-elf/pr21562h.d
index dc4b72a760b..c94e63669f2 100644
--- a/ld/testsuite/ld-elf/pr21562h.d
+++ b/ld/testsuite/ld-elf/pr21562h.d
@@ -2,10 +2,10 @@
#ld: -shared -z defs -T pr21562a.t
#readelf: -s -S --wide
#target: *-*-linux* *-*-gnu*
-#notarget: bfin-*-* cr16-*-* cr16c-*-* cris*-*-* crx-*-* epiphany-*-*
-#notarget: h8300-*-* ip2k-*-* m10200-*-* m10300-*-* m32c-*-* metag-*-*
-#notarget: metag-*-* rl78-*-* rx-*-* sh*-*-* v850*-*-*
-# Targets with a leading char will faill this test.
+#xfail: bfin-*-* cr16-*-* cr16c-*-* crx-*-* epiphany-*-*
+#xfail: h8300-*-* ip2k-*-* mn10200-*-* mn10300-*-* m32c-*-* metag-*-*
+#xfail: rl78-*-* rx-*-* v850*-*-*
+# Targets with a leading char will fail this test.
#...
\[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*
diff --git a/ld/testsuite/ld-elf/pr21562i.d b/ld/testsuite/ld-elf/pr21562i.d
index 47b9cad0be6..2670f60537d 100644
--- a/ld/testsuite/ld-elf/pr21562i.d
+++ b/ld/testsuite/ld-elf/pr21562i.d
@@ -2,12 +2,12 @@
#ld: -shared -z defs --gc-sections -T pr21562b.t
#readelf: -s -S --wide
#target: *-*-linux* *-*-gnu*
-#notarget: d30v-*-* dlx-*-* i960-*-* pj*-*-*
-#notarget: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
-#notarget: bfin-*-* cr16-*-* cr16c-*-* cris*-*-* crx-*-* epiphany-*-*
-#notarget: h8300-*-* ip2k-*-* m10200-*-* m10300-*-* m32c-*-* metag-*-*
-#notarget: metag-*-* rl78-*-* rx-*-* sh*-*-* v850*-*-*
-# Targets with a leading char will faill this test.
+#xfail: d30v-*-* dlx-*-* i960-*-* pj*-*-*
+#xfail: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
+#xfail: bfin-*-* cr16-*-* cr16c-*-* crx-*-* epiphany-*-*
+#xfail: h8300-*-* ip2k-*-* mn10200-*-* mn10300-*-* m32c-*-* metag-*-*
+#xfail: rl78-*-* rx-*-* v850*-*-*
+# Targets with a leading char will fail this test.
# generic linker targets don't support --gc-sections, nor do a bunch of others
#...
diff --git a/ld/testsuite/ld-elf/pr21562j.d b/ld/testsuite/ld-elf/pr21562j.d
index eba248786a3..7c5508a5b43 100644
--- a/ld/testsuite/ld-elf/pr21562j.d
+++ b/ld/testsuite/ld-elf/pr21562j.d
@@ -2,12 +2,12 @@
#ld: -shared -z defs --gc-sections -T pr21562b.t
#readelf: -s -S --wide
#target: *-*-linux* *-*-gnu*
-#notarget: d30v-*-* dlx-*-* i960-*-* pj*-*-*
-#notarget: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
-#notarget: bfin-*-* cr16-*-* cr16c-*-* cris*-*-* crx-*-* epiphany-*-*
-#notarget: h8300-*-* ip2k-*-* m10200-*-* m10300-*-* m32c-*-* metag-*-*
-#notarget: metag-*-* rl78-*-* rx-*-* sh*-*-* v850*-*-*
-# Targets with a leading char will faill this test.
+#xfail: d30v-*-* dlx-*-* i960-*-* pj*-*-*
+#xfail: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
+#xfail: bfin-*-* cr16-*-* cr16c-*-* crx-*-* epiphany-*-*
+#xfail: h8300-*-* ip2k-*-* mn10200-*-* mn10300-*-* m32c-*-* metag-*-*
+#xfail: rl78-*-* rx-*-* v850*-*-*
+# Targets with a leading char will fail this test.
# generic linker targets don't support --gc-sections, nor do a bunch of others
#...
diff --git a/ld/testsuite/ld-elf/pr21562k.d b/ld/testsuite/ld-elf/pr21562k.d
index 594bc896a32..7f76d08c82c 100644
--- a/ld/testsuite/ld-elf/pr21562k.d
+++ b/ld/testsuite/ld-elf/pr21562k.d
@@ -2,12 +2,12 @@
#ld: -shared -z defs --gc-sections -T pr21562c.t
#readelf: -s -S --wide
#target: *-*-linux* *-*-gnu*
-#notarget: d30v-*-* dlx-*-* i960-*-* pj*-*-*
-#notarget: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
-#notarget: bfin-*-* cr16-*-* cr16c-*-* cris*-*-* crx-*-* epiphany-*-*
-#notarget: h8300-*-* ip2k-*-* m10200-*-* m10300-*-* m32c-*-* metag-*-*
-#notarget: metag-*-* rl78-*-* rx-*-* sh*-*-* v850*-*-*
-# Targets with a leading char will faill this test.
+#xfail: d30v-*-* dlx-*-* i960-*-* pj*-*-*
+#xfail: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
+#xfail: bfin-*-* cr16-*-* cr16c-*-* crx-*-* epiphany-*-*
+#xfail: h8300-*-* ip2k-*-* mn10200-*-* mn10300-*-* m32c-*-* metag-*-*
+#xfail: rl78-*-* rx-*-* v850*-*-*
+# Targets with a leading char will fail this test.
# generic linker targets don't support --gc-sections, nor do a bunch of others
#...
diff --git a/ld/testsuite/ld-elf/pr21562l.d b/ld/testsuite/ld-elf/pr21562l.d
index 1a9c2d663b1..1ad601c554e 100644
--- a/ld/testsuite/ld-elf/pr21562l.d
+++ b/ld/testsuite/ld-elf/pr21562l.d
@@ -2,12 +2,12 @@
#ld: -shared -z defs --gc-sections -T pr21562c.t
#readelf: -s -S --wide
#target: *-*-linux* *-*-gnu*
-#notarget: d30v-*-* dlx-*-* i960-*-* pj*-*-*
-#notarget: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
-#notarget: bfin-*-* cr16-*-* cr16c-*-* cris*-*-* crx-*-* epiphany-*-*
-#notarget: h8300-*-* ip2k-*-* m10200-*-* m10300-*-* m32c-*-* metag-*-*
-#notarget: metag-*-* rl78-*-* rx-*-* sh*-*-* v850*-*-*
-# Targets with a leading char will faill this test.
+#xfail: d30v-*-* dlx-*-* i960-*-* pj*-*-*
+#xfail: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
+#xfail: bfin-*-* cr16-*-* cr16c-*-* crx-*-* epiphany-*-*
+#xfail: h8300-*-* ip2k-*-* mn10200-*-* mn10300-*-* m32c-*-* metag-*-*
+#xfail: rl78-*-* rx-*-* v850*-*-*
+# Targets with a leading char will fail this test.
# generic linker targets don't support --gc-sections, nor do a bunch of others
#...
diff --git a/ld/testsuite/ld-elf/pr21562m.d b/ld/testsuite/ld-elf/pr21562m.d
index b21698a3ccd..2fedacdb5f8 100644
--- a/ld/testsuite/ld-elf/pr21562m.d
+++ b/ld/testsuite/ld-elf/pr21562m.d
@@ -2,12 +2,12 @@
#ld: -shared -z defs --gc-sections -T pr21562d.t
#readelf: -s -S --wide
#target: *-*-linux* *-*-gnu*
-#notarget: d30v-*-* dlx-*-* i960-*-* pj*-*-*
-#notarget: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
-#notarget: bfin-*-* cr16-*-* cr16c-*-* cris*-*-* crx-*-* epiphany-*-*
-#notarget: h8300-*-* ip2k-*-* m10200-*-* m10300-*-* m32c-*-* metag-*-*
-#notarget: metag-*-* rl78-*-* rx-*-* sh*-*-* v850*-*-*
-# Targets with a leading char will faill this test.
+#xfail: d30v-*-* dlx-*-* i960-*-* pj*-*-*
+#xfail: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
+#xfail: bfin-*-* cr16-*-* cr16c-*-* crx-*-* epiphany-*-*
+#xfail: h8300-*-* ip2k-*-* mn10200-*-* mn10300-*-* m32c-*-* metag-*-*
+#xfail: rl78-*-* rx-*-* v850*-*-*
+# Targets with a leading char will fail this test.
# generic linker targets don't support --gc-sections, nor do a bunch of others
#...
diff --git a/ld/testsuite/ld-elf/pr21562n.d b/ld/testsuite/ld-elf/pr21562n.d
index 561ec6bec1b..f12b23d7ea0 100644
--- a/ld/testsuite/ld-elf/pr21562n.d
+++ b/ld/testsuite/ld-elf/pr21562n.d
@@ -2,12 +2,12 @@
#ld: -shared -z defs --gc-sections -T pr21562d.t
#readelf: -s -S --wide
#target: *-*-linux* *-*-gnu*
-#notarget: d30v-*-* dlx-*-* i960-*-* pj*-*-*
-#notarget: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
-#notarget: bfin-*-* cr16-*-* cr16c-*-* cris*-*-* crx-*-* epiphany-*-*
-#notarget: h8300-*-* ip2k-*-* m10200-*-* m10300-*-* m32c-*-* metag-*-*
-#notarget: metag-*-* rl78-*-* rx-*-* sh*-*-* v850*-*-*
-# Targets with a leading char will faill this test.
+#xfail: d30v-*-* dlx-*-* i960-*-* pj*-*-*
+#xfail: hppa64-*-* i370-*-* i860-*-* ia64-*-* mep-*-* mn10200-*-*
+#xfail: bfin-*-* cr16-*-* cr16c-*-* crx-*-* epiphany-*-*
+#xfail: h8300-*-* ip2k-*-* mn10200-*-* mn10300-*-* m32c-*-* metag-*-*
+#xfail: rl78-*-* rx-*-* v850*-*-*
+# Targets with a leading char will fail this test.
# generic linker targets don't support --gc-sections, nor do a bunch of others
#...
diff --git a/ld/testsuite/ld-elf/sizeofa.d b/ld/testsuite/ld-elf/sizeofa.d
index d4432a0f068..340456de8a3 100644
--- a/ld/testsuite/ld-elf/sizeofa.d
+++ b/ld/testsuite/ld-elf/sizeofa.d
@@ -1,16 +1,17 @@
#source: sizeof.s
#ld: -Ur
#readelf: -sW
-#notarget: bfin-*-* cr16-*-* cr16c-*-* cris*-*-* crx-*-* epiphany-*-*
-#notarget: h8300-*-* ip2k-*-* m10200-*-* m10300-*-* m32c-*-* metag-*-*
-#notarget: metag-*-* rl78-*-* rx-*-* sh*-*-* v850*-*-*
-# Targets with a leading char will faill this test.
+#xfail: bfin-*-* cr16-*-* cr16c-*-* cris*-*-elf crx-*-* epiphany-*-*
+#xfail: h8300-*-* ip2k-*-* mn10200-*-* mn10300-*-* m32c-*-* metag-*-*
+#xfail: rl78-*-* rx-*-* sh*-*-elf* sh*-*-kaos* sh*-*-nto* sh-*-rtems*
+#xfail: sh*-*-symbianelf* sh*-*-vxworks v850*-*-*
+# Targets with a leading char will fail this test.
Symbol table '\.symtab' contains [0-9]+ entries:
+Num: +Value +Size Type +Bind +Vis +Ndx Name
+0: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND +
#...
- +[0-9]+: +[a-f0-9]+ +0 +NOTYPE +GLOBAL +DEFAULT +[0-9]+ +__stop_scnfoo
+ +[0-9]+: +[a-f0-9]+ +0 +NOTYPE +(LOC|GLOB)AL +DEFAULT +[0-9]+ +__stop_scnfoo
#...
+[0-9]+: +[a-f0-9]+ +0 +NOTYPE +GLOBAL +DEFAULT +UND +.sizeof.scnfoo
#pass
diff --git a/ld/testsuite/ld-elf/sizeofb.d b/ld/testsuite/ld-elf/sizeofb.d
index cd3920b006d..e25d88f06fe 100644
--- a/ld/testsuite/ld-elf/sizeofb.d
+++ b/ld/testsuite/ld-elf/sizeofb.d
@@ -2,10 +2,10 @@
#ld: -shared
#readelf: -sW
#target: *-*-linux* *-*-gnu*
-#notarget: bfin-*-* cr16-*-* cr16c-*-* cris*-*-* crx-*-* epiphany-*-*
-#notarget: h8300-*-* ip2k-*-* m10200-*-* m10300-*-* m32c-*-* metag-*-*
-#notarget: metag-*-* rl78-*-* rx-*-* sh*-*-* v850*-*-*
-# Targets with a leading char will faill this test.
+#xfail: bfin-*-* cr16-*-* cr16c-*-* crx-*-* epiphany-*-*
+#xfail: h8300-*-* ip2k-*-* mn10200-*-* mn10300-*-* m32c-*-* metag-*-*
+#xfail: rl78-*-* rx-*-* v850*-*-*
+# Targets with a leading char will fail this test.
Symbol table '\.dynsym' contains [0-9]+ entries:
+Num: +Value +Size Type +Bind +Vis +Ndx Name
@@ -13,5 +13,5 @@ Symbol table '\.dynsym' contains [0-9]+ entries:
#...
+[0-9]+: +[a-f0-9]+ +0 +NOTYPE +LOCAL +DEFAULT +[0-9]+ +__stop_scnfoo
#...
- +[0-9]+: 0+10 + +0 +NOTYPE +GLOBAL +DEFAULT +ABS +.sizeof.scnfoo
+ +[0-9]+: 0+10 + +0 +NOTYPE +LOCAL +DEFAULT +ABS +.sizeof.scnfoo
#pass
diff --git a/ld/testsuite/ld-elf/startofa.d b/ld/testsuite/ld-elf/startofa.d
index cb261df7f5a..19ac29d2ee1 100644
--- a/ld/testsuite/ld-elf/startofa.d
+++ b/ld/testsuite/ld-elf/startofa.d
@@ -1,16 +1,17 @@
#source: startof.s
#ld: -Ur
#readelf: -sW
-#notarget: bfin-*-* cr16-*-* cr16c-*-* cris*-*-* crx-*-* epiphany-*-*
-#notarget: h8300-*-* ip2k-*-* m10200-*-* m10300-*-* m32c-*-* metag-*-*
-#notarget: metag-*-* rl78-*-* rx-*-* sh*-*-* v850*-*-*
-# Targets with a leading char will faill this test.
+#xfail: bfin-*-* cr16-*-* cr16c-*-* cris*-*-elf crx-*-* epiphany-*-*
+#xfail: h8300-*-* ip2k-*-* mn10200-*-* mn10300-*-* m32c-*-* metag-*-*
+#xfail: rl78-*-* rx-*-* sh*-*-elf* sh*-*-kaos* sh*-*-nto* sh-*-rtems*
+#xfail: sh*-*-symbianelf* sh*-*-vxworks v850*-*-*
+# Targets with a leading char will fail this test.
Symbol table '\.symtab' contains [0-9]+ entries:
+Num: +Value +Size Type +Bind +Vis +Ndx Name
+0: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND +
#...
- +[0-9]+: +[a-f0-9]+ +0 +NOTYPE +GLOBAL +DEFAULT +UND +.startof.scnfoo
+ +[0-9]+: +[a-f0-9]+ +0 +NOTYPE +(LOCAL +DEFAULT +[0-9]+ +__start_scnfoo|GLOBAL +DEFAULT +UND +.startof.scnfoo)
#...
- +[0-9]+: +[a-f0-9]+ +0 +NOTYPE +GLOBAL +DEFAULT +[0-9]+ +__start_scnfoo
+ +[0-9]+: +[a-f0-9]+ +0 +NOTYPE +GLOBAL +DEFAULT +(UND +.startof.scnfoo|[0-9]+ +__start_scnfoo)
#pass
diff --git a/ld/testsuite/ld-elf/startofb.d b/ld/testsuite/ld-elf/startofb.d
index 0d1da663bdd..2cc1b861490 100644
--- a/ld/testsuite/ld-elf/startofb.d
+++ b/ld/testsuite/ld-elf/startofb.d
@@ -2,16 +2,16 @@
#ld: -shared
#readelf: -sW
#target: *-*-linux* *-*-gnu*
-#notarget: bfin-*-* cr16-*-* cr16c-*-* cris*-*-* crx-*-* epiphany-*-*
-#notarget: h8300-*-* ip2k-*-* m10200-*-* m10300-*-* m32c-*-* metag-*-*
-#notarget: metag-*-* rl78-*-* rx-*-* sh*-*-* v850*-*-*
-# Targets with a leading char will faill this test.
+#xfail: bfin-*-* cr16-*-* cr16c-*-* crx-*-* epiphany-*-*
+#xfail: h8300-*-* ip2k-*-* mn10200-*-* mn10300-*-* m32c-*-* metag-*-*
+#xfail: rl78-*-* rx-*-* v850*-*-*
+# Targets with a leading char will fail this test.
Symbol table '\.dynsym' contains [0-9]+ entries:
+Num: +Value +Size Type +Bind +Vis +Ndx Name
+0: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND +
#...
- +[0-9]+: +[a-f0-9]+ +0 +NOTYPE +GLOBAL +DEFAULT +[0-9]+ +.startof.scnfoo
+ +[0-9]+: +[a-f0-9]+ +0 +NOTYPE +LOCAL +DEFAULT +[0-9]+ +.startof.scnfoo
#...
+[0-9]+: +[a-f0-9]+ +0 +NOTYPE +LOCAL +DEFAULT +[0-9]+ +__start_scnfoo
#pass