diff options
author | Nick Clifton <nickc@redhat.com> | 2003-03-17 10:14:07 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2003-03-17 10:14:07 +0000 |
commit | 06a30c77e0dd15dc3adf2d261815580ecc534d27 (patch) | |
tree | 8abcfea7838125f2af740e23803ed42a12bc9b89 /binutils/nm.c | |
parent | 27adcae577a61dd830a5920b06832a9655b72386 (diff) | |
download | gdb-06a30c77e0dd15dc3adf2d261815580ecc534d27.zip gdb-06a30c77e0dd15dc3adf2d261815580ecc534d27.tar.gz gdb-06a30c77e0dd15dc3adf2d261815580ecc534d27.tar.bz2 |
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.
Diffstat (limited to 'binutils/nm.c')
-rw-r--r-- | binutils/nm.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/binutils/nm.c b/binutils/nm.c index 4f558c1..8463acb 100644 --- a/binutils/nm.c +++ b/binutils/nm.c @@ -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)); } } |