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.
This commit is contained in:
John Birrell 1998-08-15 07:10:21 +00:00
parent 45696a866c
commit 559628a153
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=38322

View File

@ -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