From owner-freebsd-questions@FreeBSD.ORG Tue May 27 00:42:37 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0F31137B401 for ; Tue, 27 May 2003 00:42:37 -0700 (PDT) Received: from hotmail.com (f82.law9.hotmail.com [64.4.9.82]) by mx1.FreeBSD.org (Postfix) with ESMTP id 966DD43F93 for ; Tue, 27 May 2003 00:42:36 -0700 (PDT) (envelope-from chaudharyanurag@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 27 May 2003 00:42:36 -0700 Received: from 202.144.62.166 by lw9fd.law9.hotmail.msn.com with HTTP; Tue, 27 May 2003 07:42:36 GMT X-Originating-IP: [202.144.62.166] X-Originating-Email: [chaudharyanurag@hotmail.com] From: "Anurag Chaudhary" To: stijn@win.tue.nl Date: Tue, 27 May 2003 13:12:36 +0530 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 27 May 2003 07:42:36.0627 (UTC) FILETIME=[8AB7EA30:01C32423] cc: freebsd-questions@freebsd.org Subject: undefined symbols in kld X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 May 2003 07:42:37 -0000 ok i got that. but why it's not linking my code to the kernel static library. do i need to pass some option in makefile or something else. I havn't seen such problems in linux. Actually I am porting a device driver from linux to freebsd 5.0 I can not arrange the book @ this instant because freebsd is alsmost not used in India and rarely are found its books. thanx Anurag >From: Stijn Hoop >To: Anurag Chaudhary >CC: freebsd-questions@freebsd.org >Subject: Re: undefined symbols in kld >Date: Tue, 27 May 2003 08:52:09 +0200 > >On Tue, May 27, 2003 at 12:13:01PM +0530, Anurag Chaudhary wrote: > > I hav made a kld. but it is not loading saying no such file or >directory. > > I traced down the problem and found that symbols usleep, memset, memcpy > > etc. which are part of libc and also declared in /usr/src/include >directory. > > someone please tell me how to link in these functions. urgent help is > > required > >Well you can't just use libc functions in kernel space -- this is a >basic premise of kernel programming. Some of the standard libc functions >are 'emulated' as you will in the kernel internal static library, sources >of which are found in /usr/src/sys/libkern. Might I suggest you read up >on kernel programming a bit, for example by reading Kirk McKusick's 4.4BSD >Internals book? > >--Stijn > >-- >Remember, kids: "Q" is always followed by "U". You can learn more on the >Internet in the Spelling FAQU. > -- James "Kibo" Parry ><< attach3 >> _________________________________________________________________ Race along with NK. The fastest Indian http://server1.msn.co.in/sp03/tataracing/index.asp Feel the thrill!