MirOS Manual: ksyms(4)

KSYMS(4)                   BSD Programmer's Manual                    KSYMS(4)


     ksyms - kernel symbol table device


     pseudo-device ksyms [count]


     The /dev/ksyms device masquerades as an OpenBSD native executable
     (a.out or ELF, depending on the platform) with the symbols from the run-
     ning 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 con-
     junction 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).




     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.


     kvm(3), nlist(3)


     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.

MirOS BSD #10-current          August 24, 1998                               1

Generated on 2017-04-03 16:26:17 by $MirOS: src/scripts/roff2htm,v 1.88 2017/01/29 00:51:06 tg Exp $

These manual pages and other documentation are copyrighted by their respective writers; their source is available at our CVSweb, AnonCVS, and other mirrors. The rest is Copyright © 2002–2017 The MirOS Project, Germany.
This product includes material provided by mirabilos.

This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report — diffs preferred.