Re: [PATCH 2/2] kbuild: modversions for exported asm symbols

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

 



On 2016-10-31 12:14, Nicholas Piggin wrote:
> +# This is convoluted. The .S file must first be preprocessed to run guards and
> +# expand names, then the resulting exports must be constructed into plain
> +# EXPORT_SYMBOL(symbol); to build our dummy C file, and that gets preprocessed
> +# to make the genksyms input.
>  #
>  # These mirror gensymtypes_c and co above, keep them in synch.
>  cmd_gensymtypes_S =                                                         \
>      (echo "\#include <linux/kernel.h>" ;                                    \
>       echo "\#include <asm/asm-prototypes.h>" ;                              \
> -     grep EXPORT_SYMBOL $< | sed 's/$$/;/' ) |                              \
> +    $(CPP) $(a_flags) $< |                                                  \
> +     grep ^___EXPORT_SYMBOL |                                               \
> +     sed 's/___EXPORT_SYMBOL \([a-zA-Z0-9_]*\),.*/EXPORT_SYMBOL(\1);/' ) |  \

Is this sed pass necessary? Just add -D__GENKSYMS__ also to the first
cpp run and EXPORT_SYMBOL will stay intact.

Anyway, I'm going to merge your patch 2/2 now.

Michal

>      $(CPP) -D__GENKSYMS__ $(c_flags) -xc - |                                \
>      $(GENKSYMS) $(if $(1), -T $(2))                                         \
>       $(patsubst y,-s _,$(CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX))             \
> 

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



[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux