From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 28 15:40:22 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 0E23A106564A for ; Wed, 28 Jan 2009 15:40:22 +0000 (UTC) (envelope-from assaulter0x80@gmail.com) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.187]) by mx1.freebsd.org (Postfix) with ESMTP id 7CF2A8FC14 for ; Wed, 28 Jan 2009 15:40:21 +0000 (UTC) (envelope-from assaulter0x80@gmail.com) Received: by mu-out-0910.google.com with SMTP id i2so5081635mue.3 for ; Wed, 28 Jan 2009 07:40:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=ZG4J3COED3LIl5jNPqya5KqpPBY4yBndrLDE2kF8xcE=; b=PHNPYxXH9RyjYOREvrhqjJQWCjq6RESBudA2alKayMAEHw94eLafRE+DZxHfDlUr6h LqX/L01D7KtqRBSqSU2w0TemLp6eTe3WmOBxwc4nSyhzfegbJQvMFZskOgv8I8mWvnWU clFhAWV77OZs+reYU/r3E4IbhQXGD8fpHzNBw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=aAd12Ecr4w6uYah9nIKf2/xZnagp/ZvY7gD6I90S5TFLWa2Zu64Gu6dhmk52ZHTqwJ cWjLpl71cDv6m1CLHIjapr+EeqLF8znVrHHlrGIQtyT/UJjfkB/eCoe9Yg6GlzlvCwja c0jg5xkinqDpV0K9k0ehm4uVG/DlJO5bA3dWc= MIME-Version: 1.0 Received: by 10.181.226.19 with SMTP id d19mr2409934bkr.35.1233157220464; Wed, 28 Jan 2009 07:40:20 -0800 (PST) In-Reply-To: References: <20090120.131627.-1717264382.imp@bsdimp.com> Date: Wed, 28 Jan 2009 16:40:20 +0100 Message-ID: From: Jacky Oh To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: 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 15:40:22 -0000 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.