From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 8 11:38:25 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 850FC16A4CE; Sat, 8 Nov 2003 11:38:25 -0800 (PST) Received: from adsl-63-198-35-122.dsl.snfc21.pacbell.net (adsl-63-198-35-122.dsl.snfc21.pacbell.net [63.198.35.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id BAB8243FB1; Sat, 8 Nov 2003 11:38:24 -0800 (PST) (envelope-from j_guojun@lbl.gov) Received: from lbl.gov (localhost.pacbell.net [127.0.0.1]) ESMTP id hA8Jcg8i000471; Sat, 8 Nov 2003 11:38:42 -0800 (PST) (envelope-from j_guojun@lbl.gov) Message-ID: <3FAD4642.2070401@lbl.gov> Date: Sat, 08 Nov 2003 11:38:42 -0800 From: "Jin Guojun [NCS]" User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5b) Gecko/20031007 X-Accept-Language: zh, zh-CN, en-US, en MIME-Version: 1.0 To: Robert Watson References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: hackers@freebsd.org Subject: Re: 4.9 KLDload error X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Nov 2003 19:38:25 -0000 Robert Watson wrote: >On Fri, 7 Nov 2003, Jin Guojun [NCS] wrote: > > > >>A KLD module ncs_time_ctl.ko compiled on both 4.8 and 4.9 hosts can be >>loaded by kldload on any 4.8 machine. But neither .ko files can be >>loaded on a 4.9 machine. The error is: >> >>4.9 # kldload -v ./ncs_time_ctl.ko >>kldload: can't load ./ncs_time_ctl.ko: Exec format error >> >>kldload should give more error information on what function it failed to load. >> >>Is this possible a 4.9 bug in kldload? or does some KLD mechanism has >>been changed in 4.9-RELEASE? Is there any way to analyze what is wrong >>in the 4.9 LKD system? >> >> > >Unfortunately, the UNIX "errno" mechanism isn't very expressive. However, >the kernel linker will send debugging output to the system console. Check >dmesg and see if there's more information there. Typically, this error >will be the result of a failure to link symbols in the module: either due >to a symbol already present, or a missing dependency. To debug this >further, look at the console output, and also compare the output of "nm" >on the .ko built on 4.8 and 4.9 to see if its dependencies or exposed >symbols have changed. > >Robert N M Watson FreeBSD Core Team, TrustedBSD Projects >robert@fledge.watson.org Network Associates Laboratories > > dmesg actually tells the missing function in patched kernel. "make depend & make" did NOT recompile the patched code somehow under 4.9. Removing the object code and recompiling the kernel fixed the problem. I will look into it to see what causes this compile problem. Thanks, -- ------------ Jin Guojun ----------- v --- j_guojun@lbl.gov --- Distributed Systems Department http://www.itg.lbl.gov/~jin M/S 50B-2239 Ph#:(510) 486-7531 Fax: 486-6363 Lawrence Berkeley National Laboratory, Berkeley, CA 94720