(sort_by_size): New static variable.
(long_options): Add --size-sort.
(usage): Mention --size-sort.
(numeric_forward): Make static. Change from void * to PTR.
(numeric_reverse): Likewise.
(non_numeric_forward, non_numeric_reverse): Likewise.
(sorters): Change declaration from void * to PTR.
(size_forward, sort_symbol_by_size): New static functions.
(display_rel_file): Handle sort_by_size.
(filter_symbols): If sort_by_size, discard absolute and undefined
symbols.
* binutils.texi (nm): Document --size-sort.
* nm.1: Document --size-sort.
PR 3611.
+Wed Sep 14 12:19:07 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * nm.c: Include libiberty.h.
+ (sort_by_size): New static variable.
+ (long_options): Add --size-sort.
+ (usage): Mention --size-sort.
+ (numeric_forward): Make static. Change from void * to PTR.
+ (numeric_reverse): Likewise.
+ (non_numeric_forward, non_numeric_reverse): Likewise.
+ (sorters): Change declaration from void * to PTR.
+ (size_forward, sort_symbol_by_size): New static functions.
+ (display_rel_file): Handle sort_by_size.
+ (filter_symbols): If sort_by_size, discard absolute and undefined
+ symbols.
+ * binutils.texi (nm): Document --size-sort.
+ * nm.1: Document --size-sort.
+
Tue Sep 13 21:06:06 1994 Jeff Law (law@snake.cs.utah.edu)
* objcopy.c (copy_main): Initialize input_filename and
* objdump.c (objdump_print_address): Correct handling of end of
symbols when looking for next symbol with a different value.
-
Fri Jul 22 16:48:34 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
* nm.c (numeric_forward): Treat undefined symbols as "less than"
spaces equivalent to the width of a printed bfd_vma, rather than
assuming that 8 will look right.
-
Fri Jul 22 10:36:50 1994 Steve Chamberlain (sac@jonny.cygnus.com)
* coffgrok.c (doit): Zero all fields of new structure.
@smallexample
nm [ -a | --debug-syms ] [ -g | --extern-only ]
[ -B ] [ -C | --demangle ] [ -D | --dynamic ]
- [ -s | --print-armap ] [ -A | -o | --print-file-name ]
+ [ -s | --print-armap ] [ -A | -o | --print-file-name ]
[ -n | -v | --numeric-sort ] [ -p | --no-sort ]
- [ -r | --reverse-sort ] [ -u | --undefined-only ]
+ [ -r | --reverse-sort ] [ --size-sort ] [ -u | --undefined-only ]
[ -t @var{radix} | --radix=@var{radix} ] [ -P | --portability ]
[ --target=@var{bfdname} ] [ -f @var{format} | --format=@var{format} ]
[ --no-demangle ] [ -V | --version ] [ --help ] [ @var{objfile}@dots{} ]
Reverse the order of the sort (whether numeric or alphabetic); let the
last come first.
+@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.
+
@item -t @var{radix}
@itemx --radix=@var{radix}
Use @var{radix} as the radix for printing the symbol values. It must be
.RB "[\|" \-n | \-\-numeric\-sort "\|]"
.RB "[\|" \-p | \-\-no\-sort "\|]"
.RB "[\|" \-r | \-\-reverse\-sort "\|]"
+.RB "[\|" \-\-size\-sort "\|]"
.RB "[\|" \-u | \-\-undefined\-only "\|]"
.RB "[\|" \-\-help "\|]"
.RB "[\|" \-\-version "\|]"
Reverse the sense of the sort (whether numeric or alphabetic); let the
last come first.
+.TP
+.B \-\-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.
+
.TP
.B "\-t \fIradix"
.TP