Re: [PATCH] fixes for kernel with no procfs.

From: Graham Stoney (greyham@research.canon.com.au)
Date: Tue Apr 04 2000 - 18:54:01 EST


I wrote:
# 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.

Arjan van de Ven writes:
> Actually, it does. I have seen it happen. Either the compiler or the linker
> (when making the .a file) removes unused functions in the networking code.
> I don't know if the codesize difference is also 0 when not using an ".a"
> file, but for the parts of the kernel that still use .a files, the #ifdef's
> are not needed.

What you've seen is the Makefiles and/or linker removing entire .o files which
weren't referenced. The current compiler settings won't remove unused
functions from .o's which contain other functions that are used. The /proc
support functions scattered in objects that are needed for other reasons is
one example: they are there even if CONFIG_PROC_FS is turned off.

Regards,
Graham

-
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:13 EST