On 15.07.2010 18:32, Kostik Belousov wrote: > The kernel linker ignores weak attribute of the symbol, as you see. > There is more bugs in this department, in regard of the list of > exported symbols from the modules. > > I have a patch that fixes the issues, but I am leery to commit it, since > the fix effectively breaks significant set of the modules.
Hi, Kostik i want to remind that some time ago there was a report about another bug. #include <sys/param.h> #include <sys/kernel.h> #include <sys/module.h> #include <sys/systm.h> static int tst_modevent(module_t mod, int type, void *unused) { switch (type) { case MOD_LOAD: return (EINVAL); case MOD_UNLOAD: break; }; return (0); } static moduledata_t tstmod = { "tst", tst_modevent, 0 }; DECLARE_MODULE(tst, tstmod, SI_SUB_ROOT_CONF, SI_ORDER_ANY); # kldload -v ./tst.ko Loaded ./tst.ko, id=16 I think loading of this module should be rejected on MOD_LOAD, but it doesn't. -- WBR, Andrey V. Elsukov
signature.asc
Description: OpenPGP digital signature