]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/kldxref/kldxref.8
zfs: merge openzfs/zfs@043c6ee3b
[FreeBSD/FreeBSD.git] / usr.sbin / kldxref / kldxref.8
1 .\"-
2 .\" Copyright (c) 2001 Boris Popov
3 .\" Copyright (c) 2001 Dag-Erling Smørgrav
4 .\" All rights reserved.
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice, this list of conditions and the following disclaimer in the
13 .\"    documentation and/or other materials provided with the distribution.
14 .\"
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 .\" SUCH DAMAGE.
26 .\"
27 .Dd February 25, 2023
28 .Dt KLDXREF 8
29 .Os
30 .Sh NAME
31 .Nm kldxref
32 .Nd generate hints for the kernel loader
33 .Sh SYNOPSIS
34 .Nm
35 .Op Fl Rdv
36 .Op Fl f Ar hintsfile
37 .Ar path ...
38 .Sh DESCRIPTION
39 The
40 .Nm
41 utility is used to generate hint files which list modules, their
42 version numbers, and the files that contain them.
43 These hints are used by the kernel loader to determine where to find a
44 particular KLD module.
45 .Pp
46 A separate hint file is generated for each directory listed on the
47 command line that contains modules.
48 If no hint records are generated for a particular directory, no hint
49 file is created, and the preexisting hint file (if there was one in
50 that directory) is removed.
51 .Pp
52 .Nm
53 ignores files with at least two "."s in the filename, such as
54 .Pa foo.ko.debug
55 or
56 .Pa bar.ko.pkgsave .
57 Note that this means that modules cannot have names such as
58 .Pa foo.bar.ko .
59 This limitation however, has been lived practice since the beginning of
60 FreeBSD's kernel modules.
61 .Pp
62 The following options are available:
63 .Bl -tag -width indent
64 .It Fl R
65 Recurse into subdirectories.
66 .It Fl d
67 Do not generate a hint file, but print module metadata on standard
68 output.
69 .It Fl f Ar hintsfile
70 Specify a different name for the hints files than
71 .Pa linker.hints .
72 .It Fl v
73 Operate in verbose mode.
74 .El
75 .Sh EXAMPLES
76 To build hint files for both standard and add-on modules:
77 .Pp
78 .Dl "kldxref /boot/kernel /boot/modules"
79 .Pp
80 To build hint files for all installed kernels:
81 .Pp
82 .Dl "kldxref -R /boot"
83 .Sh SEE ALSO
84 .Xr kld 4 ,
85 .Xr kldconfig 8 ,
86 .Xr kldload 8 ,
87 .Xr kldstat 8 ,
88 .Xr kldunload 8
89 .Sh HISTORY
90 The
91 .Nm
92 utility first appeared in
93 .Fx 5.0 .
94 .Sh AUTHORS
95 .An -nosplit
96 The
97 .Nm
98 utility was implemented by
99 .An Boris Popov Aq Mt bp@FreeBSD.org .
100 This manual page was written by
101 .An Boris Popov Aq Mt bp@FreeBSD.org
102 and
103 .An Dag-Erling Sm\(/orgrav Aq Mt des@FreeBSD.org .