[PATCH v3] powerpc/64: Option to use ELFv2 ABI for big-endian kernels
Nicholas Piggin
npiggin at gmail.com
Tue May 4 20:27:06 AEST 2021
Excerpts from Michal Suchánek's message of May 4, 2021 12:38 am:
> On Mon, May 03, 2021 at 01:37:57PM +0200, Andreas Schwab wrote:
>> Should this add a tag to the module vermagic?
Good question.
>
> Would the modues link even if the vermagic was not changed?
>
> I suppose something like this might do it.
Yeah I don't know how robust the loader would be to a mismatch. We could
add this patch.
Thanks,
Nick
>
> Thanks
>
> Michal
>
> diff --git a/arch/powerpc/include/asm/vermagic.h b/arch/powerpc/include/asm/vermagic.h
> index b054a8576e5d..3fdaacd7a743 100644
> --- a/arch/powerpc/include/asm/vermagic.h
> +++ b/arch/powerpc/include/asm/vermagic.h
> @@ -14,7 +14,14 @@
> #define MODULE_ARCH_VERMAGIC_RELOCATABLE ""
> #endif
>
> +
> +#ifdef CONFIG_PPC64_BUILD_BIG_ENDIAN_ELF_V2_ABI
> +#define MODULE_ARCH_VERMAGIC_ELF_V2_ABI "abi-elfv2 "
> +#else
> +#define MODULE_ARCH_VERMAGIC_ELF_V2_ABI ""
> +#endif
> +
> #define MODULE_ARCH_VERMAGIC \
> - MODULE_ARCH_VERMAGIC_FTRACE MODULE_ARCH_VERMAGIC_RELOCATABLE
> + MODULE_ARCH_VERMAGIC_FTRACE MODULE_ARCH_VERMAGIC_RELOCATABLE MODULE_ARCH_VERMAGIC_ELF_V2_ABI
>
> #endif /* _ASM_VERMAGIC_H */
>
More information about the Linuxppc-dev
mailing list