is_underscore_target for ld-elf tests

and correct targ_underscore in config.bfd

bfd/
	* config.bfd: Correct targ_underscore for epiphany, ip2k,
	m32c, mn10200, pru, rl78, rx, crisv32 and v850.
ld/
	* testsuite/lib/ld-lib.exp (is_underscore_target): New.
	* testsuite/ld-elf/elf.exp (ASFLAGS): Define UNDERSCORE.
	* testsuite/ld-elf/pr21562a.s: If UNDERSCORE defined,
	reference sym with prefix.
	* testsuite/ld-elf/pr21562b.s: Likewise.
	* testsuite/ld-elf/sizeof.s: Likewise.
	* testsuite/ld-elf/startof.s: Likewise.
	* testsuite/ld-elf/pr14156a.d: Adjust for extra symbols.
	* testsuite/ld-elf/pr21562a.d: Remove underscore target from
	xfails, and match prefixed symbol.
	* 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.
	* testsuite/ld-elf/sizeofb.d: Likewise.
	* testsuite/ld-elf/sizeofc.d: Likewise.
	* testsuite/ld-elf/startofa.d: Likewise.
	* testsuite/ld-elf/startofb.d: Likewise.
	* testsuite/ld-elf/startofc.d: Likewise.
This commit is contained in:
Alan Modra 2017-06-18 09:19:34 +09:30
parent 99149362b1
commit bdd32e03c5
30 changed files with 112 additions and 98 deletions

View File

@ -1,3 +1,8 @@
2017-06-18 Alan Modra <amodra@gmail.com>
* config.bfd: Correct targ_underscore for epiphany, ip2k,
m32c, mn10200, pru, rl78, rx, crisv32 and v850.
2017-06-16 Nick Clifton <nickc@redhat.com>
* elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the

View File

@ -500,10 +500,15 @@ case "${targ}" in
targ_underscore=yes
;;
cris-*-* | crisv32-*-*)
cris-*-*)
targ_defvec=cris_aout_vec
targ_selvecs="cris_elf32_us_vec cris_elf32_vec ieee_vec"
targ_underscore=yes
;;
crisv32-*-*)
targ_defvec=cris_aout_vec
targ_selvecs="cris_elf32_us_vec cris_elf32_vec ieee_vec"
targ_underscore=yes # Note: not true for cris_elf32_vec.
;;
crx-*-elf*)
@ -526,6 +531,7 @@ case "${targ}" in
epiphany-*-*)
targ_defvec=epiphany_elf32_vec
targ_underscore=yes
;;
fido-*-elf* )
@ -913,6 +919,7 @@ case "${targ}" in
ip2k-*-elf)
targ_defvec=ip2k_elf32_vec
targ_underscore=yes
;;
iq2000-*-elf)
@ -931,6 +938,7 @@ case "${targ}" in
m32c-*-elf | m32c-*-rtems*)
targ_defvec=m32c_elf32_vec
targ_underscore=yes
;;
m32r*le-*-linux*)
@ -1231,6 +1239,7 @@ case "${targ}" in
#endif
mn10200-*-*)
targ_defvec=mn10200_elf32_vec
targ_underscore=yes
;;
mn10300-*-*)
@ -1435,7 +1444,6 @@ case "${targ}" in
pru-*-*)
targ_defvec=pru_elf32_vec
targ_underscore=yes
;;
#ifdef BFD64
@ -1453,11 +1461,13 @@ case "${targ}" in
rl78-*-elf)
targ_defvec=rl78_elf32_vec
targ_underscore=yes
;;
rx-*-elf)
targ_defvec=rx_elf32_le_vec
targ_selvecs="rx_elf32_be_vec rx_elf32_le_vec rx_elf32_be_ns_vec"
targ_underscore=yes
;;
s390-*-linux*)
@ -1767,6 +1777,7 @@ case "${targ}" in
v850*-*-*)
targ_defvec=v850_elf32_vec
targ_selvecs="v800_elf32_vec"
targ_underscore=yes
;;
vax-*-netbsdelf*)

View File

