[PATCH] arm64: lds: use PROVIDE instead of conditional definitions

Will Deacon will at kernel.org
Wed Jun 29 02:33:50 PDT 2022


On Wed, 29 Jun 2022 10:32:46 +0200, Ard Biesheuvel wrote:
> Currently, a build with CONFIG_EFI=n and CONFIG_KASAN=y will not
> complete successfully because of missing symbols. This is due to the
> fact that the __pi_ prefixed aliases for __memcpy/__memmove were put
> inside a #ifdef CONFIG_EFI block inadvertently, and are therefore
> missing from the build in question.
> 
> These definitions should only be provided when needed, as they will
> otherwise clutter up the symbol table, kallsyms etc for no reason.
> Fortunately, instead of using CPP conditionals, we can achieve the same
> result by using the linker's PROVIDE() directive, which only defines a
> symbol if it is required to complete the link. So let's use that for all
> symbols alias definitions.
> 
> [...]

Applied to arm64 (for-next/boot), thanks!

[1/1] arm64: lds: use PROVIDE instead of conditional definitions
      https://git.kernel.org/arm64/c/fbf6ad5efe95

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev



More information about the linux-arm-kernel mailing list