Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757313Ab1BQRce (ORCPT ); Thu, 17 Feb 2011 12:32:34 -0500 Received: from [65.115.85.73] ([65.115.85.73]:50279 "EHLO smtp-outbound-2.vmware.com" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751599Ab1BQRcc (ORCPT ); Thu, 17 Feb 2011 12:32:32 -0500 Date: Thu, 17 Feb 2011 09:31:36 -0800 From: Dmitry Torokhov To: Linus Torvalds Cc: LKML , David Miller , Geert Uytterhoeven , Rusty Russell , Linux/m68k , Linux-Arch Subject: Re: [PATCH 1/3] module: deal with alignment issues in built-in module versions Message-ID: <20110217173136.GA28486@dtor-ws.eng.vmware.com> References: <1297123347-2170-1-git-send-email-dtor@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1054 Lines: 28 On Thu, Feb 17, 2011 at 09:24:58AM -0800, Linus Torvalds wrote: > On Mon, Feb 7, 2011 at 4:02 PM, Dmitry Torokhov wrote: > > > > Moreover, as DaveM said, we can't reliably put structures into > > independent objects, put them into a special section, and then expect > > array access over them (via the section boundaries) after linking the > > objects together to just "work" due to variable alignment choices in > > different situations. > > Why not? > > That's what we normally do. Just align the "__modver", and you should > be all good. What's the problem? >From what I understand __attribute__ ((aligned(x))) only guarantees minimum alignment, not exact (gapless) alignment. GCC seems to lay out pointers in the section without gaps on all arches that we have. Thanks. -- Dmitry -- 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/