|KSYMS(4)||Device Drivers Manual||KSYMS(4)|
ksyms — kernel
symbol table device
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
try /dev/ksyms automatically if the first parameter
to them is the
An open of /dev/ksyms will fail if:
The /dev/ksyms device appeared in OpenBSD 2.4.
It is not possible to mmap(2) /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) support would be trivial.
|January 25, 2019||OpenBSD-6.9|