FreeBSD kernel kern code
kern_linker.c File Reference
#include <sys/cdefs.h>
#include "opt_ddb.h"
#include "opt_hwpmc_hooks.h"
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/malloc.h>
#include <sys/sysproto.h>
#include <sys/sysent.h>
#include <sys/priv.h>
#include <sys/proc.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/sx.h>
#include <sys/module.h>
#include <sys/mount.h>
#include <sys/linker.h>
#include <sys/eventhandler.h>
#include <sys/fcntl.h>
#include <sys/jail.h>
#include <sys/libkern.h>
#include <sys/namei.h>
#include <sys/vnode.h>
#include <sys/syscallsubr.h>
#include <sys/sysctl.h>
#include <net/vnet.h>
#include <security/mac/mac_framework.h>
#include "linker_if.h"
Include dependency graph for kern_linker.c:

Go to the source code of this file.

Macros

#define LINKER_GET_NEXT_FILE_ID(a)
 
#define INT_ALIGN(base, ptr)
 

Typedefs

typedef struct modlist * modlist_t
 

Functions

 __FBSDID ("$BSDSUniX$")
 
static const char * linker_basename (const char *path)
 
static linker_file_t linker_find_file_by_name (const char *_filename)
 
static linker_file_t linker_find_file_by_id (int _fileid)
 
 SET_DECLARE (modmetadata_set, struct mod_metadata)
 
 MALLOC_DEFINE (M_LINKER,"linker","kernel linker")
 
typedef TAILQ_HEAD (modlist)
 
static int linker_file_add_dependency (linker_file_t file, linker_file_t dep)
 
static caddr_t linker_file_lookup_symbol_internal (linker_file_t file, const char *name, int deps)
 
static int linker_load_module (const char *kldname, const char *modname, struct linker_file *parent, struct mod_depend *verinfo, struct linker_file **lfpp)
 
static modlist_t modlist_lookup2 (const char *name, struct mod_depend *verinfo)
 
static char * linker_strdup (const char *str)
 
static void linker_init (void *arg)
 
 SYSINIT (linker, SI_SUB_KLD, SI_ORDER_FIRST, linker_init, 0)
 
static void linker_stop_class_add (void *arg)
 
 SYSINIT (linker_class, SI_SUB_KLD, SI_ORDER_ANY, linker_stop_class_add, NULL)
 
int linker_add_class (linker_class_t lc)
 
static void linker_file_sysinit (linker_file_t lf)
 
static void linker_file_sysuninit (linker_file_t lf)
 
static void linker_file_register_sysctls (linker_file_t lf)
 
static void linker_file_unregister_sysctls (linker_file_t lf)
 
static int linker_file_register_modules (linker_file_t lf)
 
static void linker_init_kernel_modules (void)
 
 SYSINIT (linker_kernel, SI_SUB_KLD, SI_ORDER_ANY, linker_init_kernel_modules, 0)
 
static int linker_load_file (const char *filename, linker_file_t *result)
 
int linker_reference_module (const char *modname, struct mod_depend *verinfo, linker_file_t *result)
 
int linker_release_module (const char *modname, struct mod_depend *verinfo, linker_file_t lf)
 
int linker_file_foreach (linker_predicate_t *predicate, void *context)
 
linker_file_t linker_make_file (const char *pathname, linker_class_t lc)
 
int linker_file_unload (linker_file_t file, int flags)
 
int linker_ctf_get (linker_file_t file, linker_ctf_t *lc)
 
int linker_file_lookup_set (linker_file_t file, const char *name, void *firstp, void *lastp, int *countp)
 
int linker_file_function_listall (linker_file_t lf, linker_function_nameval_callback_t callback_func, void *arg)
 
caddr_t linker_file_lookup_symbol (linker_file_t file, const char *name, int deps)
 
static int linker_debug_search_symbol (caddr_t value, c_linker_sym_t *sym, long *diffp)
 
static int linker_debug_symbol_values (c_linker_sym_t sym, linker_symval_t *symval)
 
static int linker_debug_search_symbol_name (caddr_t value, char *buf, u_int buflen, long *offset)
 
int linker_ddb_search_symbol (caddr_t value, c_linker_sym_t *sym, long *diffp)
 
int linker_ddb_symbol_values (c_linker_sym_t sym, linker_symval_t *symval)
 
int linker_ddb_search_symbol_name (caddr_t value, char *buf, u_int buflen, long *offset)
 
