/dev/ksyms
ksyms4
Kernel symbol table device
Usage
pseudo-device ksyms [count]
Overview
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) or the kvm(3) routines (note that kvm_open(3) and kvm_openfiles(3) will try /dev/ksyms automatically if the first parameter to them is the NULL pointer).
Files
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)), or the kernel has been compiled without a “pseudo-device ksyms” line.
Releases
58 releases since OpenBSD 2.4; the text changed 13 times.