To see all the sections in the object file for the msdos LKM:
objdump msdos.o --section-headers |
objdump msdos.o --full-contents --section=.modinfo |
You can use the modinfo program to interpret the contents of the .modinfo section.
It describes the form of the LKM's parameters. insmod uses this information to format the parameters you supply on the insmod command line into data structure initial values, which insmod inserts into the LKM as it loads it.
See Section 10.1 for more mind-numbing details of symbol binding.
__insmod_name_Ssectionname_Llength
name is the LKM name (as you would see in /proc/modules.
sectionname is the section name, e.g. .text (don't forget the leading period).
length is the length of the section, in decimal.
The value of the symbol is, of course, the address of the section.
__insmod_name_Ofilespec_Mmtime_Vversion
The code to handle LKMs is in the source files kernel/module.c in the Linux source tree.
The kernel module loader (see Section 5.3) lives in kernel/kmod.c.
(Ok, that wasn't much of a start, but at least I have a framework here for adding this information in the future).
Закладки на сайте Проследить за страницей |
Created 1996-2025 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |