From owner-freebsd-questions Wed Feb 24 16:40: 0 1999 Delivered-To: freebsd-questions@freebsd.org Received: from scientia.demon.co.uk (scientia.demon.co.uk [212.228.14.13]) by hub.freebsd.org (Postfix) with ESMTP id D033B14C2B for ; Wed, 24 Feb 1999 16:39:38 -0800 (PST) (envelope-from ben@scientia.demon.co.uk) Received: from scientia.demon.co.uk (ident=ben) by scientia.demon.co.uk with local (Exim 2.12 #12) id 10FoGv-0004JL-00; Thu, 25 Feb 1999 00:03:21 +0000 (envelope-from ben@scientia.demon.co.uk) Date: Thu, 25 Feb 1999 00:03:21 +0000 From: Ben Smithurst To: Gurudatt Shenoy Cc: freebsd-questions@freebsd.org Subject: Re: Question: Adding a new system call Message-ID: <19990225000321.A16445@scientia.demon.co.uk> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.1i In-Reply-To: Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Gurudatt Shenoy wrote: > I added a new system call (new_write) to the freebsd (2.2.7) kernel. The > kernel compiled successfully but when I tried to use the call in a > program, I got the following error: > "Undefined symbol '_new_write' referenced from text segment" > > > What am I missing? The steps I followed to add my system call were: > > 1. Declared a new entry in syscalls.master > 326 STD 0 BSD { void new_write(void);} > (325 is currently the last entry in syscalls.master) > 2. Created a new file (called new_write.c) in sys/kern, containing the > function definition for new_write I'm not exactly a kernel guru, but you might have to add kern/new_write.c standard to /sys/conf/files so the kernel build recognises it. I don't think the kernel build process will automatically use everything it finds in /sys/kern and other places. -- Ben Smithurst ben@scientia.demon.co.uk send a blank message to ben+pgp@scientia.demon.co.uk for PGP key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message