linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Piggin <npiggin@gmail.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v2] powerpc/64: BE option to use ELFv2 ABI for big endian kernels
Date: Wed, 29 Apr 2020 10:57:16 +1000	[thread overview]
Message-ID: <1588121596.7zej1imag0.astroid@bobo.none> (raw)
In-Reply-To: <20200428234046.GP17645@gate.crashing.org>

Excerpts from Segher Boessenkool's message of April 29, 2020 9:40 am:
> Hi!
> 
> On Tue, Apr 28, 2020 at 09:25:17PM +1000, Nicholas Piggin wrote:
>> +config BUILD_BIG_ENDIAN_ELF_V2
>> +	bool "Build big-endian kernel using ELFv2 ABI (EXPERIMENTAL)"
>> +	depends on PPC64 && CPU_BIG_ENDIAN && EXPERT
>> +	default n
>> +	select BUILD_ELF_V2
>> +	help
>> +	  This builds the kernel image using the ELFv2 ABI, which has a
>> +	  reduced stack overhead and faster function calls. This does not
>> +	  affect the userspace ABIs.
>> +
>> +	  ELFv2 is the standard ABI for little-endian, but for big-endian
>> +	  this is an experimental option that is less tested (kernel and
>> +	  toolchain). This requires gcc 4.9 or newer and binutils 2.24 or
>> +	  newer.
> 
> Is it clear that this is only for 64-bit?  Maybe this text should fit
> that in somewhere?

Don't know if it's necessary, the option only appears when 64-bit is
selected.

> It's not obvious to people who do not already know that ELFv2 is just
> the (nick-)name of a particular ABI, not a new kind of ELF (it is just
> version 1 ELF in fact), and that ABI is for 64-bit Power only.

I blame toolchain for -mabi=elfv2 ! And also some blame on ABI document 
which is called ELF V2 ABI rather than ELF ABI V2 which would have been 
unambiguous.

Kernel mostly gets it right (in the code I didn't write), and uses these

#if defined(_CALL_ELF) && _CALL_ELF == 2
#define PPC64_ELF_ABI_v2
#else
#define PPC64_ELF_ABI_v1
#endif

I can go through and change all my stuff and config options to ELF_ABI_v2.

Thanks,
Nick


  reply	other threads:[~2020-04-29  1:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-28 11:25 [PATCH v2] powerpc/64: BE option to use ELFv2 ABI for big endian kernels Nicholas Piggin
2020-04-28 23:40 ` Segher Boessenkool
2020-04-29  0:57   ` Nicholas Piggin [this message]
2021-05-02 17:55     ` Segher Boessenkool
2021-05-03  0:51       ` Nicholas Piggin
2021-05-03 15:18         ` Segher Boessenkool
2021-05-04 12:15           ` Michael Ellerman
2021-05-05 12:31             ` Segher Boessenkool
2021-05-02 16:57 ` Michal Suchánek
2021-05-03  0:58   ` Nicholas Piggin
2021-05-03  7:11     ` Michal Suchánek
2021-05-03  9:34       ` Michal Suchánek
2021-05-03 20:17         ` Michal Suchánek
2021-05-04  9:13           ` Nicholas Piggin
2021-05-04 17:41             ` Naveen N. Rao
2021-05-04 18:08               ` Michal Suchánek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1588121596.7zej1imag0.astroid@bobo.none \
    --to=npiggin@gmail.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=segher@kernel.crashing.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).