FreeBSD kernel kern code
|
#include <sys/cdefs.h>
#include "opt_ddb.h"
#include "opt_kld.h"
#include "opt_hwpmc_hooks.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/boottrace.h>
#include <sys/eventhandler.h>
#include <sys/fcntl.h>
#include <sys/jail.h>
#include <sys/kernel.h>
#include <sys/libkern.h>
#include <sys/linker.h>
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/module.h>
#include <sys/mount.h>
#include <sys/mutex.h>
#include <sys/namei.h>
#include <sys/priv.h>
#include <sys/proc.h>
#include <sys/sx.h>
#include <sys/syscallsubr.h>
#include <sys/sysctl.h>
#include <sys/sysent.h>
#include <sys/sysproto.h>
#include <sys/vnode.h>
#include <net/vnet.h>
#include <security/mac/mac_framework.h>
#include "linker_if.h"
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 ("$FreeBSD$") | |
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, const struct mod_depend *verinfo, struct linker_file **lfpp) |
static modlist_t | modlist_lookup2 (const char *name, const struct mod_depend *verinfo) |
static void | linker_init (void *arg) |
SYSINIT (linker, SI_SUB_KLD, SI_ORDER_FIRST, linker_init, NULL) | |
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, bool enable) |
static void | linker_file_enable_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, NULL) | |
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_flags (caddr_t value, char *buf, u_int buflen, long *offset, int flags) |
int | linker_search_symbol_name (caddr_t value, char *buf, u_int buflen, long *offset) |
int | linker_kldload_busy (int flags) |
void | linker_kldload_unbusy (int flags) |
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, NULL) | |
static void | linker_preload_finish (void *arg) |
SYSINIT (preload_finish, SI_SUB_KTHREAD_INIT - 100, SI_ORDER_MIDDLE, linker_preload_finish, NULL) | |
SYSCTL_STRING (_kern, OID_AUTO, module_path, CTLFLAG_RWTUN, 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, const struct mod_depend *verinfo) |
static char * | linker_search_module (const char *modname, int modnamelen, const struct mod_depend *verinfo) |
static char * | linker_search_kld (const char *name) |
static bool | linker_root_mounted (void) |
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|CTLFLAG_MPSAFE, NULL, 0, sysctl_kern_function_list, "", "kernel function list") | |
Variables | |
const int | kld_off_address = offsetof(struct linker_file, address) |
const int | kld_off_filename = offsetof(struct linker_file, filename) |
const int | kld_off_pathname = offsetof(struct linker_file, pathname) |
const int | kld_off_next = offsetof(struct linker_file, link.tqe_next) |
linker_file_t | linker_kernel_file |
static struct sx | kld_sx |
static u_int | kld_busy |
static struct thread * | kld_busy_owner |
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 const char *const | linker_ext_list [] |
#define INT_ALIGN | ( | base, | |
ptr | |||
) |
Definition at line 1900 of file kern_linker.c.
#define LINKER_GET_NEXT_FILE_ID | ( | a | ) |
Definition at line 124 of file kern_linker.c.
typedef struct modlist* modlist_t |
Definition at line 147 of file kern_linker.c.
__FBSDID | ( | "$FreeBSD$" | ) |
int kern_kldload | ( | struct thread * | td, |
const char * | file, | ||
int * | fileid | ||
) |
Definition at line 1128 of file kern_linker.c.
References kld_sx, linker_kldload_busy(), linker_kldload_unbusy(), linker_load_module(), priv_check(), and securelevel_gt().
Referenced by sys_kldload(), and vfs_byname_kld().
int kern_kldstat | ( | struct thread * | td, |
int | fileid, | ||
struct kld_file_stat * | stat | ||
) |
Definition at line 1351 of file kern_linker.c.
References kld_sx, and linker_find_file_by_id().
Referenced by sys_kldstat().
int kern_kldunload | ( | struct thread * | td, |
int | fileid, | ||
int | flags | ||
) |
Definition at line 1197 of file kern_linker.c.
References flags, kld_sx, linker_file_unload(), linker_find_file_by_id(), linker_kldload_busy(), linker_kldload_unbusy(), printf(), priv_check(), and securelevel_gt().
Referenced by sys_kldunload(), sys_kldunloadf(), and vfs_byname_kld().
int linker_add_class | ( | linker_class_t | lc | ) |
Definition at line 180 of file kern_linker.c.
References classes, kobj_class_compile(), lc, and linker_no_more_classes.
Referenced by link_elf_init().
|
static |
Definition at line 1548 of file kern_linker.c.
References modlist_lookup(), modlist_newmodule(), printf(), start, and stop.
Referenced by linker_load_dependencies(), and linker_preload().
|
static |
Definition at line 2089 of file kern_linker.c.
References filename, and path.
Referenced by linker_load_module(), linker_make_file(), and sys_kldfind().
int linker_ctf_get | ( | linker_file_t | file, |
linker_ctf_t * | lc | ||
) |
Definition at line 777 of file kern_linker.c.
References lc.
int linker_ddb_search_symbol | ( | caddr_t | value, |
c_linker_sym_t * | sym, | ||
long * | diffp | ||
) |
Definition at line 1017 of file kern_linker.c.
References diffp, linker_debug_search_symbol(), sym, and value.
Referenced by stack_symbol_ddb().
int linker_ddb_search_symbol_name | ( | caddr_t | value, |
char * | buf, | ||
u_int | buflen, | ||
long * | offset | ||
) |
Definition at line 1031 of file kern_linker.c.
References buf, linker_debug_search_symbol_name(), and value.
Referenced by kmsan_report_hook(), and kmsan_report_inline().
int linker_ddb_symbol_values | ( | c_linker_sym_t | sym, |
linker_symval_t * | symval | ||
) |
Definition at line 1024 of file kern_linker.c.
References linker_debug_symbol_values(), and sym.
Referenced by stack_symbol_ddb().
|
static |
Definition at line 938 of file kern_linker.c.
References diffp, linker_files, sym, and value.
Referenced by linker_ddb_search_symbol(), and linker_debug_search_symbol_name().
|
static |
Definition at line 981 of file kern_linker.c.
References buf, linker_debug_search_symbol(), linker_debug_symbol_values(), sym, and value.
Referenced by linker_ddb_search_symbol_name(), and linker_search_symbol_name_flags().
|
static |
Definition at line 969 of file kern_linker.c.
References linker_files, and sym.
Referenced by linker_ddb_symbol_values(), and linker_debug_search_symbol_name().
|
static |
Definition at line 783 of file kern_linker.c.
References kld_sx, and realloc().
Referenced by linker_load_dependencies(), linker_load_module(), and linker_preload().
|
static |
Definition at line 335 of file kern_linker.c.
References kld_sx, linker_file_lookup_set(), start, stop, sysctl_enable_oid(), sysctl_wlock(), and sysctl_wunlock().
Referenced by linker_load_file().
int linker_file_foreach | ( | linker_predicate_t * | predicate, |
void * | context | ||
) |
Definition at line 601 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 817 of file kern_linker.c.
int linker_file_lookup_set | ( | linker_file_t | file, |
const char * | name, | ||
void * | firstp, | ||
void * | lastp, | ||
int * | countp | ||
) |
Definition at line 805 of file kern_linker.c.
Referenced by linker_file_enable_sysctls(), linker_file_register_modules(), linker_file_register_sysctls(), linker_file_sysinit(), linker_file_sysuninit(), linker_file_unregister_sysctls(), linker_load_dependencies(), and linker_preload().
caddr_t linker_file_lookup_symbol | ( | linker_file_t | file, |
const char * | name, | ||
int | deps | ||
) |
Definition at line 824 of file kern_linker.c.
References kld_sx, linker_file_lookup_symbol_internal(), name, and sym.
Referenced by elf_lookup(), and elf_obj_lookup().
|
static |
Definition at line 839 of file kern_linker.c.
References kld_sx, linker_file_lookup_symbol_internal(), malloc(), name, and sym.
Referenced by linker_file_lookup_symbol(), and linker_file_lookup_symbol_internal().
|
static |
Definition at line 378 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().
|
static |
Definition at line 309 of file kern_linker.c.
References kld_sx, linker_file_lookup_set(), start, stop, sysctl_register_disabled_oid(), sysctl_register_oid(), sysctl_wlock(), and sysctl_wunlock().
Referenced by linker_load_file(), and linker_preload().
|
static |
Definition at line 197 of file kern_linker.c.
References Giant, kld_sx, linker_file_lookup_set(), start, stop, and sysinit.
Referenced by linker_load_file().
|
static |
Definition at line 252 of file kern_linker.c.
References Giant, kld_sx, linker_file_lookup_set(), start, stop, and sysinit.
Referenced by linker_file_unload().
int linker_file_unload | ( | linker_file_t | file, |
int | flags | ||
) |
Definition at line 654 of file kern_linker.c.
References flags, found_modules, free(), kld_sx, kobj_delete(), linker_file_sysuninit(), linker_file_unload(), linker_file_unregister_sysctls(), linker_files, module_getfnext(), module_getname(), module_quiesce(), module_release(), module_unload(), and prison0.
Referenced by kern_kldunload(), link_elf_link_preload(), link_elf_load_file(), linker_file_unload(), linker_load_file(), linker_load_module(), linker_preload(), linker_preload_finish(), and linker_release_module().
|
static |
Definition at line 357 of file kern_linker.c.
References kld_sx, linker_file_lookup_set(), start, stop, sysctl_unregister_oid(), sysctl_wlock(), and sysctl_wunlock().
Referenced by linker_file_unload().
|
static |
Definition at line 589 of file kern_linker.c.
References kld_sx, and linker_files.
Referenced by kern_kldstat(), kern_kldunload(), sys_kldfirstmod(), sys_kldnext(), and sys_kldsym().
|
static |
Definition at line 569 of file kern_linker.c.
References filename, free(), kld_sx, linker_files, malloc(), and sprintf().
Referenced by linker_load_file(), linker_load_module(), and sys_kldfind().
|
static |
Definition at line 1909 of file kern_linker.c.
References flags, free(), INT_ALIGN, linker_hintfile, linker_lookup_file(), malloc(), NDFREE(), path, printf(), result, snprintf(), vn_close(), vn_open(), and vn_rdwr().
Referenced by linker_search_module().
|
static |
Definition at line 160 of file kern_linker.c.
References classes, kld_sx, and linker_files.
|
static |
Definition at line 420 of file kern_linker.c.
References kld_sx, linker_file_register_modules(), and linker_kernel_file.
int linker_kldload_busy | ( | int | flags | ) |
Definition at line 1073 of file kern_linker.c.
References flags, kld_busy, kld_busy_owner, and kld_sx.
Referenced by kern_kldload(), and kern_kldunload().
void linker_kldload_unbusy | ( | int | flags | ) |
Definition at line 1104 of file kern_linker.c.
References flags, kld_busy, kld_busy_owner, kld_sx, panic(), and wakeup().
Referenced by kern_kldload(), and kern_kldunload().
int linker_load_dependencies | ( | linker_file_t | lf | ) |
Definition at line 2232 of file kern_linker.c.
References 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().
|
static |
Definition at line 432 of file kern_linker.c.
References classes, filename, kld_sx, lc, linker_file_enable_sysctls(), linker_file_register_modules(), linker_file_register_sysctls(), linker_file_sysinit(), linker_file_unload(), linker_find_file_by_name(), printf(), prison0, and result.
Referenced by linker_load_module().
|
static |
Definition at line 2160 of file kern_linker.c.
References filename, free(), kld_sx, linker_basename(), linker_file_add_dependency(), linker_file_unload(), linker_find_file_by_name(), linker_load_file(), linker_root_mounted(), linker_search_kld(), linker_search_module(), modlist_lookup2(), and parent.
Referenced by kern_kldload(), linker_load_dependencies(), and linker_reference_module().
|
static |
Definition at line 1854 of file kern_linker.c.
References flags, free(), linker_ext_list, malloc(), name, NDFREE(), path, result, snprintf(), type, vn_close(), and vn_open().
Referenced by linker_hints_lookup(), and linker_search_kld().
linker_file_t linker_make_file | ( | const char * | pathname, |
linker_class_t | lc | ||
) |
Definition at line 617 of file kern_linker.c.
References filename, kld_sx, kobj_create(), lc, linker_basename(), linker_files, LINKER_GET_NEXT_FILE_ID, and loadcnt.
Referenced by link_elf_init(), link_elf_link_preload(), and link_elf_load_file().
|
static |
Definition at line 1571 of file kern_linker.c.
References bootverbose, classes, found_modules, kld_sx, lc, linker_addmodules(), linker_file_add_dependency(), linker_file_lookup_set(), linker_file_register_modules(), linker_file_register_sysctls(), linker_file_unload(), linker_kernel_file, modlist_lookup(), modlist_lookup2(), modlist_newmodule(), panic(), preload_search_info(), preload_search_next_name(), printf(), start, stop, sysinit, and sysinit_add().
|
static |
Definition at line 1788 of file kern_linker.c.
References kld_sx, linker_file_unload(), and linker_files.
int linker_reference_module | ( | const char * | modname, |
struct mod_depend * | verinfo, | ||
linker_file_t * | result | ||
) |
Definition at line 524 of file kern_linker.c.
References kld_sx, linker_load_module(), modlist_lookup2(), and result.
Referenced by loadimage().
int linker_release_module | ( | const char * | modname, |
struct mod_depend * | verinfo, | ||
linker_file_t | lf | ||
) |
Definition at line 544 of file kern_linker.c.
References kld_sx, linker_file_unload(), and modlist_lookup2().
Referenced by loadimage(), and unloadentry().
|
static |
Definition at line 2141 of file kern_linker.c.
References pwd_drop(), pwd_hold(), and rootvnode.
Referenced by linker_load_module().
|
static |
Definition at line 2066 of file kern_linker.c.
References linker_lookup_file(), linker_path, name, and result.
Referenced by linker_load_module().
|
static |
Definition at line 2041 of file kern_linker.c.
References linker_hints_lookup(), linker_path, and result.
Referenced by linker_load_module().
int linker_search_symbol_name | ( | caddr_t | value, |
char * | buf, | ||
u_int | buflen, | ||
long * | offset | ||
) |
Definition at line 1064 of file kern_linker.c.
References buf, linker_search_symbol_name_flags(), and value.
Referenced by run_interrupt_driven_config_hooks_warning().
int linker_search_symbol_name_flags | ( | caddr_t | value, |
char * | buf, | ||
u_int | buflen, | ||
long * | offset, | ||
int | flags | ||
) |
Definition at line 1043 of file kern_linker.c.
References buf, flags, kld_sx, linker_debug_search_symbol_name(), and value.
Referenced by linker_search_symbol_name(), and stack_symbol().
|
static |
Definition at line 171 of file kern_linker.c.
References linker_no_more_classes.
MALLOC_DEFINE | ( | M_LINKER | , |
"linker" | , | ||
"kernel linker" | |||
) |
|
static |
Definition at line 1497 of file kern_linker.c.
References found_modules, and name.
Referenced by linker_addmodules(), linker_load_dependencies(), linker_preload(), and modlist_lookup2().
|
static |
Definition at line 1510 of file kern_linker.c.
References found_modules, modlist_lookup(), and name.
Referenced by linker_load_dependencies(), linker_load_module(), linker_preload(), linker_reference_module(), and linker_release_module().
|
static |
Definition at line 1533 of file kern_linker.c.
References found_modules, malloc(), and panic().
Referenced by linker_addmodules(), and linker_preload().
SET_DECLARE | ( | modmetadata_set | , |
struct mod_metadata | |||
) |
int sys_kldfind | ( | struct thread * | td, |
struct kldfind_args * | uap | ||
) |
Definition at line 1257 of file kern_linker.c.
References filename, free(), kld_sx, linker_basename(), linker_find_file_by_name(), and malloc().
int sys_kldfirstmod | ( | struct thread * | td, |
struct kldfirstmod_args * | uap | ||
) |
Definition at line 1408 of file kern_linker.c.
References kld_sx, linker_find_file_by_id(), and module_getid().
int sys_kldload | ( | struct thread * | td, |
struct kldload_args * | uap | ||
) |
Definition at line 1178 of file kern_linker.c.
References free(), kern_kldload(), and malloc().
int sys_kldnext | ( | struct thread * | td, |
struct kldnext_args * | uap | ||
) |
Definition at line 1290 of file kern_linker.c.
References kld_sx, linker_files, and linker_find_file_by_id().
int sys_kldstat | ( | struct thread * | td, |
struct kldstat_args * | uap | ||
) |
Definition at line 1327 of file kern_linker.c.
References free(), kern_kldstat(), and malloc().
int sys_kldsym | ( | struct thread * | td, |
struct kldsym_args * | uap | ||
) |
Definition at line 1437 of file kern_linker.c.
References free(), kld_sx, linker_files, linker_find_file_by_id(), malloc(), and sym.
int sys_kldunload | ( | struct thread * | td, |
struct kldunload_args * | uap | ||
) |
Definition at line 1240 of file kern_linker.c.
References kern_kldunload().
int sys_kldunloadf | ( | struct thread * | td, |
struct kldunloadf_args * | uap | ||
) |
Definition at line 1247 of file kern_linker.c.
References kern_kldunload().
|
static |
Definition at line 2324 of file kern_linker.c.
References kld_sx, linker_files, sysctl_kern_function_list_iterate(), and sysctl_wire_old_buffer().
|
static |
Definition at line 2311 of file kern_linker.c.
Referenced by sysctl_kern_function_list().
SYSCTL_PROC | ( | _kern | , |
OID_AUTO | , | ||
function_list | , | ||
CTLTYPE_OPAQUE|CTLFLAG_RD| | CTLFLAG_MPSAFE, | ||
NULL | , | ||
0 | , | ||
sysctl_kern_function_list | , | ||
"" | , | ||
"kernel function list" | |||
) |
SYSCTL_STRING | ( | _kern | , |
OID_AUTO | , | ||
module_path | , | ||
CTLFLAG_RWTUN | , | ||
linker_path | , | ||
sizeof(linker_path) | , | ||
"module load search path" | |||
) |
SYSINIT | ( | linker | , |
SI_SUB_KLD | , | ||
SI_ORDER_FIRST | , | ||
linker_init | , | ||
NULL | |||
) |
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 | , | ||
NULL | |||
) |
SYSINIT | ( | preload | , |
SI_SUB_KLD | , | ||
SI_ORDER_MIDDLE | , | ||
linker_preload | , | ||
NULL | |||
) |
SYSINIT | ( | preload_finish | , |
SI_SUB_KTHREAD_INIT - | 100, | ||
SI_ORDER_MIDDLE | , | ||
linker_preload_finish | , | ||
NULL | |||
) |
typedef TAILQ_HEAD | ( | modlist | ) |
Definition at line 140 of file kern_linker.c.
References name.
TUNABLE_STR | ( | "module_path" | , |
linker_path | , | ||
sizeof(linker_path) | |||
) |
|
static |
Definition at line 119 of file kern_linker.c.
Referenced by khelp_init_osd(), linker_add_class(), linker_init(), linker_load_file(), and linker_preload().
|
static |
Definition at line 148 of file kern_linker.c.
Referenced by linker_file_unload(), linker_preload(), modlist_lookup(), modlist_lookup2(), and modlist_newmodule().
|
static |
Definition at line 110 of file kern_linker.c.
Referenced by linker_kldload_busy(), and linker_kldload_unbusy().
|
static |
Definition at line 111 of file kern_linker.c.
Referenced by linker_kldload_busy(), and linker_kldload_unbusy().
const int kld_off_address = offsetof(struct linker_file, address) |
Definition at line 81 of file kern_linker.c.
const int kld_off_filename = offsetof(struct linker_file, filename) |
Definition at line 82 of file kern_linker.c.
const int kld_off_next = offsetof(struct linker_file, link.tqe_next) |
Definition at line 84 of file kern_linker.c.
const int kld_off_pathname = offsetof(struct linker_file, pathname) |
Definition at line 83 of file kern_linker.c.
|
static |
Definition at line 109 of file kern_linker.c.
Referenced by kern_kldload(), kern_kldstat(), kern_kldunload(), linker_file_add_dependency(), linker_file_enable_sysctls(), linker_file_foreach(), linker_file_lookup_set(), linker_file_lookup_symbol(), linker_file_lookup_symbol_internal(), linker_file_register_modules(), linker_file_register_sysctls(), linker_file_sysinit(), linker_file_sysuninit(), linker_file_unload(), linker_file_unregister_sysctls(), linker_find_file_by_id(), linker_find_file_by_name(), linker_init(), linker_init_kernel_modules(), linker_kldload_busy(), linker_kldload_unbusy(), linker_load_dependencies(), linker_load_file(), linker_load_module(), linker_make_file(), linker_preload(), linker_preload_finish(), linker_reference_module(), linker_release_module(), linker_search_symbol_name_flags(), sys_kldfind(), sys_kldfirstmod(), sys_kldnext(), sys_kldsym(), and sysctl_kern_function_list().
|
static |
Definition at line 1842 of file kern_linker.c.
Referenced by linker_lookup_file().
|
static |
Definition at line 120 of file kern_linker.c.
Referenced by linker_debug_search_symbol(), linker_debug_symbol_values(), linker_file_foreach(), linker_file_unload(), linker_find_file_by_id(), linker_find_file_by_name(), linker_init(), linker_make_file(), linker_preload_finish(), sys_kldnext(), sys_kldsym(), and sysctl_kern_function_list().
|
static |
Definition at line 1834 of file kern_linker.c.
Referenced by linker_hints_lookup().
linker_file_t linker_kernel_file |
Definition at line 107 of file kern_linker.c.
Referenced by link_elf_init(), linker_file_register_modules(), linker_init_kernel_modules(), linker_load_dependencies(), and linker_preload().
|
static |
Definition at line 122 of file kern_linker.c.
Referenced by linker_add_class(), and linker_stop_class_add().
|
static |
Definition at line 1835 of file kern_linker.c.
Referenced by linker_search_kld(), and linker_search_module().
|
static |
Definition at line 117 of file kern_linker.c.
Referenced by linker_make_file().
|
static |
Definition at line 121 of file kern_linker.c.