Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Jan 2009 16:40:20 +0100
From:      Jacky Oh <assaulter0x80@gmail.com>
To:        freebsd-hackers@freebsd.org
Subject:   Fwd: KLD: program.ko: depends of kernel - no avaiable
Message-ID:  <ed8027db0901280740s26088f8cq81bf6eab95c487bb@mail.gmail.com>
In-Reply-To: <ed8027db0901230516l6b5ecdb4je3eabb16ffafc20d@mail.gmail.com>
References:  <ed8027db0901200821g4f78beeek1d6a4b489587892@mail.gmail.com> <20090120.131627.-1717264382.imp@bsdimp.com> <alpine.BSF.2.00.0901211351580.13974@fledge.watson.org> <ed8027db0901230516l6b5ecdb4je3eabb16ffafc20d@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ed8027db0901280740s26088f8cq81bf6eab95c487bb>