简体   繁体   中英

How to compile a .o file to a Linux kernel module (.ko) file?

  1. I write some code. Such as a test.c . I plan to compile it to a test.o file, and supply a head file.
  2. Then, I supply this .o file to another programmer, he is writing a Linux kernel module, eg a driver.ko .

My question is: can he include my .o file in his .ko? How to write the make file? Is there any special requirement when I compile my .o file? Thank you very much.

This link show how to create kernel module with source code spanning in multiple files. http://linux.die.net/lkmpg/x351.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM