summaryrefslogtreecommitdiffstats
path: root/usr.bin/lorder/lorder.sh
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>2001-03-06 15:00:32 +0000
committerdfr <dfr@FreeBSD.org>2001-03-06 15:00:32 +0000
commitf689e43b3820d6639f918708b021d1afcc70918d (patch)
tree50977c8c35cad1ec73a5820c1be26c66f78e11be /usr.bin/lorder/lorder.sh
parentd57c826a42def50a6b1dbad159ce2b5ad7ed9873 (diff)
downloadFreeBSD-src-f689e43b3820d6639f918708b021d1afcc70918d.zip
FreeBSD-src-f689e43b3820d6639f918708b021d1afcc70918d.tar.gz
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.
Diffstat (limited to 'usr.bin/lorder/lorder.sh')
-rw-r--r--usr.bin/lorder/lorder.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/lorder/lorder.sh b/usr.bin/lorder/lorder.sh
index a284325..7e6de59 100644
--- a/usr.bin/lorder/lorder.sh
+++ b/usr.bin/lorder/lorder.sh
@@ -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
OpenPOWER on IntegriCloud