Arjan van de Ven writes:
> Have you actually tested that the kernel image got smaller? I have tried
> some of this with the /net code, and it didn't make any difference at all,
> because the compiler/linker removed the unused function automatically.
> (Maybe this is because the /net code is linked into an .a file).
It's because the /net Makefiles go to some trouble to only include the objects
that you need, based on your CONFIG_ choices. It won't eliminate functions
like /proc support stuff when compiled without CONFIG_PROC_FS though. I think
the best way to do that is to let the compiler handle it automatically via
-ffunction-sections, rather than scattering more #ifdefs all over the place.
This requires some mods to all the vmlinux.lds files though, since gcc's
function-section naming scheme clashes with Linux's __init section names.
Still, I think it's worthwhile (since I'm doing embedded system stuff) and
would be interested in other people's comments.
Regards,
Graham
-- Graham Stoney Principal Hardware/Software Engineer Canon Information Systems Research Australia Ph: +61 2 9805 2909 Fax: +61 2 9805 2929- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Fri Apr 07 2000 - 21:00:11 EST