int linker_search_symbol_name (caddr_t value, char *buf, u_int buflen, long *offset)
 
int kern_kldload (struct thread *td, const char *file, int *fileid)
 
int sys_kldload (struct thread *td, struct kldload_args *uap)
 
int kern_kldunload (struct thread *td, int fileid, int flags)
 
int sys_kldunload (struct thread *td, struct kldunload_args *uap)
 
int sys_kldunloadf (struct thread *td, struct kldunloadf_args *uap)
 
int sys_kldfind (struct thread *td, struct kldfind_args *uap)
 
int sys_kldnext (struct thread *td, struct kldnext_args *uap)
 
int sys_kldstat (struct thread *td, struct kldstat_args *uap)
 
int kern_kldstat (struct thread *td, int fileid, struct kld_file_stat *stat)
 
int sys_kldfirstmod (struct thread *td, struct kldfirstmod_args *uap)
 
int sys_kldsym (struct thread *td, struct kldsym_args *uap)
 
static modlist_t modlist_lookup (const char *name, int ver)
 
static modlist_t modlist_newmodule (const char *modname, int version, linker_file_t container)
 
static void linker_addmodules (linker_file_t lf, struct mod_metadata **start, struct mod_metadata **stop, int preload)
 
static void linker_preload (void *arg)
 
 SYSINIT (preload, SI_SUB_KLD, SI_ORDER_MIDDLE, linker_preload, 0)
 
 SYSCTL_STRING (_kern, OID_AUTO, module_path, CTLFLAG_RW, linker_path, sizeof(linker_path),"module load search path")
 
 TUNABLE_STR ("module_path", linker_path, sizeof(linker_path))
 
static char * linker_lookup_file (const char *path, int pathlen, const char *name, int namelen, struct vattr *vap)
 
static char * linker_hints_lookup (const char *path, int pathlen, const char *modname, int modnamelen, struct mod_depend *verinfo)
 
static char * linker_search_module (const char *modname, int modnamelen, struct mod_depend *verinfo)
 
static char * linker_search_kld (const char *name)
 
int linker_load_dependencies (linker_file_t lf)
 
static int sysctl_kern_function_list_iterate (const char *name, void *opaque)
 
static int sysctl_kern_function_list (SYSCTL_HANDLER_ARGS)
 
 SYSCTL_PROC (_kern, OID_AUTO, function_list, CTLTYPE_OPAQUE|CTLFLAG_RD, NULL, 0, sysctl_kern_function_list,"","kernel function list")
 

Variables

linker_file_t linker_kernel_file
 
static struct sx kld_sx
 
static int loadcnt
 
static linker_class_list_t classes
 
static linker_file_list_t linker_files
 
static int next_file_id = 1
 
static int linker_no_more_classes = 0
 
static modlisthead_t found_modules
 
static char linker_hintfile [] = "linker.hints"
 
static char linker_path [MAXPATHLEN] = "/boot/kernel;/boot/modules"
 
static char * linker_ext_list []
 

Macro Definition Documentation

#define INT_ALIGN (   base,
  ptr 
)
Value:
ptr = \
(base) + (((ptr) - (base) + sizeof(int) - 1) & ~(sizeof(int) - 1))

Definition at line 1718 of file kern_linker.c.

Referenced by linker_hints_lookup().

#define LINKER_GET_NEXT_FILE_ID (   a)
Value:
do { \
linker_file_t lftmp; \
\
if (!cold) \
sx_assert(&kld_sx, SA_XLOCKED); \
retry: \
TAILQ_FOREACH(lftmp, &linker_files, link) { \
if (next_file_id == lftmp->id) { \
goto retry; \
} \
} \
(a) = next_file_id; \
} while(0)
static struct sx kld_sx
Definition: kern_linker.c:95
static linker_file_list_t linker_files
Definition: kern_linker.c:104
static int next_file_id
Definition: kern_linker.c:105

Definition at line 108 of file kern_linker.c.

Referenced by linker_make_file().

Typedef Documentation

typedef struct modlist* modlist_t

Definition at line 132 of file kern_linker.c.

Function Documentation

__FBSDID ( "$BSDSUniX$"  )
int kern_kldload ( struct thread *  td,
const char *  file,
int *  fileid 
)

Definition at line 1006 of file kern_linker.c.

References kld_sx, linker_load_module(), priv_check(), and securelevel_gt().

Referenced by sys_kldload(), and vfs_byname_kld().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_kldstat ( struct thread *  td,
int  fileid,
struct kld_file_stat *  stat 
)

