public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: enh <enh@google.com>
To: Zack Weinberg <zack@owlfolio.org>
Cc: libc-alpha@sourceware.org
Subject: Re: Maybe we should get rid of ifuncs
Date: Wed, 24 Apr 2024 07:25:57 -0700	[thread overview]
Message-ID: <CAJgzZor4t00=tOUDunz0-mQ0SUGL6RJL0+CxrEpUTd6JAMimkA@mail.gmail.com> (raw)
In-Reply-To: <D0SELA748G3A.29OHZXTU7HD0I@owlfolio.org>

On Wed, Apr 24, 2024 at 6:56 AM Zack Weinberg <zack@owlfolio.org> wrote:
>
> On Tue Apr 23, 2024 at 2:39 PM EDT, enh wrote:
> > one thing i think is interesting (having been looking at ifuncs while
> > adding riscv64 support to Android) is that afaict bionic [Android's
> > libc] is basically the only current user. every library i'm aware of
> > (and certainly every library that's part of the OS) does _not_ use
> > ifuncs, if only because iOS/macOS has no equivalent (and Windows
> > too?), and if you've got to have the manual function pointer
> > manipulation implementation for them...
>
> I assume you meant "every library that's *not* part of the OS"?

no, for the OS [except the already-mentioned exception of libc] there
are _no_ ifuncs. for apps, well, there were none in a _sampling_ of
popular apps i did, but doing a complete survey of all apps ... well,
there are a _lot_ of apps.

> > that said, for llvm at least there's work on function multi-versioning
> > where the compiler basically writes the ifunc resolver. but (a) that's
> > not quite finished yet (?) and (b) i haven't seen anyone _use_ it yet
> > and (c) is at least by definition of being machine-generated pretty
> > regular.
>
> Do you know where to find the llvm work in progress?

the docs are here:
https://github.com/ARM-software/acle/blob/main/main/acle.md#function-multi-versioning

https://github.com/android/ndk/issues/1909 implies that -- despite the
"beta" in the docs -- enough code might be in llvm and then downstream
in the ndk that arm64 FMV is now usable. (but as i said, i haven't
used it yet, and i don't yet know of anyone who does.)

> zw

  reply	other threads:[~2024-04-24 14:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-23 18:14 Zack Weinberg
2024-04-23 18:39 ` enh
2024-04-23 19:46   ` Palmer Dabbelt
2024-04-24 13:56   ` Zack Weinberg
2024-04-24 14:25     ` enh [this message]
2024-04-23 18:52 ` Sam James
2024-04-23 18:54 ` Florian Weimer
2024-04-24 13:53   ` Zack Weinberg
2024-04-23 19:26 ` Andreas Schwab
2024-04-24 13:54   ` Zack Weinberg
2024-04-24  1:41 ` Richard Henderson
2024-04-24 14:43   ` Zack Weinberg
2024-04-24 15:09     ` enh
2024-04-28  0:24     ` Peter Bergner
2024-05-02  2:59       ` Michael Meissner
2024-04-30  8:42 ` Simon Josefsson

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='CAJgzZor4t00=tOUDunz0-mQ0SUGL6RJL0+CxrEpUTd6JAMimkA@mail.gmail.com' \
    --to=enh@google.com \
    --cc=libc-alpha@sourceware.org \
    --cc=zack@owlfolio.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 read-only IMAP folder(s) and NNTP newsgroup(s).