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.
+2003-03-16 Elias Athanasopoulos <elathan@phys.uoa.gr>
+
+ * 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.
+
2003-03-13 Nick Clifton <nickc@redhat.com>
* po/da.po: Update.
@item -S
@itemx --print-size
-Print size of defined symbols for the @code{bsd} output format.
+Print size, not the value, of defined symbols for the @code{bsd} output format.
@item -s
@itemx --print-armap
@item --size-sort
Sort symbols by size. The size is computed as the difference between
the value of the symbol and the value of the symbol with the next higher
-value. The size of the symbol is printed, rather than the value.
-structure. If the @code{bsd} output format is used the size of the symbol
+value. If the @code{bsd} output format is used the size of the symbol
is printed, rather than the value, and @samp{-S} must be used in order
both size and value to be printed.
}
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));
}
}