ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Migrating my module from Linux 2.4 to 2.6, I encountered a problem where my .ko size was ~40% larger than the .o in 2.4.
I read that 2.6 creates a .mod.c file and links it with the .o file to create a .ko, which increases the kernel module size.
However from reviewing my .mod file I don't think it should increase the size so much - only about 2-3%.
Does anyone know if such porting to Linux 2.6 should increase the size so much?
Are there any special compilation flags for optimization or size reduction that are new in 2.6, and might help me reduce the .ko size?
Yea 2.6 is bigger. Pretty easy to tell. Just simply compile a kernel with no options. And surprise, surpise.. kernel 2.6 is much bigger.
Almost twice the size in fact.
I believe I can sum up your situation in four simple words.
Bigger kernel, Bigger modules
I understand that the 2.6 kernel is much bigger, but why is a module so much bigger? what is different in the module from 2.4? (almost the same code)
Also, 40% bigger seems very unreasonable to me....
Is there an explanation for this?
yes, isn't more and more functionality being included in the kernel nowadays instead of being farmed out?
It seems (though i am no expert) that the kernel is tending to veer towards becoming monolithic.
It seems (though i am no expert) that the kernel is tending to veer towards becoming monolithic.
Well it was never a microkernel.
Why are modules bigger? Could have something to do with whats in /usr/src/linux of a 2.6 kernel vs a 2.4 kernel. Typically kernel source code is used in kernel objects right? Perhaps you could look into it yourself.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.