Definition at line 1221 of file kern_linker.c.

References kld_sx, and linker_find_file_by_id().

Referenced by sys_kldstat().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern_kldunload ( struct thread *  td,
int  fileid,
int  flags 
)

Definition at line 1073 of file kern_linker.c.

References kld_sx, linker_file_unload(), linker_find_file_by_id(), printf(), priv_check(), and securelevel_gt().

Referenced by sys_kldunload(), sys_kldunloadf(), and vfs_byname_kld().

Here is the call graph for this function:

Here is the caller graph for this function:

int linker_add_class ( linker_class_t  lc)

Definition at line 175 of file kern_linker.c.

References classes, kobj_class_compile(), and linker_no_more_classes.

Referenced by link_elf_init().

Here is the call graph for this function:

Here is the caller graph for this function:

static void linker_addmodules ( linker_file_t  lf,
struct mod_metadata **  start,
struct mod_metadata **  stop,
int  preload 
)
static

Definition at line 1401 of file kern_linker.c.

References modlist_lookup(), modlist_newmodule(), printf(), and stop.

Referenced by linker_load_dependencies(), and linker_preload().

Here is the call graph for this function:

Here is the caller graph for this function:

static const char * linker_basename ( const char *  path)
static

Definition at line 1912 of file kern_linker.c.

References filename, and path.

Referenced by linker_load_module(), linker_make_file(), and sys_kldfind().

Here is the caller graph for this function:

int linker_ctf_get ( linker_file_t  file,
linker_ctf_t *  lc 
)

Definition at line 725 of file kern_linker.c.

int linker_ddb_search_symbol ( caddr_t  value,
c_linker_sym_t *  sym,
long *  diffp 
)

Definition at line 965 of file kern_linker.c.

References linker_debug_search_symbol().

Referenced by stack_symbol_ddb().

Here is the call graph for this function:

Here is the caller graph for this function:

int linker_ddb_search_symbol_name ( caddr_t  value,
char *  buf,
u_int  buflen,
long *  offset 
)

Definition at line 979 of file kern_linker.c.

References linker_debug_search_symbol_name().

Here is the call graph for this function:

int linker_ddb_symbol_values ( c_linker_sym_t  sym,
linker_symval_t *  symval 
)

Definition at line 972 of file kern_linker.c.

References linker_debug_symbol_values().

Referenced by stack_symbol_ddb().

Here is the call graph for this function:

Here is the caller graph for this function:

static int linker_debug_search_symbol ( caddr_t  value,
c_linker_sym_t *  sym,
long *  diffp 
)
static

Definition at line 886 of file kern_linker.c.

References linker_files.

Referenced by linker_ddb_search_symbol(), and linker_debug_search_symbol_name().

Here is the caller graph for this function:

static int linker_debug_search_symbol_name ( caddr_t  value,
char *  buf,
u_int  buflen,
long *  offset 
)
static

Definition at line 929 of file kern_linker.c.

References linker_debug_search_symbol(), linker_debug_symbol_values(), and sym.

Referenced by linker_ddb_search_symbol_name(), and linker_search_symbol_name().

Here is the call graph for this function:

Here is the caller graph for this function:

static int linker_debug_symbol_values ( c_linker_sym_t  sym,
linker_symval_t *  symval 
)
static

Definition at line 917 of file kern_linker.c.

References linker_files.

Referenced by linker_ddb_symbol_values(), and linker_debug_search_symbol_name().

Here is the caller graph for this function:

static int linker_file_add_dependency ( linker_file_t  file,
linker_file_t  dep 
)
static

Definition at line 731 of file kern_linker.c.

References kld_sx, and realloc().

Referenced by linker_load_dependencies(), linker_load_module(), and linker_preload().

Here is the call graph for this function:

Here is the caller graph for this function:

int linker_file_foreach ( linker_predicate_t *  predicate,
void *  context 
)

Definition at line 556 of file kern_linker.c.

References kld_sx, and linker_files.

int linker_file_function_listall ( linker_file_t  lf,
linker_function_nameval_callback_t  callback_func,
void *  arg 
)

Definition at line 765 of file kern_linker.c.

int linker_file_lookup_set ( linker_file_t  file,
const char *  name,
void *  firstp,
void *  lastp,
int *  countp 
)
caddr_t linker_file_lookup_symbol ( linker_file_t  file,
const char *  name,
int  deps 
)

Definition at line 772 of file kern_linker.c.

