A few hppa testcase tidies

binutils/
	* testsuite/lib/binutils-common.exp (is_som_format): New proc.
	(run_dump_test): Correct target test for alternate .comm syntax.
	(get_standard_section_names): Handle som format.
	* testsuite/lib/utils-lib.exp (default_binutils_assemble_flags):
	Correct target test for alternate .comm syntax.
gas/
	* testsuite/gas/all/gas.exp (redef3): Don't xfail for hppa.
	(octa): Run for hppa.
	* testsuite/gas/elf/elf.exp (common1, common2): Likewise.
	* testsuite/gas/elf/symver.d: Delete notarget.
ld/
	* testsuite/ld-elf/comm-data5.d: Remove notarget for hppa.
	* testsuite/ld-scripts/defined6.d: Likewise.
This commit is contained in:
Alan Modra 2018-09-17 08:51:24 +09:30
parent 8c9604b6a2
commit 0b1352e04c
10 changed files with 45 additions and 24 deletions

View File

@ -1,3 +1,11 @@
2018-09-17 Alan Modra <amodra@gmail.com>
* testsuite/lib/binutils-common.exp (is_som_format): New proc.
(run_dump_test): Correct target test for alternate .comm syntax.
(get_standard_section_names): Handle som format.
* testsuite/lib/utils-lib.exp (default_binutils_assemble_flags):
Correct target test for alternate .comm syntax.
2018-09-17 Alan Modra <amodra@gmail.com>
* testsuite/binutils-all/strip-13mips64.s: Add section flags

View File

@ -105,6 +105,19 @@ proc is_pecoff_format {} {
return 1
}
proc is_som_format {} {
if { ![istarget hppa*-*-*] || [istarget hppa*64*-*-*] } {
return 0;
}
if { [istarget *-*-osf*] \
|| [istarget {*-*-h[ip]ux*}] \
|| [istarget *-*-mpeix*] \
|| [istarget *-*-bsd*] } {
return 1;
}
return 0;
}
# True if the object format is known to be 64-bit ELF.
#
proc is_elf64 { binary_file } {
@ -945,7 +958,9 @@ proc run_dump_test { name {extra_options {}} } {
set cmdret 1
}
} else {
if { [istarget "hppa*-*-*"] && ![istarget "*-*-linux*" ] } {
if { [istarget "hppa*-*-*"] \
&& ![istarget "*-*-linux*"] \
&& ![istarget "*-*-netbsd*" ] } {
set cmd "sed -e 's/^\[ \]*\.comm \\(\[^,\]*\\),\\(.*\\)/\\1 .comm \\2/' < $sourcefile > tmpdir/asm.s"
send_log "$cmd\n"
set cmdret [remote_exec host [concat sh -c [list "$cmd"]]]
@ -1328,9 +1343,8 @@ proc get_standard_section_names {} {
if [istarget "rx-*-*"] {
return { "P" "D_1" "B_1" }
}
if [istarget "alpha*-*-*vms*"] {
# Double quote: for TCL and for sh.
return { "\\\$CODE\\\$" "\\\$DATA\\\$" "\\\$BSS\\\$" }
if { [istarget "alpha*-*-*vms*"] || [is_som_format] } {
return { {\$CODE\$} {\$DATA\$} {\$BSS\$} }
}
return
}

View File

@ -117,7 +117,9 @@ proc default_binutils_assemble_flags { source object asflags } {
# This is a hack in that it won't scale well if other targets need
# similar transformations to assemble. We'll generalize the hack
# if/when other targets need similar handling.
if { [istarget "hppa*-*-*"] && ![istarget "*-*-linux*" ] } then {
if { [istarget "hppa*-*-*"] \
&& ![istarget "*-*-linux*"] \
&& ![istarget "*-*-netbsd*" ] } {
set sed_file $srcdir/config/hppa.sed
send_log "sed -f $sed_file < $source > asm.s\n"
verbose "sed -f $sed_file < $source > asm.s"

View File

@ -1,3 +1,10 @@
2018-09-17 Alan Modra <amodra@gmail.com>
* testsuite/gas/all/gas.exp (redef3): Don't xfail for hppa.
(octa): Run for hppa.
* testsuite/gas/elf/elf.exp (common1, common2): Likewise.
* testsuite/gas/elf/symver.d: Delete notarget.
2018-09-17 Nick Clifton <nickc@redhat.com>
* testuite/gas/elf/group0a.d: Add extra details to the test

View File

@ -170,8 +170,6 @@ case $target_triplet in {
setup_xfail "riscv*-*-*" "rx-*-*" "vax*-*-*" "xgate*-*-*" "z8k-*-*"
# rs6000-aix disallows redefinition via .comm.
setup_xfail "*-*-aix*"
# SOM uses a different syntax for .comm
setup_xfail "hppa*-*-hpux*"
# These targets fail redef3 because section contents for the
# word referencing the .comm sym is not zero and/or its reloc
# has a non-zero addend. Relaxing the test would hide real
@ -414,17 +412,7 @@ if { ![istarget "powerpc*-*-*"] && ![istarget "rs6000*-*-*"] && ![istarget "s390
}
run_dump_test quad
# som doesn't use .data section.
case $target_triplet in {
{ hppa*64*-*-* } {
run_dump_test octa
}
{ hppa*-*-hpux* } { }
default {
run_dump_test octa
}
}
run_dump_test octa
# .set works differently on some targets.
case $target_triplet in {

View File

@ -252,10 +252,11 @@ if { [is_elf_format] } then {
run_dump_test "missing-build-notes"
run_dump_test "common1"
run_dump_test "common2"
# hpux has a non-standard common directive.
if { ![istarget "*-*-hpux*"] } then {
run_dump_test "common1"
run_dump_test "common2"
run_dump_test "common3a"
run_dump_test "common3b"
run_dump_test "common4a"

View File

@ -1,6 +1,5 @@
#objdump: --syms
#name: ELF symbol versioning
#notarget: hppa64*-*-hpux*
#
# The #... and #pass are there to match extra symbols inserted by
# some toolchains, eg the mips-elf port will add .reginfo and .ptrd

View File

@ -1,3 +1,8 @@
2018-09-17 Alan Modra <amodra@gmail.com>
* testsuite/ld-elf/comm-data5.d: Remove notarget for hppa.
* testsuite/ld-scripts/defined6.d: Likewise.
2018-09-17 Nick Clifton <nickc@redhat.com>
* testuite/ld/ld-elf/audit.exp: Differentiate the names of the

View File

@ -1,7 +1,6 @@
#source: comm-data5.s
#ld:
#readelf: -r
#notarget: hppa64*-*-hpux*
#xfail: frv-*-*linux*
There are no relocations in this file.

View File

@ -1,8 +1,6 @@
#source: defined6.s
#ld: -T defined6.t
#nm: -B
#notarget: hppa*-hpux*
# hppa64-hpux has a different .comm
# Check that DEFINED works with various symbol types
#...