On Wednesday 05 September 2007 14:49, Denys Vlasenko wrote: > On Wednesday 05 September 2007 14:47, Denys Vlasenko wrote: > > On Wednesday 05 September 2007 14:43, Denys Vlasenko wrote: > > > These patches fix section names and add > > > CONFIG_DISCARD_UNUSED_SECTIONS. It is not enabled > > > unconditionally because only newest binutils have > > > ld --gc-sections which is stable enough for kernel use. > > > IOW: this is an experimental feature for now. > > > > Part 1: fix section names over entire source (all arches). > > Part 2: fix x86_64 vdso linker script to not produce > broken vdso image with gcc -ffunction-sections -fdata-sections. Part 3: Makefile: init/Kconfig: add config DISCARD_UNUSED_SECTIONS with appropriate big scary warning. It enables gcc and ld options for section garbage collection. arch/x86_64/kernel/vmlinux.lds.S: include/asm-generic/vmlinux.lds.h: add KEEP and SORT_BY_ALIGNMENT directives, as needed. arch/frv/Makefile: had half-baked option similar to DISCARD_UNUSED_SECTIONS, replace it. DISCARD_UNUSED_SECTIONS=n should be safe for all arches. DISCARD_UNUSED_SECTIONS=y is usable only for x86_64 at the moment. -- vda