Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756614AbZAUOCF (ORCPT ); Wed, 21 Jan 2009 09:02:05 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753443AbZAUOBx (ORCPT ); Wed, 21 Jan 2009 09:01:53 -0500 Received: from smtp.ultrahosting.com ([74.213.174.254]:49693 "EHLO smtp.ultrahosting.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753285AbZAUOBw (ORCPT ); Wed, 21 Jan 2009 09:01:52 -0500 X-Greylist: delayed 494 seconds by postgrey-1.27 at vger.kernel.org; Wed, 21 Jan 2009 09:01:52 EST Date: Wed, 21 Jan 2009 08:50:25 -0500 (EST) From: Christoph Lameter X-X-Sender: cl@qirst.com To: Richard Henderson cc: Rusty Russell , Ingo Molnar , akpm@linux-foundation.org, torvalds@linux-foundation.org, andi@firstfloor.org, ak@linux.intel.com, sfr@canb.auug.org.au, travis@sgi.com, linux-kernel@vger.kernel.org Subject: Re: [patch 2/8] compiler-gcc.h: add more comments to RELOC_HIDE In-Reply-To: <4974AAA9.2000406@twiddle.net> Message-ID: References: <200901100040.n0A0eruc013680@imap1.linux-foundation.org> <20090110122945.GA28033@elte.hu> <200901151227.27935.rusty@rustcorp.com.au> <496FC375.90408@twiddle.net> <4974AAA9.2000406@twiddle.net> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1155 Lines: 29 On Mon, 19 Jan 2009, Richard Henderson wrote: > > We are talking about > > > > (long)&foo + long_variable > > > > Are you saying that the compiler will be ignoring the high bits in > > variable because of the size of foo? > > No, I'm saying that all those high bits will be passed along and won't > fit in the 16-bit relocation that'll come out of the assembler, leading > to a hard linker error. Why would a 16 bit relocation be generated if the compiler knows that a 32 bit/64 bit entity is added to the address of a variable? > > It looks like its useless and more an indication of either a broken > > compiler or wrong assumptions about the compiler. Removing RELOC_HIDE > > should allow the compiler to freely optimize the per cpu address > > calculations. > > Something I'm pretty sure we don't want the compiler to be able to do. Other compilers (like icc) seem to have no problem with it. Why not? -- 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/