Date: Wed, 28 Jan 2009 14:06:52 -0500 From: John Baldwin <jhb@freebsd.org> To: freebsd-hackers@freebsd.org Cc: Jacky Oh <assaulter0x80@gmail.com> Subject: Re: Fwd: KLD: program.ko: depends of kernel - no avaiable Message-ID: <200901281406.53033.jhb@freebsd.org> In-Reply-To: <ed8027db0901280740s26088f8cq81bf6eab95c487bb@mail.gmail.com> References: <ed8027db0901200821g4f78beeek1d6a4b489587892@mail.gmail.com> <ed8027db0901230516l6b5ecdb4je3eabb16ffafc20d@mail.gmail.com> <ed8027db0901280740s26088f8cq81bf6eab95c487bb@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 28 January 2009 10:40:20 am Jacky Oh wrote: > 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? That is a MODULE_DEPEND() data structure, not a function. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901281406.53033.jhb>