---
name: "kldxref"
section: "8"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/kldxref"
---

# kldxref(8)

generate hints for the kernel loader

## NAME

**kldxref** – generate hints for the kernel loader

## SYNOPSIS

**kldxref** \[**-Rdv**\] \[**-f** *hintsfile*\] *path* *...*

**kldxref** **-m** *module*

## DESCRIPTION

The **kldxref** utility is used to generate hint files which list modules, their version numbers, and the files that contain them. These hints are used by the kernel loader to determine where to find a particular KLD module.

A separate hint file is generated for each directory listed on the command line that contains modules. If no hint records are generated for a particular directory, no hint file is created, and the preexisting hint file (if there was one in that directory) is removed.

**kldxref** only processes files that either have no dots in their name like *kernel* or that end in “.ko” like *foo.ko*.

The following options are available:

- **-R**

  Recurse into subdirectories.

- **-d**

  Do not generate a hint file, but print module metadata on standard output.

- **-f** *hintsfile*

  Specify a different name for the hints files than *linker.hints*.

- **-m** *module*

  Print information about the modules in the file *module*.

- **-v**

  Operate in verbose mode.

## EXAMPLES

To build hint files for both standard and add-on modules:

```
kldxref /boot/kernel /boot/modules
```

To build hint files for all installed kernels:

```
kldxref -R /boot
```

## SEE ALSO

[kld(4)](/kld/4.md), [kldconfig(8)](/kldconfig/8.md), [kldload(8)](/kldload/8.md), [kldstat(8)](/kldstat/8.md), [kldunload(8)](/kldunload/8.md)

## HISTORY

The **kldxref** utility first appeared in FreeBSD 5.0.

## AUTHORS

The **kldxref** utility was implemented by Boris Popov ⟨*bp@FreeBSD.org*⟩. This manual page was written by Boris Popov ⟨*bp@FreeBSD.org*⟩ and Dag-Erling Smørgrav ⟨*des@FreeBSD.org*⟩.
