* core.c (core_sym_class): Ignore symbols without BSF_FUNCTION

set if ignore_non_function is set.
        * gprof.h (ignore_non_functions): Declare.
        * gprof.c (ignore_non_functions): Define.
        (long_options): Add "ignore-non-functions".
        (usage): Add new options.
        (main): Recognize "-D" and "--ignore-non-functions" option.
So we can get more accurate information on Solaris, HPUX and other
systems that can uniquely identify function symbols.
This commit is contained in:
Jeff Law
1995-12-25 04:32:29 +00:00
parent 7920c1d195
commit 32843f948c
5 changed files with 32 additions and 3 deletions

View File

@ -179,6 +179,12 @@ DEFUN (core_sym_class, (sym), asymbol * sym)
{
return 0;
}
/* If the object file supports marking of function symbols, then we can
zap anything that doesn't have BSF_FUNCTION set. */
if (ignore_non_functions && (sym->flags & BSF_FUNCTION) == 0)
return 0;
return 't'; /* it's a static text symbol */
}