Sample Header Ad - 728x90

How does Linux kernel dynamically use a module?

0 votes
1 answer
4142 views
Understanding the Linux Kernel says > The kernel has two key tasks to perform in managing modules. The first task is mak- ing sure the rest of the kernel can reach the module’s global symbols, such as the entry point to its main function. A module must also know the addresses of symbols in the kernel and in other modules. Thus, **references are resolved once and for all when a module is linked.** The second task consists of keeping track of the use of modules, so that no module is unloaded while another module or another part of the kernel is using it. A simple reference count keeps track of each module’s usage. Is it correct that any shared library can be both dynamically linked (using LD_LIBRARY_PATH), and dynamically loaded (by dlopen(), dlsym() and dlclose())? Is a module a shared library to the Linux kernel? How does Linux kernel dynamically use a module? Is it by dynamic linking (using LD_LIBRARY_PATH), or dynamic loading (by dlopen(), dlsym() and dlclose())?
Asked by Tim (106430 rep)
Oct 17, 2018, 01:21 PM
Last activity: Oct 17, 2018, 01:34 PM