Re: .o and .ko file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Oops. Forgot to do a 'reply all'.. :-(


> what is difference between two files..
> why two object files are created and

"Before Linux 2.6, a user space program would interpret the ELF object
(.o) file and do all the work of linking it to the running kernel,
generating a finished binary image. The program would pass that image
to the kernel and the kernel would do little more than stick it in
memory. In Linux 2.6, the kernel does the linking. A user space
program passes the contents of the ELF object file directly to the
kernel. For this to work, the ELF object image must contain additional
information. To identify this particular kind of ELF object file, we
name the file with suffix ".ko" ("kernel object") instead of ".o" For
example, the serial device driver that in Linux 2.4 lived in the file
serial.o in Linux 2.6 lives in the file serial.ko."

>
> u may provide me some good link too ...

The paragraph above is taken from :
The Linux Kernel Module Programming Guide (available at TLDP), for 2.6 kernel.
(http://www.tldp.org/LDP/lkmpg/2.6/html/index.html)

Also of interest, would be:
Linux Loadable Kernel Module HOWTO (again from TLDP)
(http://www.tldp.org/LDP/lkmpg/2.6/html/index.html)

You may also try <kerneldir>/Documentation/kbuild/modules.txt

HTH.
>
>
>
> --
> Thanks & Regards
> Nidhi
>



--
With regards,

Jagadeesh Bhaskar P
--------------------
Bugs are by far the largest and most successful class of entity, with nearly a million known species. In this respect they outnumber all the other known creatures about four to one.
—Professor Snopes' Encyclopedia of Animal Life
-------

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux