diff options
author | jhb <jhb@FreeBSD.org> | 2006-04-17 19:44:44 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2006-04-17 19:44:44 +0000 |
commit | 495b6abf1f643dd0850626bb0331b771de806b55 (patch) | |
tree | c9d9b44dff26f24a439a335c2353888069cc820c /sys/kern/kern_module.c | |
parent | d989c9d47862700759c8cc97aba66f22c3f2f2e5 (diff) | |
download | FreeBSD-src-495b6abf1f643dd0850626bb0331b771de806b55.zip FreeBSD-src-495b6abf1f643dd0850626bb0331b771de806b55.tar.gz |
Add a new module_file() function that returns the linker_file_t associated
with a given module_t. I use this in some the MOD_LOAD event handler for
some test kernel modules to ask the kernel linker to look up the linker
sets in my test modules. (I use linker sets to generate the list of
possible events that I then signal to execute via a sysctl. On non-amd64,
ld(8) would resolve the entire linker set, but on amd64 I have to ask the
kernel linker to do it for me, and having the kernel linker do it works on
all archs.)
Diffstat (limited to 'sys/kern/kern_module.c')
-rw-r--r-- | sys/kern/kern_module.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/kern/kern_module.c b/sys/kern/kern_module.c index e76565e..f92d39c 100644 --- a/sys/kern/kern_module.c +++ b/sys/kern/kern_module.c @@ -264,6 +264,13 @@ module_setspecific(module_t mod, modspecific_t *datap) mod->data = *datap; } +linker_file_t +module_file(module_t mod) +{ + + return (mod->file); +} + /* * Syscalls. */ |