References kld_sx, linker_file_lookup_symbol_internal(), and sym.

Referenced by elf_lookup(), and elf_obj_lookup().

Here is the call graph for this function:

Here is the caller graph for this function:

static caddr_t linker_file_lookup_symbol_internal ( linker_file_t  file,
const char *  name,
int  deps 
)
static

Definition at line 787 of file kern_linker.c.

References kld_sx, malloc(), and sym.

Referenced by linker_file_lookup_symbol().

Here is the call graph for this function:

Here is the caller graph for this function:

static int linker_file_register_modules ( linker_file_t  lf)
static

Definition at line 333 of file kern_linker.c.

References kld_sx, linker_file_lookup_set(), linker_kernel_file, module_register(), printf(), start, and stop.

Referenced by linker_init_kernel_modules(), linker_load_file(), and linker_preload().

Here is the call graph for this function:

Here is the caller graph for this function:

static void linker_file_register_sysctls ( linker_file_t  lf)
static

Definition at line 290 of file kern_linker.c.

References kld_sx, linker_file_lookup_set(), start, stop, sysctl_lock(), sysctl_register_oid(), and sysctl_unlock().

Referenced by linker_load_file(), and linker_preload().

Here is the call graph for this function:

Here is the caller graph for this function:

static void linker_file_sysinit ( linker_file_t  lf)
static

Definition at line 192 of file kern_linker.c.

References Giant, kld_sx, linker_file_lookup_set(), start, stop, and sysinit.

Referenced by linker_load_file().

Here is the call graph for this function:

Here is the caller graph for this function:

static void linker_file_sysuninit ( linker_file_t  lf)
static

Definition at line 240 of file kern_linker.c.

References Giant, kld_sx, linker_file_lookup_set(), start, stop, and sysinit.

Referenced by linker_file_unload().

Here is the call graph for this function:

Here is the caller graph for this function:

int linker_file_unload ( linker_file_t  file,
int  flags 
)
static void linker_file_unregister_sysctls ( linker_file_t  lf)
static

Definition at line 312 of file kern_linker.c.

References kld_sx, linker_file_lookup_set(), start, stop, sysctl_lock(), sysctl_unlock(), and sysctl_unregister_oid().

Referenced by linker_file_unload().

Here is the call graph for this function:

Here is the caller graph for this function:

static linker_file_t linker_find_file_by_id ( int  _fileid)
static

Definition at line 544 of file kern_linker.c.

References kld_sx, and linker_files.

Referenced by kern_kldstat(), kern_kldunload(), sys_kldfirstmod(), sys_kldnext(), and sys_kldsym().

Here is the caller graph for this function:

static linker_file_t linker_find_file_by_name ( const char *  _filename)
static

Definition at line 524 of file kern_linker.c.

References free(), kld_sx, linker_files, malloc(), and sprintf().

Referenced by linker_load_file(), linker_load_module(), and sys_kldfind().

Here is the call graph for this function:

Here is the caller graph for this function:

static char* linker_hints_lookup ( const char *  path,
int  pathlen,
const char *  modname,
int  modnamelen,
struct mod_depend *  verinfo 
)
static

Definition at line 1727 of file kern_linker.c.

References free(), INT_ALIGN, linker_lookup_file(), malloc(), NDFREE(), printf(), result, snprintf(), vn_close(), vn_open(), and vn_rdwr().

Referenced by linker_search_module().

Here is the call graph for this function:

Here is the caller graph for this function:

static void linker_init ( void *  arg)
static

Definition at line 155 of file kern_linker.c.

References classes, kld_sx, and linker_files.

static void linker_init_kernel_modules ( void  )
static

Definition at line 376 of file kern_linker.c.

References kld_sx, linker_file_register_modules(), and linker_kernel_file.

Here is the call graph for this function:

int linker_load_dependencies ( linker_file_t  lf)

Definition at line 2038 of file kern_linker.c.

References count, kld_sx, linker_addmodules(), linker_file_add_dependency(), linker_file_lookup_set(), linker_kernel_file, linker_load_module(), modlist_lookup(), modlist_lookup2(), printf(), start, and stop.

Referenced by link_elf_load_file().

Here is the call graph for this function:

Here is the caller graph for this function:

static int linker_load_file ( const char *  filename,
linker_file_t *  result 
)
static

Definition at line 388 of file kern_linker.c.

References classes, kld_sx, lc, linker_file_register_modules(), linker_file_register_sysctls(), linker_file_sysinit(), linker_file_unload(), linker_find_file_by_name(), printf(), and prison0.

