Module needs to lookup its own symbols at runtime.
I have a kernel loadable module that needs to be able to lookup its own symbols at runtime. I.e., given a string that represents the name of the symbol, the module needs to find the address. Preferably, this should work for symbols that are not marked 'EXPORT_SYMBOL' as well as those that are. I used to be able to do this by calling parse_symbol() that's part of kdb, but now my module is required to run without depending on kdb. Is there an API that provides this functionality? Otherwise, any hints about how to proceed would be helpful.
user space tool to look up symbol name is very easier than kernel module, just grep in /proc/kallsyms will be sufficient On Tue, Apr 16, 2013 at 11:26 PM, Neil Baylis <neil.baylis@gmail.com> wrote:
I have a kernel loadable module that needs to be able to lookup its own symbols at runtime. I.e., given a string that represents the name of the symbol, the module needs to find the address. Preferably, this should work for symbols that are not marked 'EXPORT_SYMBOL' as well as those that are. I used to be able to do this by calling parse_symbol() that's part of kdb, but now my module is required to run without depending on kdb.
Is there an API that provides this functionality? Otherwise, any hints about how to proceed would be helpful.
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
participants (2)
-
devendra.aaru -
Neil Baylis