From 8eca1095d96c215409371c5687573aac89a0a980 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 14 Jun 2017 04:36:17 -0700 Subject: [PATCH] Skip PR ld/21562 tests on targets with leading char or without --gc-sections Symbol lookup in linker will always fail on targets with leading char in symbol name since __start_SECNAME and __stop_SECNAME in C may be ___start_SECNAME and ___stop_SECNAME in assembly. Also tests with --gc-sections always fails on targets without --gc-sections support. * testsuite/ld-elf/pr21562a.d: Skip on targets with leading char in in symbol name or without --gc-sections. * testsuite/ld-elf/pr21562b.d: Likewise. * testsuite/ld-elf/pr21562c.d: Likewise. * testsuite/ld-elf/pr21562d.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/pr21562e.d: Skip on targets with leading char in symbol name. * testsuite/ld-elf/pr21562f.d: Likewise. * testsuite/ld-elf/pr21562g.d: Likewise. * testsuite/ld-elf/pr21562h.d: Likewise. --- ld/ChangeLog | 19 +++++++++++++++++++ ld/testsuite/ld-elf/pr21562a.d | 7 +++++++ ld/testsuite/ld-elf/pr21562b.d | 7 +++++++ ld/testsuite/ld-elf/pr21562c.d | 7 +++++++ ld/testsuite/ld-elf/pr21562d.d | 7 +++++++ ld/testsuite/ld-elf/pr21562e.d | 4 ++++ ld/testsuite/ld-elf/pr21562f.d | 4 ++++ ld/testsuite/ld-elf/pr21562g.d | 4 ++++ ld/testsuite/ld-elf/pr21562h.d | 4 ++++ ld/testsuite/ld-elf/pr21562i.d | 7 +++++++ ld/testsuite/ld-elf/pr21562j.d | 7 +++++++ ld/testsuite/ld-elf/pr21562k.d | 7 +++++++ ld/testsuite/ld-elf/pr21562l.d | 7 +++++++ ld/testsuite/ld-elf/pr21562m.d | 7 +++++++ ld/testsuite/ld-elf/pr21562n.d | 7 +++++++ 15 files changed, 105 insertions(+) diff --git a/ld/ChangeLog b/ld/ChangeLog index 8c60970d86..fd073be3be 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,22 @@ +2017-06-14 H.J. Lu + + * testsuite/ld-elf/pr21562a.d: Skip on targets with leading char + in in symbol name or without --gc-sections. + * testsuite/ld-elf/pr21562b.d: Likewise. + * testsuite/ld-elf/pr21562c.d: Likewise. + * testsuite/ld-elf/pr21562d.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/pr21562e.d: Skip on targets with leading char + in symbol name. + * testsuite/ld-elf/pr21562f.d: Likewise. + * testsuite/ld-elf/pr21562g.d: Likewise. + * testsuite/ld-elf/pr21562h.d: Likewise. + 2017-06-14 H.J. Lu * testsuite/ld-gc/pr20022a.s: Add size to bar. diff --git a/ld/testsuite/ld-elf/pr21562a.d b/ld/testsuite/ld-elf/pr21562a.d index 009dcfc05c..3b0dc6517e 100644 --- a/ld/testsuite/ld-elf/pr21562a.d +++ b/ld/testsuite/ld-elf/pr21562a.d @@ -1,6 +1,13 @@ #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. +# generic linker targets don't support --gc-sections, nor do a bunch of others #... \[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.* diff --git a/ld/testsuite/ld-elf/pr21562b.d b/ld/testsuite/ld-elf/pr21562b.d index a03dbad6a0..af82bb8b69 100644 --- a/ld/testsuite/ld-elf/pr21562b.d +++ b/ld/testsuite/ld-elf/pr21562b.d @@ -1,6 +1,13 @@ #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. +# generic linker targets don't support --gc-sections, nor do a bunch of others #... \[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.* diff --git a/ld/testsuite/ld-elf/pr21562c.d b/ld/testsuite/ld-elf/pr21562c.d index 9de035faac..0fcc25ab9d 100644 --- a/ld/testsuite/ld-elf/pr21562c.d +++ b/ld/testsuite/ld-elf/pr21562c.d @@ -2,6 +2,13 @@ #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. +# generic linker targets don't support --gc-sections, nor do a bunch of others #... \[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.* diff --git a/ld/testsuite/ld-elf/pr21562d.d b/ld/testsuite/ld-elf/pr21562d.d index e5344eff80..b966b80114 100644 --- a/ld/testsuite/ld-elf/pr21562d.d +++ b/ld/testsuite/ld-elf/pr21562d.d @@ -2,6 +2,13 @@ #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. +# generic linker targets don't support --gc-sections, nor do a bunch of others #... \[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.* diff --git a/ld/testsuite/ld-elf/pr21562e.d b/ld/testsuite/ld-elf/pr21562e.d index afaf7e56a6..6f73c7b718 100644 --- a/ld/testsuite/ld-elf/pr21562e.d +++ b/ld/testsuite/ld-elf/pr21562e.d @@ -2,6 +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. #... \[[ 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 b9c324a47d..244f917c52 100644 --- a/ld/testsuite/ld-elf/pr21562f.d +++ b/ld/testsuite/ld-elf/pr21562f.d @@ -2,6 +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. #... \[[ 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 a813594d27..411e1e31e7 100644 --- a/ld/testsuite/ld-elf/pr21562g.d +++ b/ld/testsuite/ld-elf/pr21562g.d @@ -2,6 +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. #... \[[ 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 6adabd7ba4..dc4b72a760 100644 --- a/ld/testsuite/ld-elf/pr21562h.d +++ b/ld/testsuite/ld-elf/pr21562h.d @@ -2,6 +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. #... \[[ 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 49eb2ecb64..47b9cad0be 100644 --- a/ld/testsuite/ld-elf/pr21562i.d +++ b/ld/testsuite/ld-elf/pr21562i.d @@ -2,6 +2,13 @@ #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. +# generic linker targets don't support --gc-sections, nor do a bunch of others #... \[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.* diff --git a/ld/testsuite/ld-elf/pr21562j.d b/ld/testsuite/ld-elf/pr21562j.d index 14bb03587d..eba248786a 100644 --- a/ld/testsuite/ld-elf/pr21562j.d +++ b/ld/testsuite/ld-elf/pr21562j.d @@ -2,6 +2,13 @@ #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. +# generic linker targets don't support --gc-sections, nor do a bunch of others #... \[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.* diff --git a/ld/testsuite/ld-elf/pr21562k.d b/ld/testsuite/ld-elf/pr21562k.d index 1bf1e93177..594bc896a3 100644 --- a/ld/testsuite/ld-elf/pr21562k.d +++ b/ld/testsuite/ld-elf/pr21562k.d @@ -2,6 +2,13 @@ #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. +# generic linker targets don't support --gc-sections, nor do a bunch of others #... \[[ 0-9]+\] \.foo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.* diff --git a/ld/testsuite/ld-elf/pr21562l.d b/ld/testsuite/ld-elf/pr21562l.d index 8297ec2b8e..1a9c2d663b 100644 --- a/ld/testsuite/ld-elf/pr21562l.d +++ b/ld/testsuite/ld-elf/pr21562l.d @@ -2,6 +2,13 @@ #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. +# generic linker targets don't support --gc-sections, nor do a bunch of others #... \[[ 0-9]+\] \.foo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.* diff --git a/ld/testsuite/ld-elf/pr21562m.d b/ld/testsuite/ld-elf/pr21562m.d index 34f8df09aa..b21698a3cc 100644 --- a/ld/testsuite/ld-elf/pr21562m.d +++ b/ld/testsuite/ld-elf/pr21562m.d @@ -2,6 +2,13 @@ #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. +# generic linker targets don't support --gc-sections, nor do a bunch of others #... \[[ 0-9]+\] \.foo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.* diff --git a/ld/testsuite/ld-elf/pr21562n.d b/ld/testsuite/ld-elf/pr21562n.d index e4b1919c67..561ec6bec1 100644 --- a/ld/testsuite/ld-elf/pr21562n.d +++ b/ld/testsuite/ld-elf/pr21562n.d @@ -2,6 +2,13 @@ #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. +# generic linker targets don't support --gc-sections, nor do a bunch of others #... \[[ 0-9]+\] \.foo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.* -- 2.34.1