version 1.1, 1995/10/18 08:45:35 |
version 1.2, 1995/12/18 16:46:17 |
|
|
#!/bin/sh - |
#!/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 |
# Copyright (c) 1990, 1993 |
# The Regents of the University of California. All rights reserved. |
# The Regents of the University of California. All rights reserved. |
|
|
# |
# |
# if the line has " U " it's a globally undefined symbol, put it into |
# if the line has " U " it's a globally undefined symbol, put it into |
# the reference file. |
# the reference file. |
for file in $* ; do |
(for file in $* ; do echo $file":" ; done ; nm -go $*) | sed " |
( echo "" ; echo ${file}: ; nm -go $file ) | sed " |
|
/:$/ { |
/:$/ { |
s/:// |
s/:// |
s/.*/& &/ |
s/.*/& &/ |
p |
p |
d |
d |
} |
} |
/ [TD] / { |
/ [TDGR] / { |
s/:.* [TD] / / |
s/:.* [TDGR] / / |
w $S |
w $S |
d |
d |
} |
} |
|
|
} |
} |
d |
d |
" |
" |
done |
|
|
|
# sort symbols and references on the first field (the symbol) |
# sort symbols and references on the first field (the symbol) |
# join on that field, and print out the file names. |
# join on that field, and print out the file names. |
sort +1 $R -o $R |
sort +1 $R -o $R |
sort +1 $S -o $S |
sort +1 $S -o $S |
join -j 2 -o 1.1 2.1 $R $S |
join -j 2 -o 1.1 2.1 $R $S |
rm -f $R $S |
rm -f $R |