* nm.c (struct get_relocs_info): Define.
(line_numbers): New static variable. (long_options): Add "line-numbers". (usage): Mention -l and --line-numbers. (main): Handle -l. (print_symbol): Print line numbers if requested. (get_relocs): New static function. * binutils.texi, nm.1: Document -l/--line-numbers.
This commit is contained in:
parent
0e3bd85ee7
commit
77dd44697f
|
@ -580,7 +580,7 @@ nm [ -a | --debug-syms ] [ -g | --extern-only ]
|
||||||
[ -r | --reverse-sort ] [ --size-sort ] [ -u | --undefined-only ]
|
[ -r | --reverse-sort ] [ --size-sort ] [ -u | --undefined-only ]
|
||||||
[ -t @var{radix} | --radix=@var{radix} ] [ -P | --portability ]
|
[ -t @var{radix} | --radix=@var{radix} ] [ -P | --portability ]
|
||||||
[ --target=@var{bfdname} ] [ -f @var{format} | --format=@var{format} ]
|
[ --target=@var{bfdname} ] [ -f @var{format} | --format=@var{format} ]
|
||||||
[ --defined-only ]
|
[ --defined-only ] [-l | --line-numbers ]
|
||||||
[ --no-demangle ] [ -V | --version ] [ --help ] [ @var{objfile}@dots{} ]
|
[ --no-demangle ] [ -V | --version ] [ --help ] [ @var{objfile}@dots{} ]
|
||||||
@end smallexample
|
@end smallexample
|
||||||
|
|
||||||
|
@ -722,6 +722,15 @@ either upper or lower case.
|
||||||
@cindex external symbols
|
@cindex external symbols
|
||||||
Display only external symbols.
|
Display only external symbols.
|
||||||
|
|
||||||
|
@item -l
|
||||||
|
@itemx --line-numbers
|
||||||
|
@cindex symbol line numbers
|
||||||
|
For each symbol, use debugging information to try to find a filename and
|
||||||
|
line number. For a defined symbol, look for the line number of the
|
||||||
|
address of the symbol. For an undefined symbol, look for the line
|
||||||
|
number of a relocation entry which refers to the symbol. If line number
|
||||||
|
information can be found, print it after the other symbol information.
|
||||||
|
|
||||||
@item -n
|
@item -n
|
||||||
@itemx -v
|
@itemx -v
|
||||||
@itemx --numeric-sort
|
@itemx --numeric-sort
|
||||||
|
|
|
@ -27,6 +27,7 @@ nm \- list symbols from object files.
|
||||||
.RB "[\|" \-r | \-\-reverse\-sort "\|]"
|
.RB "[\|" \-r | \-\-reverse\-sort "\|]"
|
||||||
.RB "[\|" \-\-size\-sort "\|]"
|
.RB "[\|" \-\-size\-sort "\|]"
|
||||||
.RB "[\|" \-u | \-\-undefined\-only "\|]"
|
.RB "[\|" \-u | \-\-undefined\-only "\|]"
|
||||||
|
.RB "[\|" \-l | \-\-line\-numbers "\|]"
|
||||||
.RB "[\|" \-\-help "\|]"
|
.RB "[\|" \-\-help "\|]"
|
||||||
.RB "[\|" \-\-version "\|]"
|
.RB "[\|" \-\-version "\|]"
|
||||||
.RB "[\|" "\-t \fIradix" | \-\-radix=\fIradix "\|]"
|
.RB "[\|" "\-t \fIradix" | \-\-radix=\fIradix "\|]"
|
||||||
|
@ -172,6 +173,16 @@ for information on listing available formats.
|
||||||
.B \-\-undefined\-only
|
.B \-\-undefined\-only
|
||||||
Display only undefined symbols (those external to each object file).
|
Display only undefined symbols (those external to each object file).
|
||||||
|
|
||||||
|
.TP
|
||||||
|
.B \-l
|
||||||
|
.TP
|
||||||
|
.B \-\-line\-numbers
|
||||||
|
For each symbol, use debugging information to try to find a filename and
|
||||||
|
line number. For a defined symbol, look for the line number of the
|
||||||
|
address of the symbol. For an undefined symbol, look for the line
|
||||||
|
number of a relocation entry which refers to the symbol. If line number
|
||||||
|
information can be found, print it after the other symbol information.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B \-V
|
.B \-V
|
||||||
.TP
|
.TP
|
||||||
|
|
Loading…
Reference in New Issue