public inbox for gnu-gabi@sourceware.org
 help / color / mirror / Atom feed
From: "Fāng-ruì Sòng" <maskray@google.com>
To: Michael Matz <matz@suse.de>
Cc: Ali Bahrami <Ali.Bahrami@Oracle.COM>,
	binutils@sourceware.org,
	Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>,
	gnu-gabi <gnu-gabi@sourceware.org>,
	x86-64-abi@googlegroups.com
Subject: Re: SHT_UNWIND instead of SHT_X86_64_UNWIND? (was: RFC: Usefulness of SHT_X86_64_UNWIND)
Date: Mon, 16 Mar 2020 11:51:00 -0700	[thread overview]
Message-ID: <20200316185100.ggw6agfui7xtwqn6@google.com> (raw)
In-Reply-To: <alpine.LSU.2.21.2003161435050.30534@wotan.suse.de>


On 2020-03-16, Michael Matz wrote:
>Hello,
>
>On Fri, 13 Mar 2020, Fāng-ruì Sòng via Gnu-gabi wrote:
>
>> OK, so it is unfortunate that x86-64 psABI says "The call frame
>> information needed for unwinding the stack is output into one or more
>> ELF sections of type SHT_X86_64_UNWIND." while there is no corresponding
>> change made to the most widely assembler (GNU as). This sentence
>> triggered https://reviews.llvm.org/rL252300 which made clang integrated
>> assembler diverge.
>>
>> At this point, I agree that the world is not going to be simplified.
>> Toolchain has to continue to support SHT_X86_64_UNWIND. However, I think
>> clarifying the canonical section type can guide future assembly files
>> and toolchain support.
>
>I think realistically this is the only thing we can do for the x86-64
>psABI: clarify and add acceptable section types, nothing of that will
>simplify anything.  So, I'd add SHT_PROGBITS as an additional acceptable
>type for .eh_frame, but continue to recommend SHT_X86_64_UNWIND (because
>that's in spirit), linkers will have to continue accepting both types for
>the next umpteen years.  So, that would document the de-facto state of the
>psABI with a little nudging towards a better future (the recommendation).

+1 for clarifying that SHT_PROBITS .eh_frame is acceptable.
SHT_X86_64_UNWIND is still the recommended type.

I'll update my https://reviews.llvm.org/D76151 accordingly to allow

.section .eh_frame,"a",@progbits (canonical one is @unwind)

To GNU as maintainers, should @unwind be accepted for non-x86?

>Adding a whole new general section type (SHT_UNWIND) seems to accomplish
>nothing than additional code for all existing psABIs.  For _future_ psABIs
>it might make sense to allocate and document an SHT_UNWIND now, but for
>existing ones it doesn't seem to make much sense.  (And for the general
>type: would we then require this section type to be forever associated
>with dwarf unwind info?  What about ARM unwind info, that couldn't use
>SHT_UNWIND then.  Or would we leave the specific format of SHT_UNWIND to
>the psABI, but still allow them to use that common section type despite
>principal difference to other ABIs?  All of those questions can be
>answered in multiple ways with pros and cons for each, but they need to be
>answered before a generic SHT_UNWIND could be introduced, at which point
>it's even less obvious if we should even bother)
>(FWIW, my personal opinion would be to document SHT_UNWIND in the gABI,
>with psABI to clarify content; but to _not_ make use of it in existing
>psABIs)

+1
Clarifying in gABI that 0x70000001 (processor specific) could not be
used for unrelated purposes would be nice... Sadly Xinuos (formerly SCO)
stopped maintaing the website a few years ago..

>Ciao,
>Michael.
>P.S: I wish there would have been more implementations of the x86-64 psABI
>right from the beginning ;-)

      reply	other threads:[~2020-03-16 18:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAMe9rOo3Y=-xKzoP+tPu64yV5PGmCZZR=9LA3Ji9mDi25_Nqqw@mail.gmail.com>
     [not found] ` <20200313180946.aegom4ekzhjrywgo@google.com>
     [not found]   ` <4402d6f9-1804-9709-b276-17e8c2a5da17@Oracle.COM>
     [not found]     ` <CAFP8O3+zLNTDHyYbMVsvZbzVuPxe9jw08m+g1po6kGQk85AuAQ@mail.gmail.com>
     [not found]       ` <b8b055ae-0a66-2e82-9abb-76928e88c695@Oracle.COM>
2020-03-13 22:33         ` Fāng-ruì Sòng
2020-03-13 23:15           ` SHT_UNWIND instead of SHT_X86_64_UNWIND? Ali Bahrami
2020-03-16 14:47           ` SHT_UNWIND instead of SHT_X86_64_UNWIND? (was: RFC: Usefulness of SHT_X86_64_UNWIND) Michael Matz
2020-03-16 18:51             ` Fāng-ruì Sòng [this message]

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=20200316185100.ggw6agfui7xtwqn6@google.com \
    --to=maskray@google.com \
    --cc=Ali.Bahrami@Oracle.COM \
    --cc=binutils@sourceware.org \
    --cc=gnu-gabi@sourceware.org \
    --cc=matz@suse.de \
    --cc=ro@CeBiTec.Uni-Bielefeld.DE \
    --cc=x86-64-abi@googlegroups.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).