Referenced by linker_load_module().

Here is the call graph for this function:

Here is the caller graph for this function:

static int linker_load_module ( const char *  kldname,
const char *  modname,
struct linker_file *  parent,
struct mod_depend *  verinfo,
struct linker_file **  lfpp 
)
static
static char* linker_lookup_file ( const char *  path,
int  pathlen,
const char *  name,
int  namelen,
struct vattr *  vap 
)
static

Definition at line 1671 of file kern_linker.c.

References free(), malloc(), NDFREE(), result, snprintf(), type, vn_close(), and vn_open().

Referenced by linker_hints_lookup(), and linker_search_kld().

Here is the call graph for this function:

Here is the caller graph for this function:

linker_file_t linker_make_file ( const char *  pathname,
linker_class_t  lc 
)

Definition at line 572 of file kern_linker.c.

References filename, kld_sx, kobj_create(), lc, linker_basename(), linker_files, LINKER_GET_NEXT_FILE_ID, linker_strdup(), and loadcnt.

Referenced by link_elf_init(), link_elf_link_preload(), and link_elf_load_file().

Here is the call graph for this function:

Here is the caller graph for this function:

int linker_reference_module ( const char *  modname,
struct mod_depend *  verinfo,
linker_file_t *  result 
)

Definition at line 479 of file kern_linker.c.

References kld_sx, linker_load_module(), and modlist_lookup2().

Referenced by loadimage().

Here is the call graph for this function:

Here is the caller graph for this function:

int linker_release_module ( const char *  modname,
struct mod_depend *  verinfo,
linker_file_t  lf 
)

Definition at line 499 of file kern_linker.c.

References kld_sx, linker_file_unload(), and modlist_lookup2().

Referenced by loadimage(), and unloadentry().

Here is the call graph for this function:

Here is the caller graph for this function:

static char* linker_search_kld ( const char *  name)
static

Definition at line 1889 of file kern_linker.c.

References linker_lookup_file(), linker_strdup(), and result.

Referenced by linker_load_module().

Here is the call graph for this function:

Here is the caller graph for this function:

static char* linker_search_module ( const char *  modname,
int  modnamelen,
struct mod_depend *  verinfo 
)
static

Definition at line 1864 of file kern_linker.c.

References linker_hints_lookup(), and result.

Referenced by linker_load_module().

Here is the call graph for this function:

Here is the caller graph for this function:

int linker_search_symbol_name ( caddr_t  value,
char *  buf,
u_int  buflen,
long *  offset 
)

Definition at line 991 of file kern_linker.c.

References kld_sx, and linker_debug_search_symbol_name().

Referenced by stack_symbol(), and TAILQ_HEAD().

Here is the call graph for this function:

Here is the caller graph for this function:

static void linker_stop_class_add ( void *  arg)
static

Definition at line 166 of file kern_linker.c.

References linker_no_more_classes.

static char* linker_strdup ( const char *  str)
static

Definition at line 145 of file kern_linker.c.

References malloc(), and result.

Referenced by linker_load_module(), linker_make_file(), and linker_search_kld().

Here is the call graph for this function:

Here is the caller graph for this function:

MALLOC_DEFINE ( M_LINKER  ,
"linker"  ,
"kernel linker  
)
static modlist_t modlist_lookup ( const char *  name,
int  ver 
)
static

Definition at line 1350 of file kern_linker.c.

References found_modules.

Referenced by linker_addmodules(), linker_load_dependencies(), linker_preload(), and modlist_lookup2().

Here is the caller graph for this function:

static modlist_t modlist_lookup2 ( const char *  name,
struct mod_depend *  verinfo 
)
static

Definition at line 1363 of file kern_linker.c.

References found_modules, and modlist_lookup().

Referenced by linker_load_dependencies(), linker_load_module(), linker_preload(), linker_reference_module(), and linker_release_module().

Here is the call graph for this function:

Here is the caller graph for this function:

static modlist_t modlist_newmodule ( const char *  modname,
int  version,
linker_file_t  container 
)
static

Definition at line 1386 of file kern_linker.c.

References found_modules, malloc(), and panic().

Referenced by linker_addmodules(), and linker_preload().

Here is the call graph for this function:

Here is the caller graph for this function:

SET_DECLARE ( modmetadata_set  ,
struct mod_metadata   
)
int sys_kldfind ( struct thread *  td,
struct kldfind_args *  uap 
)

