diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2022-11-28 07:15:39 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-12-02 09:54:07 +0300 |
commit | 5017b45946722bdd20ac255c9ae7273b78d1f12e (patch) | |
tree | dc757f1286ffb73a54354b3ca5007edcc5c48285 /arch/powerpc/platforms/Kconfig.cputype | |
parent | 505ea33089dcfc3ee3201b0fcb94751165805413 (diff) | |
download | linux-5017b45946722bdd20ac255c9ae7273b78d1f12e.tar.xz |
powerpc/64: Option to build big-endian with ELFv2 ABI
Provide an option to build big-endian kernels using the ELFv2 ABI. This
works on GCC only for now. Clang is rumored to support this, but core
build files need updating first, at least.
This gives big-endian kernels useful advantages of the ELFv2 ABI, e.g.,
less stack usage, -mprofile-kernel support, better compatibility with
eBPF tools.
BE+ELFv2 is not officially supported by the GNU toolchain, but it works
fine in testing and has been used by some userspace for some time (e.g.,
Void Linux).
Tested-by: Michal Suchánek <msuchanek@suse.de>
Reviewed-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20221128041539.1742489-5-npiggin@gmail.com
Diffstat (limited to 'arch/powerpc/platforms/Kconfig.cputype')
-rw-r--r-- | arch/powerpc/platforms/Kconfig.cputype | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index 7bac213b4125..9563336e3348 100644 --- a/arch/powerpc/platforms/Kconfig.cputype +++ b/arch/powerpc/platforms/Kconfig.cputype @@ -580,10 +580,10 @@ config CPU_LITTLE_ENDIAN endchoice config PPC64_ELF_ABI_V1 - def_bool PPC64 && CPU_BIG_ENDIAN + def_bool PPC64 && (CPU_BIG_ENDIAN && !PPC64_BIG_ENDIAN_ELF_ABI_V2) config PPC64_ELF_ABI_V2 - def_bool PPC64 && CPU_LITTLE_ENDIAN + def_bool PPC64 && !PPC64_ELF_ABI_V1 config PPC64_BOOT_WRAPPER def_bool n |