bfd_vma ssize;
elf_symbol_type *elfinfo;
coff_symbol_type *coffinfo;
+ bool is_stab;
/* FIXME: We should add more fields for Type, Line, Section. */
};
#define SYM_VALUE(sym) (sym->sinfo->value)
bfd_get_symbol_info (abfd, sym, &syminfo);
+ info.is_stab = false;
+ if (syminfo.type == '-')
+ info.is_stab = true;
/* PR 22967 - Distinguish between local and global ifunc symbols. */
- if (syminfo.type == 'i'
+ else if (syminfo.type == 'i'
&& sym->flags & BSF_GNU_INDIRECT_FUNCTION)
{
if (ifunc_type_chars == NULL || ifunc_type_chars[0] == 0)
printf (" %c", SYM_TYPE (info));
- if (SYM_TYPE (info) == '-')
+ if (info->is_stab)
{
/* A stab. */
printf (" ");
printf ("| %c |", SYM_TYPE (info));
- if (SYM_TYPE (info) == '-')
+ if (info->is_stab)
{
/* A stab. */
printf ("%18s| ", SYM_STAB_NAME (info)); /* (C) Type. */
fail "$testname (local ifunc)"
}
+ # PR 32556
+ # Test nm --ifunc-chars=--
+
+ set got [binutils_run $NM "$NMFLAGS --ifunc-chars=-- $tmpfile"]
+
+ if [regexp -line "^\\S+ - global_foo$" $got] then {
+ pass "$testname=-- (global ifunc)"
+ } else {
+ fail "$testname=-- (global ifunc)"
+ }
+
+ if [regexp -line "^\\S+ - local_foo$" $got] then {
+ pass "$testname=-- (local ifunc)"
+ } else {
+ fail "$testname=-- (local ifunc)"
+ }
+
if { $verbose < 1 } {
remote_file host delete "tmpdir/ifunc.o"
}