Loading ...
Sorry, an error occurred while loading the content.
 

Steps to load a .ko module into kernel memory

Expand Messages
  • Prakash K.B.
    Hello. Can someone kindly clarify if my understanding of the module loading process is reasonably/mildly correct. 1. The .ko module is basically an ELF file 2.
    Message 1 of 1 , Oct 14, 2008
      Hello.

      Can someone kindly clarify if my understanding of the module loading
      process is reasonably/mildly correct.

      1. The .ko module is basically an ELF file

      2. insmod results in a temporary staging area carved out of kernel
      heap to copy the .ko from the user space file system.

      3. The loader/sys_init_module/?? parses the section headers, audits
      them for correctness such as architecture, compatible kernel etc,
      identifies section types (data/bss/text/ro/init/exit etc)and their
      memory requirements.

      4. The loader then moves the text area from ELF text section to the
      kernel text area and repeats this for all section types (ELF:data to
      kernel:data, ELF:bss to kernel:bss etc)

      5. Symbols are next resolved and the ksymtab is updated.

      6. The module_init functionality is then invoked.

      Best regards,
      Prakash
    Your message has been successfully submitted and would be delivered to recipients shortly.