October 2017
Intermediate to advanced
354 pages
9h 28m
English
Modules are built using kbuild makefiles; once the build process completes, an ELF binary file with a .ko (kernel object) extension is generated. Module ELF binaries are appropriately tweaked to add new sections, to differentiate them from other ELF binaries, and to store module-related metadata. The following are the sections in a kernel module:
| .gnu.linkonce.this_module | Module structure |
| .modinfo | Information about the module (Licenses and so on) |
| __versions | Expected versions of symbols that the module depends on during compile time |
| __ksymtab* | The table of symbols exported by this module |
| __kcrctab* | The table of versions of symbols exported by this module |
| .init | Sections used when initializing |
| .text, .data ... |