From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Mike Frysinger" Subject: Re: [PATCH 5/23] make section names compatible with -ffunction-sections -fdata-sections: blackfin Date: Tue, 1 Jul 2008 22:09:20 -0400 Message-ID: <8bd0f97a0807011909i53a347f5me4410a24dd27d5ab@mail.gmail.com> References: <200807020235.08025.vda.linux@googlemail.com> <8bd0f97a0807011558u2c02f6fcre2f3af3d5cced936@mail.gmail.com> <200807020208.33302.vda.linux@googlemail.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=x3N+7n7slCQ7lxyRo6A/+73Btv8L/LZ3ILW9jvnoqWk=; b=jjQxZqP55f8bioR+K2FvNk7GC6EXDWoZhVCqJCp3/1/Mog3y/AuGrxsHlPfAkF2PC+ 8ih9f1TpKfY4Gq0TheGOXn9mXgdolPD3nE5csBoVDcpAjiHZAxVXpzW4m7VaiMRIKohT M1yoJjhyaQIsavWkw7bO0fe9loEGRUOU4H0eU= In-Reply-To: <200807020208.33302.vda.linux@googlemail.com> Content-Disposition: inline Sender: linux-embedded-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" To: Denys Vlasenko Cc: linux-arch@vger.kernel.org, Russell King , David Howells , Ralf Baechle , Lennert Buytenhek , Josh Boyer , Paul Mackerras , David Woodhouse , Andi Kleen , torvalds@linux-foundation.org, akpm@linux-foundation.org, Paul Gortmaker , linux-embedded@vger.kernel.org, linux-kernel@vger.kernel.org, Tim Bird , Martin Schwidefsky , Dave Miller On Tue, Jul 1, 2008 at 8:08 PM, Denys Vlasenko wrote: > On Wednesday 02 July 2008 00:58, Mike Frysinger wrote: >> On Tue, Jul 1, 2008 at 8:35 PM, Denys Vlasenko wrote: >> > The purpose of this patch is to make kernel buildable >> > with "gcc -ffunction-sections -fdata-sections". >> > This patch fixes blackfin architecture. >> >> the comment right above what you changed says it already works for >> Blackfin. so you arent fixing it at all. >> > /* This gets done first, so the glob doesn't suck it in */ >> > . = ALIGN(32); >> > - *(.data.cacheline_aligned) >> > + *(.cacheline_aligned.data) > > This may pull in an unrelated data object named "cacheline_aligned" > (say, a static variable in a driver). If that variable is not > itself aligned to the cacheline size, it will mess up alignment of all > objects in .data.cacheline_aligned which follow. Not good. > > To be safe from such weird and hard to debug problems > it's better to not use names like .data.XXXX at all. > I just uniformly renamed al such "special sections" > in the kernel to .XXXXX.data you're right of course ... i obviously hadnt thought of this. please however still abstract this stuff into the common header. i just tested the current Blackfin kernel and it does build/link/run fine with -ffunction-sections/-fdata-sections. however, --gc-sections still causes crashes (but this is because all of the .init.setup sections are flagged as unused). -mike