Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758789Ab1BSAOl (ORCPT ); Fri, 18 Feb 2011 19:14:41 -0500 Received: from gate.crashing.org ([63.228.1.57]:58191 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752138Ab1BSAOh (ORCPT ); Fri, 18 Feb 2011 19:14:37 -0500 Subject: Re: [PATCH 1/3] module: deal with alignment issues in built-in module versions From: Benjamin Herrenschmidt To: Linus Torvalds Cc: David Miller , dtor@vmware.com, linux-kernel@vger.kernel.org, geert@linux-m68k.org, rusty@rustcorp.com.au, linux-m68k@vger.kernel.org, linux-arch@vger.kernel.org In-Reply-To: References: <20110217.140119.39175251.davem@davemloft.net> <20110217221957.GA11244@dtor-ws.eng.vmware.com> <20110217.142320.102554706.davem@davemloft.net> Content-Type: text/plain; charset="UTF-8" Date: Fri, 18 Feb 2011 18:14:15 -0600 Message-ID: <1298074455.2460.85.camel@pasglop> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1324 Lines: 36 On Thu, 2011-02-17 at 15:08 -0800, Linus Torvalds wrote: > On Thu, Feb 17, 2011 at 2:48 PM, Linus Torvalds > wrote: > > > > Gaah, I didn't realize that we've never had to do anything like this > > before, and that the exception table is all arch-specific code. So we > > don't have any way to "output that damned pointer and stop whining > > about it" model at all. > > Actually, I don't think the problem is about ".word" vs ".xword". We > should be able to just use ".long" everywhere. > > But the symbol _name_ may have different prefixes, and when we use > "asm()" at the top level, we can't use the expressions to fix it up. > So a > > asm(".long %0":'i" (symbol)) > > doesn't work (ignore the lack of section naming, that's not > important), and neither can we just do something like > > #define output_asm_pointer(section, symbol) \ > asm(".long " #symbol) > > portably, because some linker formats want to see prepended underscores etc. Except that .long is 32-bit on ppc64 :-( You need .llong for 64-bit. Cheers, Ben. -- 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/