Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 16 Oct 2002 12:38:09 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 16 Oct 2002 12:38:09 -0400 Received: from chaos.physics.uiowa.edu ([128.255.34.189]:5539 "EHLO chaos.physics.uiowa.edu") by vger.kernel.org with ESMTP id ; Wed, 16 Oct 2002 12:38:07 -0400 Date: Wed, 16 Oct 2002 11:43:57 -0500 (CDT) From: Kai Germaschewski X-X-Sender: kai@chaos.physics.uiowa.edu To: Matthew Wilcox cc: Linus Torvalds , , Russell King Subject: Re: [PATCH] Allow compilation with -ffunction-sections In-Reply-To: <20021016145113.E15163@parcelfarce.linux.theplanet.co.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1213 Lines: 28 On Wed, 16 Oct 2002, Matthew Wilcox wrote: > If you compile the kernel with -ffunction-sections, each function gets > put in a section .text.function_name. This collides with our current use > of .text.init. So here's a patch which converts x86 to use .init.text > instead. > > I've tested it on x86 and it still frees 120k of ram, so it seems to work. > Other architectures will need to change their vmlinux.lds appropriately, > and may need other changes (arm, m68k seem to use .text.init verbatim). Just in case anybody feels bored, maybe someone wants to come up with a include/asm-generic/vmlinux.lds.S (or a better name) which has the common part of all the arch's vmlinux.lds.S - so we could make such changes like you're proposing at one place in the future. Since all vmlinux.lds.S get preprocessed by the C preprocessor, putting an "#include " in there should be easy enough instead of all the current duplication. --Kai - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/