summaryrefslogtreecommitdiffstats
path: root/usr.bin/lorder
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>1998-08-15 07:10:21 +0000
committerjb <jb@FreeBSD.org>1998-08-15 07:10:21 +0000
commitb396abd789a2355d0dad6731dcb9668d006ff696 (patch)
treed1f14b1000c67887dbe69ebbe16419b1e3f20977 /usr.bin/lorder
parentd3334625c13d99f8ff039757fdcf4ddbf18ef964 (diff)
downloadFreeBSD-src-b396abd789a2355d0dad6731dcb9668d006ff696.zip
FreeBSD-src-b396abd789a2355d0dad6731dcb9668d006ff696.tar.gz
Removed explict PATH which tended to cause the *wrong* path to be used
more often than not. Also included Doug Rabson's changes to make this script better handle the two varieties of nm output we now have.
Diffstat (limited to 'usr.bin/lorder')
-rw-r--r--usr.bin/lorder/lorder.sh17
1 files changed, 5 insertions, 12 deletions
diff --git a/usr.bin/lorder/lorder.sh b/usr.bin/lorder/lorder.sh
index dea1e10..b23e351 100644
--- a/usr.bin/lorder/lorder.sh
+++ b/usr.bin/lorder/lorder.sh
@@ -34,9 +34,6 @@
# @(#)lorder.sh 8.1 (Berkeley) 6/6/93
#
-PATH=/bin:/usr/bin
-export PATH
-
# only one argument is a special case, just output the name twice
case $# in
0)
@@ -54,21 +51,17 @@ S=/tmp/_symbol_$$
# remove temporary files on HUP, INT, QUIT, PIPE, TERM
trap "rm -f $R $S; exit 1" 1 2 3 13 15
-# if the line ends in a colon, assume it's the first occurrence of a new
-# object file. Echo it twice, just to make sure it gets into the output.
-#
+# make sure all the files get into the output
+for i in $*; do
+ echo $i $i
+done
+
# if the line has " T " or " D " it's a globally defined symbol, put it
# into the symbol file.
#
# if the line has " U " it's a globally undefined symbol, put it into
# the reference file.
nm -go $* | sed "
- /:$/ {
- s/://
- s/.*/& &/
- p
- d
- }
/ [TD] / {
s/:.* [TD] / /
w $S
OpenPOWER on IntegriCloud