diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-18 16:46:18 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-18 16:46:18 +0000 |
commit | 725915fb15b061db96ddc4ca338a4f0dddb53b5a (patch) | |
tree | 73493435b8e47e10463c03d753db05bae273e7a0 /usr.bin/lorder | |
parent | b83ffdbff92bda9ab675a12ff62affeab792ba41 (diff) |
from netbsd:
run nm once; also check dependencies for 'G' (gp-relative constant pool)
and 'R' (readonly data)
Diffstat (limited to 'usr.bin/lorder')
-rw-r--r-- | usr.bin/lorder/lorder.sh.gnm | 12 |
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 |