summaryrefslogtreecommitdiff
path: root/usr.bin/lorder
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/lorder')
-rw-r--r--usr.bin/lorder/lorder.sh.gnm12
1 files changed, 5 insertions, 7 deletions
diff --git a/usr.bin/lorder/lorder.sh.gnm b/usr.bin/lorder/lorder.sh.gnm
index 196d83976ed..e441cfbe68f 100644
--- a/usr.bin/lorder/lorder.sh.gnm
+++ b/usr.bin/lorder/lorder.sh.gnm
@@ -1,5 +1,5 @@
#!/bin/sh -
-# $NetBSD: lorder.sh.gnm,v 1.1 1995/04/24 07:39:06 cgd Exp $
+# $NetBSD: lorder.sh.gnm,v 1.2 1995/12/18 07:45:17 jonathan Exp $
#
# Copyright (c) 1990, 1993
# The Regents of the University of California. All rights reserved.
@@ -63,16 +63,15 @@ trap "rm -f $R $S; exit 1" 1 2 3 13 15
#
# if the line has " U " it's a globally undefined symbol, put it into
# the reference file.
-for file in $* ; do
-( echo "" ; echo ${file}: ; nm -go $file ) | sed "
+(for file in $* ; do echo $file":" ; done ; nm -go $*) | sed "
/:$/ {
s/://
s/.*/& &/
p
d
}
- / [TD] / {
- s/:.* [TD] / /
+ / [TDGR] / {
+ s/:.* [TDGR] / /
w $S
d
}
@@ -82,11 +81,10 @@ for file in $* ; do
}
d
"
-done
# sort symbols and references on the first field (the symbol)
# join on that field, and print out the file names.
sort +1 $R -o $R
sort +1 $S -o $S
join -j 2 -o 1.1 2.1 $R $S
-rm -f $R $S
+rm -f $R