On Wednesday 05 September 2007 21:34, Oleg Verych wrote: > > > > Build system: section garbage collection for vmlinux > > > > > > Maybe this is just a test suit to get finish with `make XYZ static`? > > > > They are vaguely connected in a sense that unused function which is > > not marked static doesn't generate gcc warning, but will be discarded > > by --gc-sections. "make XYZ static" also tends to find them - you make > > function static, you recompile the file, and gcc informs you that > > the function is not used at all! > > > > This happened to me when I did aic7xxx patches. > > > > You may yse --print-gc-sections to see the list of discarded sections. > > Anyway, this is gccism/binutilizm. That about other possible/future > options? > > Give me example, please, why function must be non static if not used.
Where do you see I'm saying that they must be non-static? I'm all for marking functions static. I just did it for aic7xxx. > If usage requires kconfig tuning, then this is a better way to go, We already do it, but we don't have enough developers to audit every driver for every possible combination of config options. As a result, there always be some amount of unused functions and data. Using --gc-sections will discard that. > than to adopt yet another GNU/Luxury. Actually, this is how linkers should have worked long ago. Borland's Turbo Pascal was doing it ten+ years ago. I don't understand why you are opposed to toolchain helping humans to get optimized result. But it's fine with me. I won't force anyone to select CONFIG_DISCARD_UNUSED_SECTIONS. -- vda - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/