From owner-cvs-all Tue Sep 11 5:46:37 2001 Delivered-To: cvs-all@freebsd.org Received: from bazooka.unixfreak.org (bazooka.unixfreak.org [63.198.170.138]) by hub.freebsd.org (Postfix) with ESMTP id 86BD137B401; Tue, 11 Sep 2001 05:46:23 -0700 (PDT) Received: by bazooka.unixfreak.org (Postfix, from userid 1000) id 4415D3E31; Tue, 11 Sep 2001 05:46:23 -0700 (PDT) Received: from bazooka.unixfreak.org (localhost [127.0.0.1]) by bazooka.unixfreak.org (Postfix) with ESMTP id 381F93C12F; Tue, 11 Sep 2001 05:46:23 -0700 (PDT) To: Peter Wemm Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin Makefile src/usr.sbin/kldxref Makefile ef.c ef.h fileformat kldxref.8 kldxref.c In-Reply-To: <200109110113.f8B1DFe98020@freefall.freebsd.org>; from peter@FreeBSD.org on "Mon, 10 Sep 2001 18:13:15 -0700 (PDT)" Date: Tue, 11 Sep 2001 05:46:18 -0700 From: Dima Dorfman Message-Id: <20010911124623.4415D3E31@bazooka.unixfreak.org> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Peter Wemm wrote: > peter 2001/09/10 18:13:15 PDT > > Modified files: > usr.sbin Makefile > Added files: > usr.sbin/kldxref Makefile ef.c ef.h fileformat kldxref.8 > kldxref.c > Log: > Add kldxref(8), for maintaining the linker.hints file for translating > module->pathname.ko. It supports only ELF for now. Attached is a conversion of kldxref.8 to mdoc(7) (i.e., make it a real man page). I tried to document some of the other options, but it could still use fleshing out. Any objections to me committing this? Index: kldxref.8 =================================================================== RCS file: /home/ncvs/src/usr.sbin/kldxref/kldxref.8,v retrieving revision 1.1 diff -u -r1.1 kldxref.8 --- kldxref.8 2001/09/11 01:13:15 1.1 +++ kldxref.8 2001/09/11 12:45:19 @@ -1,25 +1,63 @@ -$FreeBSD: src/usr.sbin/kldxref/kldxref.8,v 1.1 2001/09/11 01:13:15 peter Exp $ - -[DRAFT] - -kldxref(8) used to generate linker.hints file which contains list of -modules, their version numbers and container KLDs. This file used by loader +.\" $FreeBSD: src/usr.sbin/kldxref/kldxref.8,v 1.1 2001/09/11 01:13:15 peter Exp $ +.Dd September 11, 2001 +.Dt KLDXREF 8 +.Os +.Sh NAME +.Nm kldxref +.Nd generate kernel linker and loader hints files +.Sh SYNOPSIS +.Nm +.Op Fl dvR +.Op Fl f Ar xref_file +.Ar directory ... +.Sh DESCRIPTION +The +.Nm +command is used to generate the +.Pa linker.hints +files which contain the list of modules, their version numbers, and +the container KLDs in the specified directories. +These files are used by the loader +.Pq Xr loader 8 and kernel linker. - -Each directory with KLDs should have its own linker.hints file. - -Typical invocation of kldxref utility may look like this: - -kldxref /boot/kernel /modules - -which will build hints file in both directories. - -A recursive behaviour can be specified with -R option: - -kldxref /boot - -If no hint records written, hints file will not be created and old file -will be removed. - -If -d flag specified then no files generated and program prints metadata -records to stdout. +Any directory from which KLDs are loaded should have its own +.Pa linker.hints +file. +.Xr kldconfig 8 +can be used to query and modify the set of these directories. +.Pp +The following options are available: +.Bl -tag -width indent +.It Fl d +Don't generate any files, +but instead print the metadata records to standard output. +.It Fl f Ar xref_file +Specify the name of the file to generate. +.Pa linker.hints +is the default. +.It Fl v +Turn on printing of extra debugging information. +.It Fl R +Recurse into directories, if any, under each one specified on +the command line. +The default is only to look at files in the specified directory itself. +.El +.Pp +If no hint records are written, +the hints file will not be created and the old file will be removed. +.Sh EXAMPLES +Build hints files in +.Pa /boot/kernel , +.Pa /modules , +and any directories below those: +.Dl kldxref -R /boot/kernel /modules +.Sh DIAGNOSTICS +.Ex -std +.Sh SEE ALSO +.Xr kldconfig 8 , +.Xr kldload 8 +.Sh HISTORY +The +.Nm +utility appeared in +.Fx 5.0 . To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message