Re: [PATCH v3] powerpc/64: Option to use ELFv2 ABI for big-endian kernels

2021-05-14 Thread Michal Suchánek
On Wed, May 05, 2021 at 10:07:29PM +1000, Michael Ellerman wrote: > Michal Suchánek writes: > > On Mon, May 03, 2021 at 01:37:57PM +0200, Andreas Schwab wrote: > >> Should this add a tag to the module vermagic? > > > > Would the modues link even if the vermagic was not changed? > > Most modules

Re: [PATCH v3] powerpc/64: Option to use ELFv2 ABI for big-endian kernels

2021-05-05 Thread Michal Suchánek
On Wed, May 05, 2021 at 05:23:37PM +0200, Michal Suchánek wrote: > Hello, > > looks like the ABI flags are not correctly applied when cross-compiling. > > While building natively success of BTFIDS depends on the kernel ABI but > when cross-compiling success of BTFIDS depends on the default

Re: [PATCH v3] powerpc/64: Option to use ELFv2 ABI for big-endian kernels

2021-05-05 Thread Michal Suchánek
Hello, looks like the ABI flags are not correctly applied when cross-compiling. While building natively success of BTFIDS depends on the kernel ABI but when cross-compiling success of BTFIDS depends on the default toolchain ABI. It's problem independent of this patch - the problem exists both

Re: [PATCH v3] powerpc/64: Option to use ELFv2 ABI for big-endian kernels

2021-05-05 Thread Michal Suchánek
On Wed, May 05, 2021 at 10:07:29PM +1000, Michael Ellerman wrote: > Michal Suchánek writes: > > On Mon, May 03, 2021 at 01:37:57PM +0200, Andreas Schwab wrote: > >> Should this add a tag to the module vermagic? > > > > Would the modues link even if the vermagic was not changed? > > Most modules

Re: [PATCH v3] powerpc/64: Option to use ELFv2 ABI for big-endian kernels

2021-05-05 Thread Michael Ellerman
Michal Suchánek writes: > On Mon, May 03, 2021 at 01:37:57PM +0200, Andreas Schwab wrote: >> Should this add a tag to the module vermagic? > > Would the modues link even if the vermagic was not changed? Most modules will require some symbols from the kernel, and those will be dot symbols, which

Re: [PATCH v3] powerpc/64: Option to use ELFv2 ABI for big-endian kernels

2021-05-04 Thread Nicholas Piggin
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

Re: [PATCH v3] powerpc/64: Option to use ELFv2 ABI for big-endian kernels

2021-05-03 Thread Michal Suchánek
On Mon, May 03, 2021 at 01:37:57PM +0200, Andreas Schwab wrote: > Should this add a tag to the module vermagic? Would the modues link even if the vermagic was not changed? I suppose something like this might do it. Thanks Michal diff --git a/arch/powerpc/include/asm/vermagic.h

Re: [PATCH v3] powerpc/64: Option to use ELFv2 ABI for big-endian kernels

2021-05-03 Thread Andreas Schwab
Should this add a tag to the module vermagic? Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."

[PATCH v3] powerpc/64: Option to use ELFv2 ABI for big-endian kernels

2021-05-03 Thread Nicholas Piggin
Provide an option to build big-endian kernels using the ELFv2 ABI. This works on GCC only so far, although it is rumored to work with clang that's not been tested yet. This can give big-endian kernels some useful advantages of the ELFv2 ABI (e.g., less stack usage, -mprofile-kernel, better