Re: [PATCH] powerpc/64: BE option to use ELFv2 ABI for big endian kernels
On Sat, Mar 07, 2020 at 10:58:54AM +1000, Nicholas Piggin wrote: > Segher Boessenkool's on March 5, 2020 8:55 pm: > > That name looks perfect to me. You'll have to update REs expecting the > > arch at the end (like /le$/), but you had to already I think? > > le$ is still okay for testing ppc64le, unless you wanted me to add the > -elfv2 suffix on there as well? If that was the case, for consistency > we'd also have to add -elfv1 for the BE v1 case. I was just going to add > -elfv2 for the new variant. I was thinking that, yes, but your plan is better alright (there aren't many supported configs at all, anyway!) Segher
Re: [PATCH] powerpc/64: BE option to use ELFv2 ABI for big endian kernels
Segher Boessenkool's on March 5, 2020 8:55 pm: > On Thu, Mar 05, 2020 at 01:34:22PM +1000, Nicholas Piggin wrote: >> Segher Boessenkool's on March 4, 2020 9:09 am: >> >> +override flavour := linux-ppc64v2 >> > >> > That isn't a good name, heh. This isn't "v2" of anything... Spell out >> > the name "ELFv2"? Or as "elfv2"? It is just a name after all, it is >> > version 1 in all three version fields in the ELF headers! >> >> Yeah okay. This part is only for some weird little perl asm generator >> script, but probably better to be careful. linux-ppc64-elfv2 ? > > That generator is from openssl, or inspired by it, it is everywhere. > So it is more important to get it right than it would seem at first > glance ;-) > > That name looks perfect to me. You'll have to update REs expecting the > arch at the end (like /le$/), but you had to already I think? le$ is still okay for testing ppc64le, unless you wanted me to add the -elfv2 suffix on there as well? If that was the case, for consistency we'd also have to add -elfv1 for the BE v1 case. I was just going to add -elfv2 for the new variant. Thanks, Nick
Re: [PATCH] powerpc/64: BE option to use ELFv2 ABI for big endian kernels
On Thu, Mar 05, 2020 at 01:34:22PM +1000, Nicholas Piggin wrote: > Segher Boessenkool's on March 4, 2020 9:09 am: > >> +override flavour := linux-ppc64v2 > > > > That isn't a good name, heh. This isn't "v2" of anything... Spell out > > the name "ELFv2"? Or as "elfv2"? It is just a name after all, it is > > version 1 in all three version fields in the ELF headers! > > Yeah okay. This part is only for some weird little perl asm generator > script, but probably better to be careful. linux-ppc64-elfv2 ? That generator is from openssl, or inspired by it, it is everywhere. So it is more important to get it right than it would seem at first glance ;-) That name looks perfect to me. You'll have to update REs expecting the arch at the end (like /le$/), but you had to already I think? Segher
Re: [PATCH] powerpc/64: BE option to use ELFv2 ABI for big endian kernels
Segher Boessenkool's on March 4, 2020 9:09 am: > Hi! > > On Tue, Mar 03, 2020 at 11:45:27AM +1000, Nicholas Piggin wrote: >> Provide an option to use ELFv2 ABI for big endian builds. This works on >> GCC and clang (since 2014). it is is not officially supported by the GNU >> toolchain, but it can give some useful advantages of the ELFv2 ABI for >> BE (e.g., less stack usage). Some distros build BE ELFv2 userspace. > > It is not officially supported in the sense that a) as a host config, > it does not exist *at all* (this isn't relevant for the kernel, it does > not use a libc or other libraries, of course); and b) as a target config, > it is not supported in the sense that no one tests it, so we cannot say > anything about what quality code it generates, if it works at all, etc. Yep. > But we *do* allow "-mbig -mabi=elfv2", it's just a chicken-and-egg > problem to have this properly tested. If someone would regularly test > it (incl. sending the test results to gcc-testresults@), I don't see why > it would not become a supported platform. > >> +override flavour := linux-ppc64v2 > > That isn't a good name, heh. This isn't "v2" of anything... Spell out > the name "ELFv2"? Or as "elfv2"? It is just a name after all, it is > version 1 in all three version fields in the ELF headers! Yeah okay. This part is only for some weird little perl asm generator script, but probably better to be careful. linux-ppc64-elfv2 ? > > > Anyway, looks like it will work, let's see where this goes :-) > > Reviewed-by: Segher Boessenkool > > > Segher >
Re: [PATCH] powerpc/64: BE option to use ELFv2 ABI for big endian kernels
Hi! On Tue, Mar 03, 2020 at 11:45:27AM +1000, Nicholas Piggin wrote: > Provide an option to use ELFv2 ABI for big endian builds. This works on > GCC and clang (since 2014). it is is not officially supported by the GNU > toolchain, but it can give some useful advantages of the ELFv2 ABI for > BE (e.g., less stack usage). Some distros build BE ELFv2 userspace. It is not officially supported in the sense that a) as a host config, it does not exist *at all* (this isn't relevant for the kernel, it does not use a libc or other libraries, of course); and b) as a target config, it is not supported in the sense that no one tests it, so we cannot say anything about what quality code it generates, if it works at all, etc. But we *do* allow "-mbig -mabi=elfv2", it's just a chicken-and-egg problem to have this properly tested. If someone would regularly test it (incl. sending the test results to gcc-testresults@), I don't see why it would not become a supported platform. > +override flavour := linux-ppc64v2 That isn't a good name, heh. This isn't "v2" of anything... Spell out the name "ELFv2"? Or as "elfv2"? It is just a name after all, it is version 1 in all three version fields in the ELF headers! Anyway, looks like it will work, let's see where this goes :-) Reviewed-by: Segher Boessenkool Segher