Definition at line 1129 of file kern_linker.c.

References filename, free(), kld_sx, linker_basename(), linker_find_file_by_name(), and malloc().

Here is the call graph for this function:

int sys_kldfirstmod ( struct thread *  td,
struct kldfirstmod_args *  uap 
)

Definition at line 1261 of file kern_linker.c.

References kld_sx, linker_find_file_by_id(), and module_getid().

Here is the call graph for this function:

int sys_kldload ( struct thread *  td,
struct kldload_args *  uap 
)

Definition at line 1054 of file kern_linker.c.

References free(), kern_kldload(), and malloc().

Here is the call graph for this function:

int sys_kldnext ( struct thread *  td,
struct kldnext_args *  uap 
)

Definition at line 1162 of file kern_linker.c.

References kld_sx, linker_files, and linker_find_file_by_id().

Here is the call graph for this function:

int sys_kldstat ( struct thread *  td,
struct kldstat_args *  uap 
)

Definition at line 1199 of file kern_linker.c.

References kern_kldstat().

Here is the call graph for this function:

int sys_kldsym ( struct thread *  td,
struct kldsym_args *  uap 
)

Definition at line 1290 of file kern_linker.c.

References free(), kld_sx, linker_files, linker_find_file_by_id(), malloc(), and sym.

Here is the call graph for this function:

int sys_kldunload ( struct thread *  td,
struct kldunload_args *  uap 
)

Definition at line 1112 of file kern_linker.c.

References kern_kldunload().

Here is the call graph for this function:

int sys_kldunloadf ( struct thread *  td,
struct kldunloadf_args *  uap 
)

Definition at line 1119 of file kern_linker.c.

References kern_kldunload().

Here is the call graph for this function:

static int sysctl_kern_function_list ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 2130 of file kern_linker.c.

References kld_sx, linker_files, sysctl_kern_function_list_iterate(), and sysctl_wire_old_buffer().

Here is the call graph for this function:

static int sysctl_kern_function_list_iterate ( const char *  name,
void *  opaque 
)
static

Definition at line 2117 of file kern_linker.c.

References opaque.

Referenced by sysctl_kern_function_list().

Here is the caller graph for this function:

SYSCTL_PROC ( _kern  ,
OID_AUTO  ,
function_list  ,
CTLTYPE_OPAQUE|  CTLFLAG_RD,
NULL  ,
,
sysctl_kern_function_list  ,
""  ,
"kernel function list"   
)
SYSCTL_STRING ( _kern  ,
OID_AUTO  ,
module_path  ,
CTLFLAG_RW  ,
linker_path  ,
sizeof(linker_path ,
"module load search path  
)
SYSINIT ( linker  ,
SI_SUB_KLD  ,
SI_ORDER_FIRST  ,
linker_init  ,
 
)
SYSINIT ( linker_class  ,
SI_SUB_KLD  ,
SI_ORDER_ANY  ,
linker_stop_class_add  ,
NULL   
)
SYSINIT ( linker_kernel  ,
SI_SUB_KLD  ,
SI_ORDER_ANY  ,
linker_init_kernel_modules  ,
 
)
SYSINIT ( preload  ,
SI_SUB_KLD  ,
SI_ORDER_MIDDLE  ,
linker_preload  ,
 
)
typedef TAILQ_HEAD ( modlist  )

Definition at line 125 of file kern_linker.c.

References name.

TUNABLE_STR ( "module_path"  ,
linker_path  ,
sizeof(linker_path  
)

Variable Documentation

linker_class_list_t classes
static

Definition at line 103 of file kern_linker.c.

Referenced by linker_add_class(), linker_init(), linker_load_file(), and linker_preload().

modlisthead_t found_modules
static
char* linker_ext_list[]
static
Initial value:
= {
"",
".ko",
NULL
}

Definition at line 1659 of file kern_linker.c.

char linker_hintfile[] = "linker.hints"
static

Definition at line 1651 of file kern_linker.c.

linker_file_t linker_kernel_file
int linker_no_more_classes = 0
static

Definition at line 106 of file kern_linker.c.

Referenced by linker_add_class(), and linker_stop_class_add().

char linker_path[MAXPATHLEN] = "/boot/kernel;/boot/modules"
static

Definition at line 1652 of file kern_linker.c.

int loadcnt
static

Definition at line 101 of file kern_linker.c.

Referenced by linker_make_file().

int next_file_id = 1
static

Definition at line 105 of file kern_linker.c.