Kernel Modules using one another even though not using any symbols
Linux - GeneralThis forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I am trying to load two modules in the kernel(v 2.6.9).
Module1 and Module2. Both have simple init and exit functions with a simple printk in both the functions.
Say I have inserted Module1 first.
#insmod Module1.ko
#insmod Module2.ko
Even though Module2 does not make a reference to (or call) any symbols in Module1, when I do lsmod it says Module2 using Module1. Also I can't unload Module1 while Module2 still inserted.
i.e. when I do
#rmmod Module1
I get "Module1 is in use by Module2"
Does insmod (or load_module function in kernel/module.c) optimize the text section of the modules? If yes, based on what criteria, kernel does this optimization?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.