nm.c (print_symbol_info_bsd): Print the symbol's size instead of the symbol's

value when --size-sort is used, unless -S is used.
doc/binutils.texi (--size-sort): For non-bsd formats both the value and size
of the symbols are displayed.
This commit is contained in:
Nick Clifton 2003-03-17 10:14:07 +00:00
parent 27adcae577
commit 06a30c77e0
3 changed files with 18 additions and 5 deletions

View file

@ -1539,11 +1539,18 @@ print_symbol_info_bsd (info, abfd)
}
else
{
print_value (abfd, SYM_VALUE (info));
/* Normally we print the value of the symbol. If we are printing the
size or sorting by size then we print its size, execpt for the
(weird) special case where both flags are defined, in which case we
print both values. This conforms to documented behaviour. */
if (sort_by_size && !print_size)
print_value (abfd, SYM_SIZE (info));
else
print_value (abfd, SYM_VALUE (info));
if (print_size && SYM_SIZE (info))
{
printf(" ");
printf (" ");
print_value (abfd, SYM_SIZE (info));
}
}