binutils nm testsuite tidy
We can run the gnu_unique_object symbol test on all ELF targets. Those that don't support the symbol type and fail to assemble can just be resolved as "unsupported". This means binutils_assemble can't report an error on assembly failure, but it probably should never have done that anyway. * testsuite/lib/utils-lib.exp (default_binutils_assemble_flags): Don't perror on assembler diagnostic output. * testsuite/binutils-all/nm.exp: Run unique symbol test on all ELF targets. Resolve as "unsupported" on assembly failure.
This commit is contained in:
parent
8af5c486ea
commit
4baeffab22
|
@ -1,3 +1,10 @@
|
||||||
|
2017-12-14 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
* testsuite/lib/utils-lib.exp (default_binutils_assemble_flags):
|
||||||
|
Don't perror on assembler diagnostic output.
|
||||||
|
* testsuite/binutils-all/nm.exp: Run unique symbol test on all
|
||||||
|
ELF targets. Resolve as "unsupported" on assembly failure.
|
||||||
|
|
||||||
2017-12-11 Renlin Li <renlin.li@arm.com>
|
2017-12-11 Renlin Li <renlin.li@arm.com>
|
||||||
|
|
||||||
* testsuite/binutils-all/aarch64/objdump.d: New.
|
* testsuite/binutils-all/aarch64/objdump.d: New.
|
||||||
|
|
|
@ -101,36 +101,27 @@ if {![info exists vars(text_symbol)] \
|
||||||
if [is_elf_format] {
|
if [is_elf_format] {
|
||||||
# PR binutils/12753
|
# PR binutils/12753
|
||||||
# Test nm -g on a unique global symbol.
|
# Test nm -g on a unique global symbol.
|
||||||
|
if {![binutils_assemble $srcdir/$subdir/unique.s tmpdir/unique.o]} then {
|
||||||
# Only some targets support unique symbols.
|
unsupported "nm -g on unique symbols"
|
||||||
if {([istarget "i?86-*-*"]
|
} else {
|
||||||
|| [istarget "x86_64-*-*"]
|
if [is_remote host] {
|
||||||
|| [istarget "arm-*-*"]
|
set tmpfile [remote_download host tmpdir/unique.o]
|
||||||
|| [istarget "powerpc*-*-*"]
|
|
||||||
|| [istarget "sparc*-*-*"])} then {
|
|
||||||
|
|
||||||
if {![binutils_assemble $srcdir/$subdir/unique.s tmpdir/unique.o]} then {
|
|
||||||
fail "nm -g on unique symbols (assembling)"
|
|
||||||
} else {
|
} else {
|
||||||
if [is_remote host] {
|
set tmpfile tmpdir/unique.o
|
||||||
set tmpfile [remote_download host tmpdir/unique.o]
|
|
||||||
} else {
|
|
||||||
set tmpfile tmpdir/unique.o
|
|
||||||
}
|
|
||||||
|
|
||||||
set got [binutils_run $NM "$NMFLAGS -g $tmpfile"]
|
|
||||||
|
|
||||||
if [regexp "u foo" $got] then {
|
|
||||||
pass "nm -g on unique symbols"
|
|
||||||
} else {
|
|
||||||
fail "nm -g on unique symbols"
|
|
||||||
}
|
|
||||||
|
|
||||||
if { $verbose < 1 } {
|
|
||||||
remote_file host delete "tmpdir/unique.o"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
set got [binutils_run $NM "$NMFLAGS -g $tmpfile"]
|
||||||
|
|
||||||
|
if [regexp "u foo" $got] then {
|
||||||
|
pass "nm -g on unique symbols"
|
||||||
|
} else {
|
||||||
|
fail "nm -g on unique symbols"
|
||||||
|
}
|
||||||
|
|
||||||
|
if { $verbose < 1 } {
|
||||||
|
remote_file host delete "tmpdir/unique.o"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test nm -P
|
# Test nm -P
|
||||||
|
|
|
@ -127,7 +127,6 @@ proc default_binutils_assemble_flags { source object asflags } {
|
||||||
} else {
|
} else {
|
||||||
send_log "$exec_output\n"
|
send_log "$exec_output\n"
|
||||||
verbose "$exec_output"
|
verbose "$exec_output"
|
||||||
perror "$source: assembly failed"
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue