summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArchie Cobbs <archie@FreeBSD.org>1998-12-08 08:14:37 +0000
committerArchie Cobbs <archie@FreeBSD.org>1998-12-08 08:14:37 +0000
commit915ffe6c6fc482d422db88224ea217630626b1eb (patch)
tree31beb3439454178b5ad8e9e80deadd4f1edd04b4
parentaeaa1ed932c4c72d4c8e058b143198572130bc63 (diff)
Notes
-rw-r--r--tools/tools/kernxref/kernxref.sh19
1 files changed, 15 insertions, 4 deletions
diff --git a/tools/tools/kernxref/kernxref.sh b/tools/tools/kernxref/kernxref.sh
index a600c6b8960e..b29e8d6dd7d0 100644
--- a/tools/tools/kernxref/kernxref.sh
+++ b/tools/tools/kernxref/kernxref.sh
@@ -7,14 +7,25 @@
# this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
# ----------------------------------------------------------------------------
#
-# $Id: kernxref.sh,v 1.9 1998/11/27 10:18:56 bde Exp $
+# $Id: kernxref.sh,v 1.10 1998/12/06 21:39:07 archie Exp $
#
# This shellscript will make a cross reference of the symbols of the LINT
# kernel.
-cd /sys/compile/LINT
-nm -aout -gon `echo *.o /lkm/*.o | tr ' ' '\012' | egrep -v '(aicasm|genassym)'` |
- tr : ' ' | awk '
+COMPILEDIR=/sys/compile
+KERNELNAME=LINT
+
+cd ${COMPILEDIR}/${KERNELNAME}
+if file vers.o | grep -q ELF; then
+ OBJFORMAT=elf;
+else
+ OBJFORMAT=aout;
+fi
+
+OBJFORMAT=${OBJFORMAT} nm -gon `echo *.o /lkm/*.o \
+ | tr ' ' '\012' \
+ | egrep -v '(aicasm|genassym)'` \
+ | tr : ' ' | awk '
NF > 1 {
if (length($2) == 8) {
$2 = $3