From: Michael Matz <matz@suse.de>
To: "Fāng-ruì Sòng" <maskray@google.com>
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 14:47:15 +0000 (UTC) [thread overview]
Message-ID: <alpine.LSU.2.21.2003161435050.30534@wotan.suse.de> (raw)
In-Reply-To: <20200313223347.vvda5wduy3oiyx7u@google.com>
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).
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)
Ciao,
Michael.
P.S: I wish there would have been more implementations of the x86-64 psABI
right from the beginning ;-)
next prev parent reply other threads:[~2020-03-16 14:47 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 ` Michael Matz [this message]
2020-03-16 18:51 ` SHT_UNWIND instead of SHT_X86_64_UNWIND? (was: RFC: Usefulness of SHT_X86_64_UNWIND) Fāng-ruì Sòng
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=alpine.LSU.2.21.2003161435050.30534@wotan.suse.de \
--to=matz@suse.de \
--cc=Ali.Bahrami@Oracle.COM \
--cc=binutils@sourceware.org \
--cc=gnu-gabi@sourceware.org \
--cc=maskray@google.com \
--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).