xref: /freebsd-src/usr.sbin/kldxref/kldxref.8 (revision 2b92b754f18ce86e11e56f91c73aae8d89be80cc)
13d4630a4SDag-Erling Smørgrav.\"-
23d4630a4SDag-Erling Smørgrav.\" Copyright (c) 2001 Boris Popov
3e738085bSDag-Erling Smørgrav.\" Copyright (c) 2001 Dag-Erling Smørgrav
43d4630a4SDag-Erling Smørgrav.\" All rights reserved.
53d4630a4SDag-Erling Smørgrav.\"
63d4630a4SDag-Erling Smørgrav.\" Redistribution and use in source and binary forms, with or without
73d4630a4SDag-Erling Smørgrav.\" modification, are permitted provided that the following conditions
83d4630a4SDag-Erling Smørgrav.\" are met:
93d4630a4SDag-Erling Smørgrav.\" 1. Redistributions of source code must retain the above copyright
103d4630a4SDag-Erling Smørgrav.\"    notice, this list of conditions and the following disclaimer.
113d4630a4SDag-Erling Smørgrav.\" 2. Redistributions in binary form must reproduce the above copyright
123d4630a4SDag-Erling Smørgrav.\"    notice, this list of conditions and the following disclaimer in the
133d4630a4SDag-Erling Smørgrav.\"    documentation and/or other materials provided with the distribution.
143d4630a4SDag-Erling Smørgrav.\"
153d4630a4SDag-Erling Smørgrav.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
163d4630a4SDag-Erling Smørgrav.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
173d4630a4SDag-Erling Smørgrav.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
183d4630a4SDag-Erling Smørgrav.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
193d4630a4SDag-Erling Smørgrav.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
203d4630a4SDag-Erling Smørgrav.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
213d4630a4SDag-Erling Smørgrav.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
223d4630a4SDag-Erling Smørgrav.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
233d4630a4SDag-Erling Smørgrav.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
243d4630a4SDag-Erling Smørgrav.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
253d4630a4SDag-Erling Smørgrav.\" SUCH DAMAGE.
263d4630a4SDag-Erling Smørgrav.\"
27773c13c6SMina Galić.Dd February 25, 2023
283d4630a4SDag-Erling Smørgrav.Dt KLDXREF 8
293d4630a4SDag-Erling Smørgrav.Os
303d4630a4SDag-Erling Smørgrav.Sh NAME
313d4630a4SDag-Erling Smørgrav.Nm kldxref
326f142109SRuslan Ermilov.Nd generate hints for the kernel loader
333d4630a4SDag-Erling Smørgrav.Sh SYNOPSIS
343d4630a4SDag-Erling Smørgrav.Nm
353d4630a4SDag-Erling Smørgrav.Op Fl Rdv
36cb40c7d1SRuslan Ermilov.Op Fl f Ar hintsfile
37cb40c7d1SRuslan Ermilov.Ar path ...
383d4630a4SDag-Erling Smørgrav.Sh DESCRIPTION
393d4630a4SDag-Erling SmørgravThe
403d4630a4SDag-Erling Smørgrav.Nm
41490d5836SPhilippe Charnierutility is used to generate hint files which list modules, their
42dc37807eSRuslan Ermilovversion numbers, and the files that contain them.
433d4630a4SDag-Erling SmørgravThese hints are used by the kernel loader to determine where to find a
443d4630a4SDag-Erling Smørgravparticular KLD module.
453d4630a4SDag-Erling Smørgrav.Pp
463d4630a4SDag-Erling SmørgravA separate hint file is generated for each directory listed on the
473d4630a4SDag-Erling Smørgravcommand line that contains modules.
483d4630a4SDag-Erling SmørgravIf no hint records are generated for a particular directory, no hint
493d4630a4SDag-Erling Smørgravfile is created, and the preexisting hint file (if there was one in
503d4630a4SDag-Erling Smørgravthat directory) is removed.
513d4630a4SDag-Erling Smørgrav.Pp
52773c13c6SMina Galić.Nm
53*2b92b754SWarner Loshonly processes files that either have no dots in their name like
54*2b92b754SWarner Losh.Pa kernel
55*2b92b754SWarner Loshor that end in
56*2b92b754SWarner Losh.Dq .ko
57*2b92b754SWarner Loshlike
58*2b92b754SWarner Losh.Pa foo.ko .
59773c13c6SMina Galić.Pp
603d4630a4SDag-Erling SmørgravThe following options are available:
61cb40c7d1SRuslan Ermilov.Bl -tag -width indent
623d4630a4SDag-Erling Smørgrav.It Fl R
633d4630a4SDag-Erling SmørgravRecurse into subdirectories.
643d4630a4SDag-Erling Smørgrav.It Fl d
65dc37807eSRuslan ErmilovDo not generate a hint file, but print module metadata on standard
663d4630a4SDag-Erling Smørgravoutput.
67cb40c7d1SRuslan Ermilov.It Fl f Ar hintsfile
68cb40c7d1SRuslan ErmilovSpecify a different name for the hints files than
693d4630a4SDag-Erling Smørgrav.Pa linker.hints .
703d4630a4SDag-Erling Smørgrav.It Fl v
713d4630a4SDag-Erling SmørgravOperate in verbose mode.
723d4630a4SDag-Erling Smørgrav.El
733d4630a4SDag-Erling Smørgrav.Sh EXAMPLES
743d4630a4SDag-Erling SmørgravTo build hint files for both standard and add-on modules:
753d4630a4SDag-Erling Smørgrav.Pp
7641477f3fSRuslan Ermilov.Dl "kldxref /boot/kernel /boot/modules"
773d4630a4SDag-Erling Smørgrav.Pp
783d4630a4SDag-Erling SmørgravTo build hint files for all installed kernels:
793d4630a4SDag-Erling Smørgrav.Pp
80dc37807eSRuslan Ermilov.Dl "kldxref -R /boot"
813d4630a4SDag-Erling Smørgrav.Sh SEE ALSO
823d4630a4SDag-Erling Smørgrav.Xr kld 4 ,
833d4630a4SDag-Erling Smørgrav.Xr kldconfig 8 ,
843d4630a4SDag-Erling Smørgrav.Xr kldload 8 ,
853d4630a4SDag-Erling Smørgrav.Xr kldstat 8 ,
863d4630a4SDag-Erling Smørgrav.Xr kldunload 8
873d4630a4SDag-Erling Smørgrav.Sh HISTORY
883d4630a4SDag-Erling SmørgravThe
893d4630a4SDag-Erling Smørgrav.Nm
90490d5836SPhilippe Charnierutility first appeared in
913d4630a4SDag-Erling Smørgrav.Fx 5.0 .
923d4630a4SDag-Erling Smørgrav.Sh AUTHORS
93dc37807eSRuslan Ermilov.An -nosplit
943d4630a4SDag-Erling SmørgravThe
953d4630a4SDag-Erling Smørgrav.Nm
96490d5836SPhilippe Charnierutility was implemented by
9701c2b8acSBaptiste Daroussin.An Boris Popov Aq Mt bp@FreeBSD.org .
983d4630a4SDag-Erling SmørgravThis manual page was written by
9901c2b8acSBaptiste Daroussin.An Boris Popov Aq Mt bp@FreeBSD.org
1003d4630a4SDag-Erling Smørgravand
10101c2b8acSBaptiste Daroussin.An Dag-Erling Sm\(/orgrav Aq Mt des@FreeBSD.org .
102