Using __attribute__((weak)) in the kernel

Ryan Stone rysto32 at gmail.com
Wed Mar 24 02:47:40 UTC 2010


I severely doubt that the kernel linker supports that.  I believe that
the only way to accomplish what you're looking for is to leave
function pointers in the kernel that you can call, and your module can
change the function pointers at load/unload.  Don't forget to have
some kind of synchronization to prevent a function pointer from being
called as it is being updated.


More information about the freebsd-hackers mailing list