Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7908339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T11:53:35+00:00 2026-06-03T11:53:35+00:00

I am writing simple Linux module mod.c. When I compile mod.c file, it creates

  • 0

I am writing simple Linux module mod.c.
When I compile mod.c file, it creates two output file mod.o and mod.ko.
So I just want to know,
What is the difference between mod.o and mod.ko file?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T11:53:36+00:00Added an answer on June 3, 2026 at 11:53 am

    The short answer is that the .ko file is your object file linked with some kernel automatically generated data structures that are needed by the kernel.

    The .o file is the object file of your module – the result of compiling your C file. The kernel build system then automatically creates another C file with some data structures describing the kernel module (named your_module_kmod.c), compile this C file into another object file and links your object file and the object file it built together to create the .ko file.

    The dynamic linker in the kernel that is in charge of loading kernel modules, expects to find the data structure the kernel put in the kmod object in the .ko file and will not be able to load your kernel module without them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing simple program to communicate between smart devices and I receive 11001 when
I'm writing simple filter in Android and want to use ExpandableListAdapter with check boxes.
I am working on writing a simple python application for linux (maemo). However I
I'm writing a simple dual timer in Python. (I'm running Linux, and this should
Is there a simple way to detect when a file for writing is closed?
I am writing a simple user-space ELF loader under Linux (why? for 'fun'). My
I am writing a simple console application in LInux/C++ that accepts user input from
I am writing a simple C++ application which might be installed on Linux or
I am writing a system monitor for Linux and want to include some watchdog
I'm writing a linux kernel module that provides a (virtual) block device (so no

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.