mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-29 08:52:46 +00:00
Pick up modules from the compile directory instead of /boot/kernel.
Allow the script to operate on any convenient kernel. Submitted by: "Matthew Emmerton" <matt@gsicomp.on.ca>
This commit is contained in:
parent
ab93c874b4
commit
f4f9b36d57
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=103392
@ -12,9 +12,18 @@
|
||||
# This shellscript will make a cross reference of the symbols of the LINT
|
||||
# kernel.
|
||||
|
||||
COMPILEDIR=/sys/i386/compile
|
||||
COMPILEDIR=/sys/`uname -m`/compile
|
||||
KERNELNAME=LINT
|
||||
|
||||
if [ "x$1" != "x" ]; then
|
||||
KERNELNAME=$1;
|
||||
fi
|
||||
|
||||
if [ ! -d ${COMPILEDIR}/${KERNELNAME} ]; then
|
||||
echo "Kernel $KERNELNAME does not exist in ${COMPILEDIR}!";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
cd ${COMPILEDIR}/${KERNELNAME}
|
||||
if file vers.o | grep -q ELF; then
|
||||
OBJFORMAT=elf;
|
||||
@ -22,7 +31,9 @@ else
|
||||
OBJFORMAT=aout;
|
||||
fi
|
||||
|
||||
OBJFORMAT=${OBJFORMAT} nm -gon `echo *.o /boot/kernel/*.ko \
|
||||
MOD_OBJS=`find modules -name \*.ko`
|
||||
|
||||
OBJFORMAT=${OBJFORMAT} nm -gon `echo *.o $MOD_OBJS \
|
||||
| tr ' ' '\012' \
|
||||
| egrep -v '(aicasm|genassym)'` \
|
||||
| tr : ' ' | awk '
|
||||
|
Loading…
Reference in New Issue
Block a user