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

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

 



Hi Nick,

sorry for the late feedback.

Dne 15.10.2016 v 14:43 Nicholas Piggin napsal(a):
> +# .S file exports must have their C prototypes defined in asm/asm-prototypes.h
> +# or a file that it includes, in order to get versioned symbols. We build a
> +# dummy C file that includes asm-prototypes and the EXPORT_SYMBOL lines from
> +# the .S file (with trailing ';'), and run genksyms on that, to extract vers.
> +#
> +# 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) -D__GENKSYMS__ $(c_flags) -xc - |                                \
> +    $(GENKSYMS) $(if $(1), -T $(2))                                         \
> +     $(patsubst y,-s _,$(CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX))             \
> +     $(if $(KBUILD_PRESERVE),-p)                                            \
> +     -r $(firstword $(wildcard $(2:.symtypes=.symref) /dev/null))

I think it would be cleaner to add the #include to the .S files
themselves and grep for both EXPORT_SYMBOL and #include here. The reason
is that some files might need additional #includes to allow genksyms to
properly expand some function prototypes.

Michal
--
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