mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 17:18:55 +00:00
Add option to nm to change the characters displayed for ifunc symbols. Add a configure time option to change the default characters.
PR 22967 * nm.c (ifunc_type_chars): New variable. (long_options): Add --ifunc-chars. (print_symbol): Use ifunc_type_chars for ifunc symbols. (main): Handle the new option. * doc/binutils.texi: Document the new option. * configure.ac: Add --enable-f-for-ifunc-symbols option which changes the default symbol displayed by nm. * NEWS: Mention the new feature. * testsuite/binutils-all/nm.exp: Test the new feature. * config.in: Regenerate. * configure: Regenerate.
This commit is contained in:
@@ -298,6 +298,49 @@ if [is_elf_format] {
|
||||
remote_file host delete $tmpfile
|
||||
}
|
||||
}
|
||||
|
||||
# PR 22967
|
||||
# Test nm --ifunc-chars on a indirect symbols.
|
||||
|
||||
# The following targets are known to not support ifuncs.
|
||||
setup_xfail "alpha*-*-*"
|
||||
setup_xfail "arm*-*-nto*"
|
||||
setup_xfail "arm*-*-netbsdelf*"
|
||||
setup_xfail "mips*-*-*"
|
||||
setup_xfail "msp430*-*-*"
|
||||
setup_xfail "tx39*-*-*"
|
||||
setup_xfail "visium*-*-*"
|
||||
|
||||
set testname "nm --ifunc-chars"
|
||||
if {![binutils_assemble $srcdir/$subdir/ifunc.s tmpdir/ifunc.o]} then {
|
||||
fail "$testname (assembly)"
|
||||
} else {
|
||||
if [is_remote host] {
|
||||
set tmpfile [remote_download host tmpdir/ifunc.o]
|
||||
} else {
|
||||
set tmpfile tmpdir/ifunc.o
|
||||
}
|
||||
|
||||
set got [binutils_run $NM "$NMFLAGS --ifunc-chars=Ff $tmpfile"]
|
||||
|
||||
if [regexp "F global_foo" $got] then {
|
||||
pass "$testname (global ifunc)"
|
||||
} else {
|
||||
fail "$testname (global ifunc)"
|
||||
}
|
||||
|
||||
if [regexp "f local_foo" $got] then {
|
||||
pass "$testname (local ifunc)"
|
||||
} else {
|
||||
fail "$testname (local ifunc)"
|
||||
}
|
||||
|
||||
if { $verbose < 1 } {
|
||||
remote_file host delete "tmpdir/ifunc.o"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
# There are certainly other tests that could be run.
|
||||
|
||||
Reference in New Issue
Block a user