From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755303AbbCENrh (ORCPT ); Thu, 5 Mar 2015 08:47:37 -0500 Received: from service87.mimecast.com ([91.220.42.44]:45185 "EHLO service87.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750937AbbCENrg convert rfc822-to-8bit (ORCPT ); Thu, 5 Mar 2015 08:47:36 -0500 Date: Thu, 5 Mar 2015 13:47:33 +0000 From: Dave Martin To: Lino Sanfilippo Cc: LinoSanfilippo@gmx.de, linux@arm.linux.org.uk, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [RFC PATCH 0/1] Wrong structure alignment due to compiler attribute "section" Message-ID: <20150305134733.GE3612@e103592.cambridge.arm.com> References: <1425290502-2322-1-git-send-email-lsanfil@marvell.com> <20150303144130.GB5177@e103592.cambridge.arm.com> <54F6EF32.7080306@marvell.com> <20150304143527.GA5653@e103592.cambridge.arm.com> <54F732DA.2050004@marvell.com> <20150305122606.GC3612@e103592.cambridge.arm.com> <54F8582B.80703@marvell.com> MIME-Version: 1.0 In-Reply-To: <54F8582B.80703@marvell.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-OriginalArrivalTime: 05 Mar 2015 13:47:33.0929 (UTC) FILETIME=[EECC0990:01D0574A] X-MC-Unique: 115030513473400201 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: 8BIT Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 05, 2015 at 02:20:43PM +0100, Lino Sanfilippo wrote: > On 05.03.2015 13:26, Dave Martin wrote: > > >> > >>So this is indeed a compiler bug, right? > > > >It certainly looks like the compiler is causing the issue somehow. > > > >Whether this is a bug, a bug-like feature, a configuration issue, > >or a combination of these is not clear. > > > >If you know where to find the toolchain source, it might be worth > >taking a look. > > The toolchain can be found here: > http://www.plugcomputer.org/405/us/gplugd/tool-chain/arm-marvell-linux-gnueabi.tar.bz2 Source code? That just looks like binaries to me. > But since it turns out to be a compiler issue I dont know if its > worth to be investigated further. I think the best solution to avoid > that structure alignment problem is to simply use another toolchain. Maybe not. Could be worth revisiting if other people report the same problem -- a build-time check that > Dave, I thank you very much for your help and efforts to clarify > that this is actually not a bug in the kernel. No probs. I have wondered whether it's really valid to assume that the linker can paste sections from different objects into a valid array like this. There are other things that already work this way though -- such as the way .init_array/.fini_array are created when building a shared library. Cheers ---Dave