From owner-freebsd-hackers Sun Aug 16 23:00:13 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA22560 for freebsd-hackers-outgoing; Sun, 16 Aug 1998 23:00:13 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from smtp03.primenet.com (smtp03.primenet.com [206.165.6.133]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA22538 for ; Sun, 16 Aug 1998 23:00:09 -0700 (PDT) (envelope-from tlambert@usr09.primenet.com) Received: (from daemon@localhost) by smtp03.primenet.com (8.8.8/8.8.8) id WAA02064; Sun, 16 Aug 1998 22:59:37 -0700 (MST) Received: from usr09.primenet.com(206.165.6.209) via SMTP by smtp03.primenet.com, id smtpd002054; Sun Aug 16 22:59:34 1998 Received: (from tlambert@localhost) by usr09.primenet.com (8.8.5/8.8.5) id WAA20804; Sun, 16 Aug 1998 22:59:33 -0700 (MST) From: Terry Lambert Message-Id: <199808170559.WAA20804@usr09.primenet.com> Subject: Re: Getting a new syscall to work To: wjw@hobby.digiware.nl (Willem Jan Withagen) Date: Mon, 17 Aug 1998 05:59:32 +0000 (GMT) Cc: hackers@FreeBSD.ORG In-Reply-To: <199808170003.CAA00575@hobby.digiware.nl> from "Willem Jan Withagen" at Aug 17, 98 02:03:54 am X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I've followed most all of the receipe which was given by Eric A. Davis > to add a systemcall. But now I'm all out of idea's: > > /usr/libexec/ld.so: Undefined symbol "___nsysctl" called from testnsysctl:/usr/lib/libc.so.3.2 at 0x200857d8 > (I bumped the minor number.) > > I've looked in the running kernel with nm: > f0124c4c T ___nsysctl > f01241a0 F nsysctl.o > > So as far I know, things should be working. > But they don't, so can somebody give me a new pointer You must put it in the libc as well as in the kernel. If you know the number, a good developement stopgap would be to call syscall(2) with the number as the first argument, the calls first argument as the second argument, etc.. The LKM code intentionally reports the system call number back after the load so that you can put it in a file and read this from a program that needs to call the new system call, but doesn't know where the call lives for sure. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message