From: Florian Weimer <fweimer@redhat.com>
To: Mathieu Malaterre <malat@debian.org>
Cc: libc-help@sourceware.org
Subject: Re: riscv64: ld.so hardware capabilities / V extension 1.0
Date: Tue, 09 Aug 2022 12:32:34 +0200 [thread overview]
Message-ID: <877d3hn1vh.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <CA+7wUsxtJkaHDyy7RqY0-kxxnpnpBuX41dmo142L-zvAaDwcNA@mail.gmail.com> (Mathieu Malaterre's message of "Tue, 9 Aug 2022 10:42:49 +0200")
* Mathieu Malaterre:
> Dear ld.so maintainers,
>
> I see that from time to time subdirectories are added to the search
> path of ld.so. For example I see that commit 45ff34638f0 added the
> sub-directory `avx512_1`.
>
> I tried to make sense of the (outdated?) documentation from:
>
> * https://man7.org/linux/man-pages/man8/ld.so.8.html
>
> but I failed to understand when new subdirectories are being added to ld.so ?
The old mechanism with AT_PLATFORM did not work. The new mechanism is
glibc-hwcaps, where capabilities are ordered, ideally with each
capability being a superset of the previous one. You only need to
supply one file, dl-hwcaps-subdirs.c, that defines _dl_hwcaps_subdirs
and _dl_hwcaps_subdirs_active. This commit provides an example of how
to do this:
commit fdf8fbca455ca3ef57235bde907bcc6a624ac5aa
Author: Florian Weimer <fweimer@redhat.com>
Date: Thu Dec 10 13:51:18 2020 +0100
s390x: Add glibc-hwcaps support
Subdirectories z13, z14, z15 can be selected, mostly based on the
level of support for vector instructions.
Co-Authored-By: Stefan Liebler <stli@linux.ibm.com>
Ideally, you add similar tests to what's included in that commit.
I'd also strongly recommend to document the glibc-hwcaps levels in the
psABI supplement because they need to be consistent across toolchain
components.
If you want to generate nice diagnostics when glibc itself is built with
a higher ISA level, you'll have to add your own dl-hwcap-check.h
Thanks,
Florian
prev parent reply other threads:[~2022-08-09 10:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-09 8:42 Mathieu Malaterre
2022-08-09 10:32 ` Florian Weimer [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=877d3hn1vh.fsf@oldenburg.str.redhat.com \
--to=fweimer@redhat.com \
--cc=libc-help@sourceware.org \
--cc=malat@debian.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).