OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Oct 22, 2019 12:59 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: module is part of kernel not as ld-able module, where is it
PostPosted: Wed Oct 02, 2019 6:14 pm 
Offline
Member
Member

Joined: Wed Nov 18, 2015 3:04 pm
Posts: 352
Location: San Jose San Francisco Bay Area
i have a new kernel version where when I was using its previous version, I had load the module driver using modprobe <module_name> as well as used with other associated commands i.e. modinfo <modulename>.

Now newer version of kernel has no longer ship the <module_name> module as a loadable module and instead they made it the part of the kernel. Now with this new kernel version, I see modprobe does not work apparently as it complains that it does not exist in /lib/modules/<kernel_ver>/.

Now the question is that if it remains as part of the kernel, where does to module reside? Thanks.,

_________________
key takeaway after spending yrs on sw industry: big issue small because everyone jumps on it and fixes it. small issue is big since everyone ignores and it causes catastrophy later. #devilisinthedetails


Top
 Profile  
 
 Post subject: Re: module is part of kernel not as ld-able module, where is
PostPosted: Wed Oct 02, 2019 6:42 pm 
Offline
Member
Member

Joined: Wed Mar 30, 2011 12:31 am
Posts: 315
I'm going to assume you're talking about Linux. You never actually said anywhere in your post that you were, but it seems like a logical inference.

Linux kernel modules are object files, effectively the same as any .o file your compiler would normally produce and later link together to form an executable.

When a kernel module is compiled into the kernel, it's linked into the kernel binary like any other object file. When it's compiled as a loadable module, the kernel links it at run time.

Where does it end up in the former case? Who knows! It's up to the linker.

_________________
toaruos on github | toaruos.org | gitlab | twitter


Top
 Profile  
 
 Post subject: Re: module is part of kernel not as ld-able module, where is
PostPosted: Thu Oct 03, 2019 1:15 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 3520
Location: Chichester, UK
The module doesn't reside anywhere - it doesn't exist.

The code that performs the function that the module performed resides in the kernel executable - normally vmlinuz, although it may have different names on different systems.


Top
 Profile  
 
 Post subject: Re: module is part of kernel not as ld-able module, where is
PostPosted: Fri Oct 04, 2019 1:07 am 
Offline
Member
Member

Joined: Wed Mar 09, 2011 3:55 am
Posts: 327
ggodw000 wrote:
i have a new kernel version where when I was using its previous version, I had load the module driver using modprobe <module_name> as well as used with other associated commands i.e. modinfo <modulename>.

Now newer version of kernel has no longer ship the <module_name> module as a loadable module and instead they made it the part of the kernel. Now with this new kernel version, I see modprobe does not work apparently as it complains that it does not exist in /lib/modules/<kernel_ver>/.

Now the question is that if it remains as part of the kernel, where does to module reside? Thanks.,


A kernel module is a piece of kernel functionality that has been compiled so as to be in a separate file from the kernel itself. If the code in question has been compiled into the kernel, it is, by definition, not a module, and resides in the kernel executable with all the rest of the non-module code.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group