Re: VNOP_OPEN/VNOP_CLOSE linking issue
Re: VNOP_OPEN/VNOP_CLOSE linking issue
- Subject: Re: VNOP_OPEN/VNOP_CLOSE linking issue
- From: Sam Vaughan <email@hidden>
- Date: Fri, 18 Nov 2005 10:49:01 +1100
On 18/11/2005, at 7:02 AM, Marek Kozubal <email@hidden> wrote:
However, when I try to load my kext, I get a link failure on
VNOP_OPEN and
VNOP_CLOSE, but VNOP_READ & VNOP_WRITE link fine. They are all
listed in
/mach_kernel:
nm -pgo /mach_kernel
/mach_kernel: 000fb544 T _VNOP_CLOSE
/mach_kernel: 000fb410 T _VNOP_OPEN
/mach_kernel: 000fbb48 T _VNOP_READ
/mach_kernel: 000fbc84 T _VNOP_WRITE
I link against com.apple.kpi.bsd(8.0.0b1), com.apple.kpi.libkern
(8.0.0b1),
com.apple.kpi.mach(8.0.0b1). I've tried adding various
com.apple.kernel.*
and com.apple.kpi.unsupported with no success either.
If I link against com.apple.kernel(8.3.0), it works, but this is not a
desireable thing to link against. So whats going on here?
Hi Marek,
kextload checks the plugins in System.kext to verify that the symbols
you're using are available. There was some discussion on this list a
while back about the best way to look up a symbol that you're
interested in. I use the script below to find kernel symbols.
Sam
% cat ~/bin/fks
#!/bin/sh
SLE=/System/Library/Extensions
for i in `find $SLE/System.kext/PlugIns -type f ! -name
"*.plist"`; do
echo $i
nm $i | grep $1
done
echo /mach_kernel
nm /mach_kernel | grep $1
% fks VNOP_
/System/Library/Extensions/System.kext/PlugIns/BSDKernel.kext/
BSDKernel
U _VNOP_BWRITE
U _VNOP_FSYNC
U _VNOP_IOCTL
U _VNOP_READ
U _VNOP_STRATEGY
U _VNOP_WRITE
/System/Library/Extensions/System.kext/PlugIns/IOKit.kext/IOKit
/System/Library/Extensions/System.kext/PlugIns/Libkern.kext/Libkern
/System/Library/Extensions/System.kext/PlugIns/Mach.kext/Mach
/System/Library/Extensions/System.kext/PlugIns/System6.0.kext/
kernel.6.0
/System/Library/Extensions/System.kext/PlugIns/Unsupported.kext/
Unsupported
/mach_kernel
000fb678 T _VNOP_ACCESS
000fd820 T _VNOP_ADVLOCK
000fd91c T _VNOP_ALLOCATE
000fdf9c T _VNOP_BLKTOOFF
000fe10c T _VNOP_BLOCKMAP
000fe268 T _VNOP_BWRITE
000fb544 T _VNOP_CLOSE
000fdc5c T _VNOP_COPYFILE
000fb1ac T _VNOP_CREATE
000fc06c T _VNOP_EXCHANGE
000fc378 T _VNOP_FSYNC
000fb74c T _VNOP_GETATTR
000fb9d0 T _VNOP_GETATTRLIST
000fdcbc T _VNOP_GETXATTR
000fd610 T _VNOP_INACTIVE
000fbdc0 T _VNOP_IOCTL
000fe2bc T _VNOP_KQFILT_ADD
000fe36c T _VNOP_KQFILT_REMOVE
000fc530 T _VNOP_LINK
000fdee4 T _VNOP_LISTXATTR
000fb0b0 T _VNOP_LOOKUP
000fcccc T _VNOP_MKDIR
000fb358 T _VNOP_MKNOD
000fc21c T _VNOP_MMAP
000fc2cc T _VNOP_MNOMAP
000fe054 T _VNOP_OFFTOBLK
000fb410 T _VNOP_OPEN
000fd9e0 T _VNOP_PAGEIN
000fdaa8 T _VNOP_PAGEOUT
000fd76c T _VNOP_PATHCONF
000fbb48 T _VNOP_READ
000fd3d8 T _VNOP_READDIR
000fd494 T _VNOP_READDIRATTR
000fd560 T _VNOP_READLINK
000fd6bc T _VNOP_RECLAIM
000fc428 T _VNOP_REMOVE
000fde30 T _VNOP_REMOVEXATTR
000fc66c T _VNOP_RENAME
000fc168 T _VNOP_REVOKE
000fcdc4 T _VNOP_RMDIR
000fdb70 T _VNOP_SEARCHFS
000fbf28 T _VNOP_SELECT
000fb7f4 T _VNOP_SETATTR
000fba88 T _VNOP_SETATTRLIST
000fdd78 T _VNOP_SETXATTR
000fe214 T _VNOP_STRATEGY
000fd2dc T _VNOP_SYMLINK
000fb2a4 T _VNOP_WHITEOUT
000fbc84 T _VNOP_WRITE
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden