Re: [RFC -next] linux/linkage.h: fix symbol prefix handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux