mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-27 13:32:45 +00:00
Pick up the environment variable ${NM} if it exists and use that to list
symbols. This allows lorder to be used more easily in a cross-build environment.
This commit is contained in:
parent
a0581bbcc2
commit
7172dc3b54
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=73882
@ -49,6 +49,7 @@ esac
|
||||
# temporary files
|
||||
R=$(mktemp -t _reference_)
|
||||
S=$(mktemp -t _symbol_)
|
||||
NM=${NM:-nm}
|
||||
|
||||
# remove temporary files on HUP, INT, QUIT, PIPE, TERM
|
||||
trap "rm -f $R $S; exit 1" 1 2 3 13 15
|
||||
@ -63,7 +64,7 @@ done
|
||||
#
|
||||
# if the line has " U " it's a globally undefined symbol, put it into
|
||||
# the reference file.
|
||||
nm -go $* | sed "
|
||||
${NM} -go $* | sed "
|
||||
/ [TD] / {
|
||||
s/:.* [TD] / /
|
||||
w $S
|
||||
|
Loading…
Reference in New Issue
Block a user