ESYM(9) 386BSD Kernel Programmer's Manual ESYM(9)
NAME
esym - kernel external symbol table
SYNOPSIS
#include "esym.h"
esymbind(symbol)
esymunbind(symbol)
void *
esymfetch(symbol)
DESCRIPTION
Services provide by modules other than the core kernel module (see
kern(9) ) that may or may not be loaded in the kernel program may be
accessed from all other modules via the external symbol table. This is
the way an optionally, dynamically bound symbol can be accessed from any
part of the kernel, unlike the statically bound symbols in the reset of
the program.
Symbols are manually entered into the external symbol table with the
esymbind() function, that associates the symbol name with a specific
kernel address. These addresses can be then recovered via the
esymfetch() function, which obtains the address associated with a symbol
of the given name which was already bound. Symbols can be rebound by
breaking the binding with the esymunbind() function, allowing the symbol
to be bound differently with another esymbind() call.
While symbols are bound explicitly by the kernel modules implementing the
services used elsewhere, service clients implicitly use the esymfetch()
function via inline stub functions and macros present in include files
(located adjacent to the function prototypes for the functions
implemented).
The external symbol table does not use dynamic memory allocation or any
blocking resource, thus is usable anywhere in the kernel program.
RETURN VALUES
The esymfetch() function returns an address of the symbol if present;
otherwise a null address is returned.
SEE ALSO
kern(9)
386BSD Release 1.0 August 29, 1994 1