From: Benjamin Gray <bgray@linux.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Subject: Re: [RFC PATCH 0/4] Out-of-line static calls for powerpc64 ELF V2
Date: Tue, 13 Sep 2022 13:31:57 +1000 [thread overview]
Message-ID: <4f6d5fe841a6b92d3e0a6759e49a099342d9e486.camel@linux.ibm.com> (raw)
In-Reply-To: <20220901055823.152983-1-bgray@linux.ibm.com>
On Thu, 2022-09-01 at 15:58 +1000, Benjamin Gray wrote:
> So not having a local entry point implies not using a TOC
> pointer, which
> implies r2 is volatile if the trampoline does not guarantee that
> it preserves
> r2. However experimenting with such a trampoline showed the
> caller still did
> not preserve its TOC when necessary, even when the trampoline
> used instructions
> that wrote to r2. Possibly there's an attribute that can be used
> to mark the
> necessary info, but I could not find one.
The `.localentry` directive is more general than just specifying where
the local entry is: it can be used to set the relevant ELF bits
directly. So the solution here is setting `.localentry NAME, 1` on the
SC trampoline.
It's not an optimal solution, as it inserts another trampoline to save
r2 before calling the SC trampoline, but it would allow a correct
implementation without the work needed in the other choices.
prev parent reply other threads:[~2022-09-13 3:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-01 5:58 [RFC PATCH 0/4] Out-of-line static calls for powerpc64 ELF V2 Benjamin Gray
2022-09-01 5:58 ` [RFC PATCH 1/4] powerpc/code-patching: add patch_memory() for writing RO text Benjamin Gray
2022-09-01 7:01 ` Christophe Leroy
2022-09-06 1:53 ` Russell Currey
2022-09-01 5:58 ` [RFC PATCH 2/4] static_call: Move static call selftest to static_call.c Benjamin Gray
2022-09-01 6:50 ` Christophe Leroy
2022-09-01 5:58 ` [RFC PATCH 3/4] powerpc/64: Add support for out-of-line static calls Benjamin Gray
2022-09-01 7:33 ` Christophe Leroy
2022-09-01 5:58 ` [RFC PATCH 4/4] powerpc/64: Add tests " Benjamin Gray
2022-09-01 8:07 ` [RFC PATCH 0/4] Out-of-line static calls for powerpc64 ELF V2 Christophe Leroy
2022-09-13 3:31 ` Benjamin Gray [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=4f6d5fe841a6b92d3e0a6759e49a099342d9e486.camel@linux.ibm.com \
--to=bgray@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.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).