From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 28 20:41:00 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 581AF10657E2 for ; Wed, 28 Jan 2009 20:41:00 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 18C048FC17 for ; Wed, 28 Jan 2009 20:41:00 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (pool-98-109-39-197.nwrknj.fios.verizon.net [98.109.39.197]) by cyrus.watson.org (Postfix) with ESMTPSA id A0FB746B53; Wed, 28 Jan 2009 15:40:59 -0500 (EST) Received: from localhost (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id n0SKekch099624; Wed, 28 Jan 2009 15:40:53 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Wed, 28 Jan 2009 14:06:52 -0500 User-Agent: KMail/1.9.7 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901281406.53033.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Wed, 28 Jan 2009 15:40:53 -0500 (EST) X-Virus-Scanned: ClamAV 0.94.2/8914/Wed Jan 28 01:40:00 2009 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Jacky Oh Subject: Re: Fwd: KLD: program.ko: depends of kernel - no avaiable X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2009 20:41:04 -0000 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