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.)
This commit is contained in:
John Baldwin 2006-04-17 19:44:44 +00:00
parent 8ba7a3578b
commit 2971c36136
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=157818
2 changed files with 8 additions and 0 deletions

View File

@ -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.
*/

View File

@ -147,6 +147,7 @@ int module_unload(module_t, int flags);
int module_getid(module_t);
module_t module_getfnext(module_t);
void module_setspecific(module_t, modspecific_t *);
struct linker_file *module_file(module_t);
#ifdef MOD_DEBUG
extern int mod_debug;