From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sam Ravnborg Subject: Re: [RFC -next] linux/linkage.h: fix symbol prefix handling Date: Wed, 13 Mar 2013 07:31:57 +0100 Message-ID: <20130313063157.GB19681@merkur.ravnborg.org> References: <1362656642-2693-1-git-send-email-james.hogan@imgtec.com> <87sj46wyf2.fsf@rustcorp.com.au> <5139AC39.90805@imgtec.com> <874ngiwije.fsf@rustcorp.com.au> <20130311230731.0c610d86569d09f6e23b8e61@canb.auug.org.au> <87ppz5usts.fsf@rustcorp.com.au> <20130312233300.9d86d47bb5369923ad520a21@canb.auug.org.au> <87ehfkuq27.fsf@rustcorp.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <87ehfkuq27.fsf@rustcorp.com.au> Sender: linux-kbuild-owner@vger.kernel.org To: Rusty Russell Cc: Stephen Rothwell , James Hogan , Al Viro , Michal Marek , Andrew Morton , Guenter Roeck , Jean Delvare , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Mike Frysinger , uclinux-dist-devel@blackfin.uclinux.org, linux-next@vger.kernel.org List-Id: linux-next.vger.kernel.org > actually, y'know, proof-read it. Hmm.. > + $(KERNELRELEASE) "$(patsubst y,_,$(CONFIG_HAVE_SYMBOL_PREFIX_UNDERSCORE))" > > +config HAVE_UNDERSCORE_SYMBOL_PREFIX HAVE_UNDERSCORE_... or HAVE_SYMBOL_... confusion. I prefer the HAVE_SYMBOL_... variant but no strong feelings.. > + * > + * If you think the above arrogance just encourages more people to add > + * random crap to this file, you're not alone. Kill this. > /* Some toolchains use a `_' prefix for all user symbols. */ > -#ifdef CONFIG_SYMBOL_PREFIX > -#define MODULE_SYMBOL_PREFIX CONFIG_SYMBOL_PREFIX > +#ifdef CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX > +#define __VMLINUX_SYMBOL(x) _##x > +#define __VMLINUX_SYMBOL_STR(x) "_" #x > +#define VMLINUX_SYMBOL_PREFIX_STR "_" > #else > -#define MODULE_SYMBOL_PREFIX "" > +#define __VMLINUX_SYMBOL(x) x > +#define __VMLINUX_SYMBOL_STR(x) #x > +#define VMLINUX_SYMBOL_PREFIX_STR "" > #endif We know the prefix is an underscore. No benefits from defining VMLINUX_SYMBOL_PREFIX_STR. The config name even syas so. Skipping the above give us only one way to check for the prefix - today we mix the two. Sam