module is part of kernel not as ld-able module, where is it

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
Post Reply
ggodw000
Member
Member
Posts: 396
Joined: Wed Nov 18, 2015 3:04 pm
Location: San Jose San Francisco Bay Area
Contact:

module is part of kernel not as ld-able module, where is it

Post by ggodw000 »

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
klange
Member
Member
Posts: 679
Joined: Wed Mar 30, 2011 12:31 am
Libera.chat IRC: klange
Discord: klange

Re: module is part of kernel not as ld-able module, where is

Post by klange »

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.
User avatar
iansjack
Member
Member
Posts: 4703
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: module is part of kernel not as ld-able module, where is

Post by iansjack »

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.
linguofreak
Member
Member
Posts: 510
Joined: Wed Mar 09, 2011 3:55 am

Re: module is part of kernel not as ld-able module, where is

Post by linguofreak »

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.
Post Reply