Fwd: KLD: program.ko: depends of kernel - no avaiable
Jacky Oh
assaulter0x80 at gmail.com
Wed Jan 28 07:40:22 PST 2009
hi everyone,
the main goal of KLD are load code for executing as part of kernel at
run-time, so, i don't think that rebuild the kernel are a good solution..
In other way a try to load any dev/syscall example at
/usr/share/examples/kld the result was the same..
When i was thinking in S. Sedov reply about the undefined symbols i go to
run objdump for my syscall.ko and i can find the following:
# objdump -x syscall.ko
...
000019d4 l O .data 00000010 M_DIRP2_uninit_sys_uninit
0000094c l O set_sysinit_set 00000004
__set_sysinit_set_sym_M_DIRP2_init_sys_init
000019e4 l O .data 00000010 M_DIRP2_init_sys_init
000019f4 l O .data 0000000c syscall_mod
00001a00 l O .data 0000000c _syscall_depend_on_kernel <------
00001a20 l O .data 00000028 syscall_syscall_mod
00001a48 l O .data 00000004 offset
...
The result whit the examples also shows the same symbol
(_syscall_depend_on_kernel), so, y disassemble this function:
00001a00 <_syscall_depend_on_kernel>:
1a00: 3c 35 cmp $0x35,%al
1a02: 0c 00 or $0x0,%al
1a04: 3c 35 cmp $0x35,%al
1a06: 0c 00 or $0x0,%al
1a08: 9f lahf
1a09: bb 0d 00 00 00 mov $0xd,%ebx
...
lahf == load status flags (EFLAGS) on ah register
so, my question is, why precompiled modules (as if_ipw.ko, for example)
don't show this function?
Thanks to all, jacky.
More information about the freebsd-hackers
mailing list