Reputation: 21
I am building two linux kernel modules.
The second module (called debugging
module hereafter) basically uses jprobe
to intercept calling of functions inside the first module (called main
module) and prints some states for debugging. They work pretty well. But I got one question on dependency for the debugging
module on the main
module.
Apparently, the debugging
module depends on the main
module, as when loading the debugging
module without the main
module loaded, I got error
"Unknown symbol in module, or unknown parameter"
However, it looks like that modules.dep could not figure it out. By looking at
nm -u <debugging_module.ko>
I did not find any unresolved symbol related to the main
module. But jprobe
needs function name from main
module to intercept, and that is as string assigned for .kp.symbol_name
in jprobe
structure.
How can we specify dependency in this situation?
Upvotes: 2
Views: 201