---
name: "ksyms"
section: "4"
platform: "openbsd"
package: "man"
version: "8.0-current-20261101"
release: "OpenBSD 8.0-current (2026-11-01)"
platforms: ["freebsd", "openbsd"]
url: "https://new.carta.tech/ksyms/4"
---

# ksyms(4)

kernel symbol table device

## NAME

**ksyms** – kernel symbol table device

## SYNOPSIS

**pseudo-device ksyms** \[*count*\]

## DESCRIPTION

The */dev/ksyms* device masquerades as an OpenBSD native executable with the symbols from the running kernel as its symbol segment. Use of */dev/ksyms* requires that the boot loader preserve the kernel symbols and place them at the end of the kernel's address space.

The */dev/ksyms* device is used to look up the symbol table name list from the running kernel. Because it represents the running kernel, it is guaranteed to always be up to date even if the kernel file has been changed (or is even non-existent). It is most useful when used in conjunction with [nlist(3)](/nlist/3.md) or the [kvm(3)](/kvm/3.md) routines (note that [kvm\_open(3)](/kvm_open/3.md) and [kvm\_openfiles(3)](/kvm_openfiles/3.md) will try */dev/ksyms* automatically if the first parameter to them is the NULL pointer).

## FILES

- */dev/ksyms*

  ## ERRORS

An open of */dev/ksyms* will fail if:

- \[EPERM\]

  An open was attempted with write permissions.

- \[ENXIO\]

  No kernel symbols were saved by the boot loader (usually because they were removed with [strip(1)](/strip/1.md)), or the kernel has been compiled without a “pseudo-device ksyms” line.

## SEE ALSO

[kvm(3)](/kvm/3.md), [nlist(3)](/nlist/3.md)

## HISTORY

The */dev/ksyms* device appeared in OpenBSD 2.4.

## BUGS

It is not possible to [mmap(2)](/mmap/2.md) */dev/ksyms* because the boot loader does not load the symbol table onto a page boundary (so it is not page aligned). If all the boot loaders were fixed, [mmap(2)](/mmap/2.md) support would be trivial.