@ -1,3 +1,35 @@
2017-06-18 Alan Modra <amodra@gmail.com>
* testsuite/lib/ld-lib.exp (is_underscore_target): New.
* testsuite/ld-elf/elf.exp (ASFLAGS): Define UNDERSCORE.
* testsuite/ld-elf/pr21562a.s: If UNDERSCORE defined,
reference sym with prefix.
* testsuite/ld-elf/pr21562b.s: Likewise.
* testsuite/ld-elf/sizeof.s: Likewise.
* testsuite/ld-elf/startof.s: Likewise.
* testsuite/ld-elf/pr14156a.d: Adjust for extra symbols.
* testsuite/ld-elf/pr21562a.d: Remove underscore target from
xfails, and match prefixed symbol.
* 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.
* testsuite/ld-elf/sizeofb.d: Likewise.
* testsuite/ld-elf/sizeofc.d: Likewise.
* testsuite/ld-elf/startofa.d: Likewise.
* testsuite/ld-elf/startofb.d: Likewise.
* testsuite/ld-elf/startofc.d: Likewise.
2017-06-16 Alan Modra <amodra@gmail.com>
PR ld/20022

View File

@ -178,6 +178,10 @@ if { [check_shared_lib_support] } then {
{pr20995a.s} {{readelf {-S --wide} pr20995.r}} "pr20995-2"]]
}
if [is_underscore_target] {
set ASFLAGS "$ASFLAGS --defsym UNDERSCORE=1"
}
set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]]
foreach t $test_list {
# We need to strip the ".d", but can leave the dirname.

View File

@ -10,6 +10,7 @@
#...
[0-9a-f]+ T foo
[0-9a-f]+ t foo1
#...
[0-9a-f]+ t foo2
[0-9a-f]+ t foo3
[0-9a-f]+ t last

View File

@ -3,14 +3,10 @@
#target: *-*-linux* *-*-gnu*
#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
#...
\[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*
#...
+[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +__start_scnfoo
+[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?start_scnfoo
#pass

View File

@ -5,4 +5,8 @@
.data
.type bar, %object
bar:
.ifdef UNDERSCORE
.dc.a ___start_scnfoo
.else
.dc.a __start_scnfoo
.endif

View File

@ -3,14 +3,10 @@
#target: *-*-linux* *-*-gnu*
#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
#...
\[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*
#...
+[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +__stop_scnfoo
+[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?stop_scnfoo
#pass

View File

@ -5,4 +5,8 @@
.data
.type bar, %object
bar:
.ifdef UNDERSCORE
.dc.a ___stop_scnfoo
.else
.dc.a __stop_scnfoo
.endif

View File

@ -4,14 +4,10 @@
#target: *-*-linux* *-*-gnu*
#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
#...
\[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*
#...
+[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +__start_scnfoo
+[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?start_scnfoo
#pass

View File

@ -4,14 +4,10 @@
#target: *-*-linux* *-*-gnu*
#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
#...
\[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*
#...
+[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +__stop_scnfoo
+[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?stop_scnfoo
#pass

View File

@ -2,13 +2,9 @@
#ld: -shared -z defs
#readelf: -s -S --wide
#target: *-*-linux* *-*-gnu*
#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]+.*
#...
+[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +__start_scnfoo
+[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?start_scnfoo
#pass

View File

@ -2,13 +2,9 @@
#ld: -shared -z defs
#readelf: -s -S --wide
#target: *-*-linux* *-*-gnu*
#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]+.*
#...
+[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +__stop_scnfoo
+[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?stop_scnfoo
#pass

View File

@ -2,13 +2,9 @@
#ld: -shared -z defs -T pr21562a.t
#readelf: -s -S --wide
#target: *-*-linux* *-*-gnu*
#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]+.*
#...
+[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +__start_scnfoo
+[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?start_scnfoo
#pass

View File

@ -2,13 +2,9 @@
#ld: -shared -z defs -T pr21562a.t
#readelf: -s -S --wide
#target: *-*-linux* *-*-gnu*
#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]+.*
#...
+[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +__stop_scnfoo
+[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?stop_scnfoo
#pass

View File

@ -4,14 +4,10 @@
#target: *-*-linux* *-*-gnu*
#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
#...
\[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*
#...
+[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +__start_scnfoo
+[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?start_scnfoo
#pass

View File

@ -4,14 +4,10 @@
#target: *-*-linux* *-*-gnu*
#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
#...
\[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*
#...
+[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +__stop_scnfoo
+[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?stop_scnfoo
#pass

View File

@ -4,14 +4,10 @@
#target: *-*-linux* *-*-gnu*
#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
#...
\[[ 0-9]+\] \.foo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*
#...
+[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +__start_scnfoo
+[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?start_scnfoo
#pass

View File

@ -4,14 +4,10 @@
#target: *-*-linux* *-*-gnu*
#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
#...
\[[ 0-9]+\] \.foo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*
#...
+[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +__stop_scnfoo
+[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?stop_scnfoo
#pass

View File

@ -4,14 +4,10 @@
#target: *-*-linux* *-*-gnu*
#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
#...
\[[ 0-9]+\] \.foo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*
#...
+[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +__start_scnfoo
+[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?start_scnfoo
#pass

View File

@ -4,14 +4,10 @@
#target: *-*-linux* *-*-gnu*
#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
#...
\[[ 0-9]+\] \.foo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*
#...
+[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +__stop_scnfoo
+[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?stop_scnfoo
#pass

View File

@ -7,5 +7,9 @@
.type bar, %object
.size bar, 8
bar:
.ifdef UNDERSCORE
.dc.a ___stop_scnfoo
.else
.dc.a __stop_scnfoo
.endif
.dc.a .sizeof. (scnfoo)

View File

@ -1,17 +1,12 @@
#source: sizeof.s
#ld: -Ur
#readelf: -sW
#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 +(LOC|GLOB)AL +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

View File

@ -2,16 +2,12 @@
#ld: -shared
#readelf: -sW
#target: *-*-linux* *-*-gnu*
#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 +LOCAL +DEFAULT +[0-9]+ +__stop_scnfoo
+[0-9]+: +[a-f0-9]+ +0 +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?stop_scnfoo
#...
+[0-9]+: 0+10 + +0 +NOTYPE +LOCAL +DEFAULT +ABS +.sizeof.scnfoo
#pass

View File

@ -6,7 +6,7 @@ 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 +__stop_scnfoo
+[0-9]+: +[a-f0-9]+ +0 +NOTYPE +GLOBAL +DEFAULT +UND +___?stop_scnfoo
#...
+[0-9]+: +[a-f0-9]+ +0 +NOTYPE +GLOBAL +DEFAULT +UND +.sizeof.scnfoo
#pass

View File

@ -7,5 +7,9 @@
.type bar, %object
.size bar, 8
bar:
.ifdef UNDERSCORE
.dc.a ___start_scnfoo
.else
.dc.a __start_scnfoo
.endif
.dc.a .startof. (scnfoo)

View File

@ -1,17 +1,12 @@
#source: startof.s
#ld: -Ur
#readelf: -sW
#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 +(LOCAL +DEFAULT +[0-9]+ +__start_scnfoo|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 +(UND +.startof.scnfoo|[0-9]+ +__start_scnfoo)
+[0-9]+: +[a-f0-9]+ +0 +NOTYPE +GLOBAL +DEFAULT +(UND +.startof.scnfoo|[0-9]+ +___?start_scnfoo)
#pass

View File

@ -2,10 +2,6 @@
#ld: -shared
#readelf: -sW
#target: *-*-linux* *-*-gnu*
#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 +9,5 @@ Symbol table '\.dynsym' contains [0-9]+ entries:
#...
+[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
+[0-9]+: +[a-f0-9]+ +0 +NOTYPE +LOCAL +DEFAULT +[0-9]+ +___?start_scnfoo
#pass

View File

@ -8,5 +8,5 @@ Symbol table '\.symtab' contains [0-9]+ entries:
#...
+[0-9]+: +[a-f0-9]+ +0 +NOTYPE +GLOBAL +DEFAULT +UND +.startof.scnfoo
#...
+[0-9]+: +[a-f0-9]+ +0 +NOTYPE +GLOBAL +DEFAULT +UND +__start_scnfoo
+[0-9]+: +[a-f0-9]+ +0 +NOTYPE +GLOBAL +DEFAULT +UND +___?start_scnfoo
#pass

View File

@ -1858,6 +1858,25 @@ proc is_generic_elf { } {
return 0;
}
proc is_underscore_target { } {
global is_underscore_target_saved
global target_triplet
global srcdir
if { ![info exists is_underscore_target_saved] } {
set cmd "targ=$target_triplet . $srcdir/../../bfd/config.bfd &&"
append cmd { echo "$targ_underscore"}
verbose -log "$cmd"
set status [catch {exec sh -c $cmd} result]
if { $status == 0 && [string match "yes" $result] } {
set is_underscore_target_saved 1
} else {
set is_underscore_target_saved 0
}
}
return $is_underscore_target_saved
}
# Returns true if the target ld supports the plugin API.
proc check_plugin_api_available { } {
global plugin_api_available_saved