unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [RFC PATCH 00/23] aarch64-gnu port
@ 2024-01-03 17:14 Sergey Bugaev
  2024-01-03 17:14 ` [PATCH 01/23] hurd: Add some missing includes Sergey Bugaev
                   ` (25 more replies)
  0 siblings, 26 replies; 50+ messages in thread
From: Sergey Bugaev @ 2024-01-03 17:14 UTC (permalink / raw)
  To: libc-alpha, bug-hurd; +Cc: Adhemerval Zanella Netto, Helmut Grohne

Hello!

This is my work on the aarch64-gnu port, aka GNU/Hurd on 64-bit ARM.

To build this, you need an aarch64-gnu toolchain (binutils, GCC, MIG),
and GNU Mach headers for AArch64. I have posted the patches for
binutils, GCC, and GNU Mach to the bug-hurd mailing list; no patches
are required to build aarch64-gnu-mig.

glibc fully builds and produces all the exepected libraries (including
libmvec) and binaries. It can then be used to build other programs, in
particular many core Hurd servers seem to build just fine.

There is no AArch64 port of GNU Mach yet; I'm trying to get the ball
rolling by making this port of glibc. I have only added some AArch64
headers to GNU Mach, but no actual runnable code. My versions of
<mach/aarch64/exception.h>, <mach/aarch64/thread_status.h> (and others)
are by no means final, they are more of preliminary sketches of the API
so I have something to port glibc against. If there are changes
resulting from discussions and (hopefully) an eventual Mach AArch64
port, we'll need to make corresponding changes to glibc.

There not being a Mach build means that it's not currently possible to
run or test any of this port on a real Mach. It is possible to run
simple statically linked executables on Linux (or, I guess, other
kernels which use ELF and similar enough ABI wrt how the arguments are
placed on the stack) as long as you emulate the syscalls and RPCs in
some way. I have done that, and verified that simple statically linked
executables in the bootstrap configuration (i.e. without a Hurd exec
server, with arguments already placed on the stack by Mach) start up
fine.

I have also done a quick i686-gnu build (to see if static-start.S or
init-first.c changes have broken something), and a statically linked
hello world seems to still work as expected.

As usual, the disclaimer about me not knowing what I'm doing: I don't!
I especially am not at all familiar with AArch64, even less so than with
x86_64. I could have done something incredibly stupid; please do review!

That being said, these changes seem smaller and a lot less radical than
the x86_64 port patchset; they're mostly adding things rather than
reworking them, so there is less of a chance to break the x86 targets.
Evidently, we've done enough rewrokings and portability fixes (notably,
various 64-bit fixes) during the x86_64 port to make it easier to add
new ports. This port itself continues this trend somewhat too, with
init-first.c now finally becoming only sysdeps/mach/hurd -specific, and
HTL gaining support for TLS_DTV_AT_TP.

As I said in the previous letter on bug-hurd, the hardware hardening
features (BTI, MTE, PAC) are currently "not really supported", but I do
want to support them in the future. I'm extremely interested in getting
feedback or suggestions about these. For example: what should our API
for controlling PAC keys look like, should we just allow userland to
read and write all the keys? Are there, for example, any gotchas with
BTI that we need to be aware of? Is it possible to start using PAC after
initial start-up (once /dev/random becomes available, so PAC keys can be
initialized) — how would we do that without crashing on e.g. ret
pointers that have not been encrypted?

Finally, a couple of words about the page size. My plan is for userland
to not assume any static value of page size, and always query it
dynamically, unlike on x86, even though GNU Mach will likely be compiled
with some fixed value of page size; my understanding is this is also how
things are done on GNU/Linux. To that end, I've tried to reduce the
reliance on <mach/vm_param.h> and on EXEC_PAGESIZE being defined.
Currently, Mach headers still define *something* named PAGE_SIZE
unconditionally, causing __mach_init () to pick it up and use it instead
of querying the page size dynamically. We should make sure this does not
happen (i.e. <mach/vm_param.h> should not define PAGE_SIZE on AArch64),
this is just something I haven't figured out a nice way to fix yet.

Sergey

P.S. I have not forgotten about my other unmerged patch series! (Most
importantly, O_IGNORE_CTTY everywhere and the fcntl fortification.) I
hope to find some time to hack on them, hopefully some time soon.

Sergey Bugaev (23):
  hurd: Add some missing includes
  hurd: Declare _hurd_intr_rpc_msg* with protected visibility
  Allow glibc to be compiled without EXEC_PAGESIZE
  mach: Drop some unnecessary vm_param.h includes
  hurd: Disable Prefer_MAP_32BIT_EXEC on non-x86_64 for now
  mach: Drop SNARF_ARGS macro
  hurd: Pass the data pointer to _hurd_stack_setup explicitly
  hurd: Drop x86-specific assembly from init-first.c
  hurd: Make init-first.c no longer x86-specific
  hurd: Only init early static TLS if it's used to store stack or
    pointer guards
  hurd: Initializy _dl_pagesize early in static builds
  aarch64: Make cpu-features definitions not Linux-specific
  aarch64: Add dl-procinfo
  aarch64: Allow building without kernel support for BTI
  mach: Add a basic AArch64 port
  hurd: Add a basic AArch64 port
  hurd: Implement TLS on AArch64
  hurd: Implement longjmp for AArch64
  Add FPE_FLTIDO
  hurd: Add an AArch64 signal implementation
  htl: Implement some support for TLS_DTV_AT_TP
  htl: Add an AArch64 implementation
  hurd: Add expected aarch64-gnu abistlists

 bits/siginfo-consts.h                         |    4 +-
 elf/dl-support.c                              |    6 +-
 elf/rtld.c                                    |    2 +
 htl/pt-create.c                               |    2 +
 hurd/hurdsig.c                                |    8 +-
 libio/libioP.h                                |    2 +-
 mach/Makefile                                 |    1 +
 mach/lowlevellock.h                           |    1 +
 mach/setup-thread.c                           |    1 -
 .../sysv/linux => }/aarch64/cpu-features.h    |    0
 sysdeps/aarch64/dl-bti.c                      |   10 +
 sysdeps/aarch64/dl-procinfo.c                 |   59 +
 sysdeps/aarch64/dl-procinfo.h                 |   38 +
 sysdeps/aarch64/htl/Makefile                  |   20 +
 sysdeps/aarch64/htl/bits/pthreadtypes-arch.h  |   36 +
 sysdeps/aarch64/htl/machine-sp.h              |   29 +
 sysdeps/aarch64/htl/pt-machdep.h              |   28 +
 sysdeps/aarch64/htl/tcb-offsets.sym           |    5 +
 .../sysv/linux => }/aarch64/libc-start.c      |    0
 sysdeps/htl/dl-thread_gscope_wait.c           |   16 +-
 sysdeps/hurd/include/hurd.h                   |    1 +
 sysdeps/hurd/include/hurd/signal.h            |    1 +
 sysdeps/mach/aarch64/bits/mach/param.h        |   24 +
 sysdeps/mach/aarch64/cpu-features.c           |  109 +
 sysdeps/mach/aarch64/sys/ucontext.h           |   73 +
 sysdeps/mach/aarch64/sysdep.h                 |   45 +
 sysdeps/mach/aarch64/thread_state.h           |   44 +
 sysdeps/mach/configure                        |    1 +
 sysdeps/mach/configure.ac                     |    1 +
 sysdeps/mach/hurd/aarch64/Implies             |    3 +
 sysdeps/mach/hurd/aarch64/Makefile            |   24 +
 sysdeps/mach/hurd/aarch64/____longjmp_chk.S   |  173 ++
 sysdeps/mach/hurd/aarch64/__longjmp.S         |  150 ++
 sysdeps/mach/hurd/aarch64/bits/sigcontext.h   |   96 +
 .../mach/hurd/aarch64/dl-tls-initialized.c    |   19 +
 sysdeps/mach/hurd/aarch64/exc2signal.c        |  119 +
 sysdeps/mach/hurd/aarch64/htl/pt-machdep.c    |   55 +
 sysdeps/mach/hurd/aarch64/htl/pt-setup.c      |   80 +
 sysdeps/mach/hurd/aarch64/intr-msg.h          |  123 +
 sysdeps/mach/hurd/aarch64/ld.abilist          |   18 +
 .../mach/hurd/aarch64/libBrokenLocale.abilist |    1 +
 sysdeps/mach/hurd/aarch64/libanl.abilist      |    4 +
 sysdeps/mach/hurd/aarch64/libc.abilist        | 2123 +++++++++++++++++
 .../hurd/aarch64/libc_malloc_debug.abilist    |   26 +
 sysdeps/mach/hurd/aarch64/libdl.abilist       |    0
 sysdeps/mach/hurd/aarch64/libm.abilist        | 1030 ++++++++
 sysdeps/mach/hurd/aarch64/libmvec.abilist     |   75 +
 sysdeps/mach/hurd/aarch64/libpthread.abilist  |  165 ++
 sysdeps/mach/hurd/aarch64/libresolv.abilist   |   55 +
 sysdeps/mach/hurd/aarch64/librt.abilist       |   33 +
 sysdeps/mach/hurd/aarch64/longjmp-ts.c        |   50 +
 sysdeps/mach/hurd/aarch64/shlib-versions      |    2 +
 sysdeps/mach/hurd/aarch64/signal-defines.sym  |   10 +
 sysdeps/mach/hurd/aarch64/static-start.S      |   52 +
 sysdeps/mach/hurd/aarch64/tls.h               |  206 ++
 sysdeps/mach/hurd/aarch64/trampoline.c        |  327 +++
 sysdeps/mach/hurd/aarch64/vm_param.h          |   24 +
 sysdeps/mach/hurd/dl-sysdep.c                 |    3 +-
 sysdeps/mach/hurd/htl/pt-sysdep.c             |    9 +
 sysdeps/mach/hurd/i386/static-start.S         |    3 +
 sysdeps/mach/hurd/{x86 => }/init-first.c      |   45 +-
 sysdeps/mach/hurd/mig-reply.c                 |    1 +
 sysdeps/mach/hurd/mmap.c                      |    2 +-
 sysdeps/mach/hurd/x86_64/static-start.S       |    1 +
 sysdeps/mach/sysdep.h                         |    7 -
 sysdeps/mach/x86/sysdep.h                     |   14 -
 66 files changed, 5639 insertions(+), 56 deletions(-)
 rename sysdeps/{unix/sysv/linux => }/aarch64/cpu-features.h (100%)
 create mode 100644 sysdeps/aarch64/dl-procinfo.c
 create mode 100644 sysdeps/aarch64/dl-procinfo.h
 create mode 100644 sysdeps/aarch64/htl/Makefile
 create mode 100644 sysdeps/aarch64/htl/bits/pthreadtypes-arch.h
 create mode 100644 sysdeps/aarch64/htl/machine-sp.h
 create mode 100644 sysdeps/aarch64/htl/pt-machdep.h
 create mode 100644 sysdeps/aarch64/htl/tcb-offsets.sym
 rename sysdeps/{unix/sysv/linux => }/aarch64/libc-start.c (100%)
 create mode 100644 sysdeps/mach/aarch64/bits/mach/param.h
 create mode 100644 sysdeps/mach/aarch64/cpu-features.c
 create mode 100644 sysdeps/mach/aarch64/sys/ucontext.h
 create mode 100644 sysdeps/mach/aarch64/sysdep.h
 create mode 100644 sysdeps/mach/aarch64/thread_state.h
 create mode 100644 sysdeps/mach/hurd/aarch64/Implies
 create mode 100644 sysdeps/mach/hurd/aarch64/Makefile
 create mode 100644 sysdeps/mach/hurd/aarch64/____longjmp_chk.S
 create mode 100644 sysdeps/mach/hurd/aarch64/__longjmp.S
 create mode 100644 sysdeps/mach/hurd/aarch64/bits/sigcontext.h
 create mode 100644 sysdeps/mach/hurd/aarch64/dl-tls-initialized.c
 create mode 100644 sysdeps/mach/hurd/aarch64/exc2signal.c
 create mode 100644 sysdeps/mach/hurd/aarch64/htl/pt-machdep.c
 create mode 100644 sysdeps/mach/hurd/aarch64/htl/pt-setup.c
 create mode 100644 sysdeps/mach/hurd/aarch64/intr-msg.h
 create mode 100644 sysdeps/mach/hurd/aarch64/ld.abilist
 create mode 100644 sysdeps/mach/hurd/aarch64/libBrokenLocale.abilist
 create mode 100644 sysdeps/mach/hurd/aarch64/libanl.abilist
 create mode 100644 sysdeps/mach/hurd/aarch64/libc.abilist
 create mode 100644 sysdeps/mach/hurd/aarch64/libc_malloc_debug.abilist
 create mode 100644 sysdeps/mach/hurd/aarch64/libdl.abilist
 create mode 100644 sysdeps/mach/hurd/aarch64/libm.abilist
 create mode 100644 sysdeps/mach/hurd/aarch64/libmvec.abilist
 create mode 100644 sysdeps/mach/hurd/aarch64/libpthread.abilist
 create mode 100644 sysdeps/mach/hurd/aarch64/libresolv.abilist
 create mode 100644 sysdeps/mach/hurd/aarch64/librt.abilist
 create mode 100644 sysdeps/mach/hurd/aarch64/longjmp-ts.c
 create mode 100644 sysdeps/mach/hurd/aarch64/shlib-versions
 create mode 100644 sysdeps/mach/hurd/aarch64/signal-defines.sym
 create mode 100644 sysdeps/mach/hurd/aarch64/static-start.S
 create mode 100644 sysdeps/mach/hurd/aarch64/tls.h
 create mode 100644 sysdeps/mach/hurd/aarch64/trampoline.c
 create mode 100644 sysdeps/mach/hurd/aarch64/vm_param.h
 rename sysdeps/mach/hurd/{x86 => }/init-first.c (87%)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [PATCH 01/23] hurd: Add some missing includes
  2024-01-03 17:14 [RFC PATCH 00/23] aarch64-gnu port Sergey Bugaev
@ 2024-01-03 17:14 ` Sergey Bugaev
  2024-01-03 20:43   ` Samuel Thibault
  2024-01-03 21:00   ` Samuel Thibault
  2024-01-03 17:14 ` [PATCH 02/23] hurd: Declare _hurd_intr_rpc_msg* with protected visibility Sergey Bugaev
                   ` (24 subsequent siblings)
  25 siblings, 2 replies; 50+ messages in thread
From: Sergey Bugaev @ 2024-01-03 17:14 UTC (permalink / raw)
  To: libc-alpha, bug-hurd

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 hurd/hurdsig.c                     | 2 +-
 mach/lowlevellock.h                | 1 +
 sysdeps/hurd/include/hurd.h        | 1 +
 sysdeps/hurd/include/hurd/signal.h | 1 +
 sysdeps/mach/hurd/mig-reply.c      | 1 +
 5 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/hurd/hurdsig.c b/hurd/hurdsig.c
index 3deb94f9..fe788193 100644
--- a/hurd/hurdsig.c
+++ b/hurd/hurdsig.c
@@ -15,6 +15,7 @@
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
+#include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -260,7 +261,6 @@ _hurd_sigstate_actions (struct hurd_sigstate *ss)
 #include <hurd/msg_server.h>
 #include <hurd/msg_reply.h>	/* For __msg_sig_post_reply.  */
 #include <hurd/interrupt.h>
-#include <assert.h>
 #include <unistd.h>
 
 
diff --git a/mach/lowlevellock.h b/mach/lowlevellock.h
index 129a7bd9..c5bb0879 100644
--- a/mach/lowlevellock.h
+++ b/mach/lowlevellock.h
@@ -19,6 +19,7 @@
 #ifndef _MACH_LOWLEVELLOCK_H
 #define _MACH_LOWLEVELLOCK_H   1
 
+#include <mach.h>
 #include <mach/gnumach.h>
 #include <atomic.h>
 
diff --git a/sysdeps/hurd/include/hurd.h b/sysdeps/hurd/include/hurd.h
index 568092d6..189fd44e 100644
--- a/sysdeps/hurd/include/hurd.h
+++ b/sysdeps/hurd/include/hurd.h
@@ -1,4 +1,5 @@
 #ifndef	_HURD_H
+#include <tls.h>
 #include_next <hurd.h>
 
 void _hurd_libc_proc_init (char **argv);
diff --git a/sysdeps/hurd/include/hurd/signal.h b/sysdeps/hurd/include/hurd/signal.h
index 1dc8a1f3..9b1bf3df 100644
--- a/sysdeps/hurd/include/hurd/signal.h
+++ b/sysdeps/hurd/include/hurd/signal.h
@@ -6,6 +6,7 @@ extern struct hurd_sigstate *_hurd_self_sigstate (void) __attribute__ ((__const_
 libc_hidden_proto (_hurd_self_sigstate)
 #endif
 
+#include <tls.h>
 #include_next <hurd/signal.h>
 
 #ifndef _ISOMAC
diff --git a/sysdeps/mach/hurd/mig-reply.c b/sysdeps/mach/hurd/mig-reply.c
index 57bcd808..85c3af13 100644
--- a/sysdeps/mach/hurd/mig-reply.c
+++ b/sysdeps/mach/hurd/mig-reply.c
@@ -15,6 +15,7 @@
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
+#include <assert.h>
 #include <mach.h>
 #include <mach/mig_support.h>
 #include <tls.h>
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH 02/23] hurd: Declare _hurd_intr_rpc_msg* with protected visibility
  2024-01-03 17:14 [RFC PATCH 00/23] aarch64-gnu port Sergey Bugaev
  2024-01-03 17:14 ` [PATCH 01/23] hurd: Add some missing includes Sergey Bugaev
@ 2024-01-03 17:14 ` Sergey Bugaev
  2024-01-03 21:00   ` Samuel Thibault
  2024-01-03 17:14 ` [RFC PATCH 03/23] Allow glibc to be compiled without EXEC_PAGESIZE Sergey Bugaev
                   ` (23 subsequent siblings)
  25 siblings, 1 reply; 50+ messages in thread
From: Sergey Bugaev @ 2024-01-03 17:14 UTC (permalink / raw)
  To: libc-alpha, bug-hurd

These symbols are internal and never exported; make sure the compiler
realizes that when compiling hurdsig.c and does not try to emit GOT
reads.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 hurd/hurdsig.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/hurd/hurdsig.c b/hurd/hurdsig.c
index fe788193..882a0347 100644
--- a/hurd/hurdsig.c
+++ b/hurd/hurdsig.c
@@ -416,9 +416,9 @@ _hurdsig_abort_rpcs (struct hurd_sigstate *ss, int signo, int sigthread,
 		     struct machine_thread_all_state *state, int *state_change,
 		     void (*reply) (void))
 {
-  extern const void _hurd_intr_rpc_msg_about_to;
-  extern const void _hurd_intr_rpc_msg_setup_done;
-  extern const void _hurd_intr_rpc_msg_in_trap;
+  extern const void _hurd_intr_rpc_msg_about_to attribute_hidden;
+  extern const void _hurd_intr_rpc_msg_setup_done attribute_hidden;
+  extern const void _hurd_intr_rpc_msg_in_trap attribute_hidden;
   mach_port_t rcv_port = MACH_PORT_NULL;
   mach_port_t intr_port;
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [RFC PATCH 03/23] Allow glibc to be compiled without EXEC_PAGESIZE
  2024-01-03 17:14 [RFC PATCH 00/23] aarch64-gnu port Sergey Bugaev
  2024-01-03 17:14 ` [PATCH 01/23] hurd: Add some missing includes Sergey Bugaev
  2024-01-03 17:14 ` [PATCH 02/23] hurd: Declare _hurd_intr_rpc_msg* with protected visibility Sergey Bugaev
@ 2024-01-03 17:14 ` Sergey Bugaev
  2024-03-11 16:13   ` Florian Weimer
  2024-01-03 17:14 ` [PATCH 04/23] mach: Drop some unnecessary vm_param.h includes Sergey Bugaev
                   ` (22 subsequent siblings)
  25 siblings, 1 reply; 50+ messages in thread
From: Sergey Bugaev @ 2024-01-03 17:14 UTC (permalink / raw)
  To: libc-alpha, bug-hurd

We would like to avoid statically defining any specific page size on
aarch64-gnu, and instead make sure that everything uses the dynamic
page size, available via vm_page_size and GLRO(dl_pagesize).

There are currently a few places in glibc that require EXEC_PAGESIZE
to be defined. Per Roland's suggestion [0], drop the static
GLRO(dl_pagesize) initializers (for now, only if EXEC_PAGESIZE is not
defined), and don't require EXEC_PAGESIZE definition for libio to
enable mmap usage.

[0]: https://mail.gnu.org/archive/html/bug-hurd/2011-10/msg00035.html

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---

I opted to play it safe and only disable the static GLRO(dl_pagesize)
initializers when EXEC_PAGESIZE is not defined (i.e. on aarch64-gnu).
I can change this to be unconditional if that's considered OK.

 elf/dl-support.c | 6 +++++-
 elf/rtld.c       | 2 ++
 libio/libioP.h   | 2 +-
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/elf/dl-support.c b/elf/dl-support.c
index 2f502c8b..6375dc95 100644
--- a/elf/dl-support.c
+++ b/elf/dl-support.c
@@ -135,7 +135,11 @@ void *_dl_random;
 #include <dl-procruntime.c>
 #include <dl-procinfo.c>
 
-size_t _dl_pagesize = EXEC_PAGESIZE;
+size_t _dl_pagesize
+#ifdef EXEC_PAGESIZE
+  = EXEC_PAGESIZE
+#endif
+;
 
 size_t _dl_minsigstacksize = CONSTANT_MINSIGSTKSZ;
 
diff --git a/elf/rtld.c b/elf/rtld.c
index 4f494b79..98b042c0 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -358,7 +358,9 @@ struct rtld_global_ro _rtld_global_ro attribute_relro =
     ._dl_debug_fd = STDERR_FILENO,
     ._dl_lazy = 1,
     ._dl_fpu_control = _FPU_DEFAULT,
+#ifdef EXEC_PAGESIZE
     ._dl_pagesize = EXEC_PAGESIZE,
+#endif
     ._dl_inhibit_cache = 0,
     ._dl_profile_output = "/var/tmp",
 
diff --git a/libio/libioP.h b/libio/libioP.h
index 1af287b1..1a7f547e 100644
--- a/libio/libioP.h
+++ b/libio/libioP.h
@@ -852,7 +852,7 @@ extern off64_t _IO_seekpos_unlocked (FILE *, off64_t, int)
 #  define MAP_ANONYMOUS MAP_ANON
 # endif
 
-# if !defined(MAP_ANONYMOUS) || !defined(EXEC_PAGESIZE)
+# if !defined(MAP_ANONYMOUS)
 #  undef _G_HAVE_MMAP
 #  define _G_HAVE_MMAP 0
 # endif
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH 04/23] mach: Drop some unnecessary vm_param.h includes
  2024-01-03 17:14 [RFC PATCH 00/23] aarch64-gnu port Sergey Bugaev
                   ` (2 preceding siblings ...)
  2024-01-03 17:14 ` [RFC PATCH 03/23] Allow glibc to be compiled without EXEC_PAGESIZE Sergey Bugaev
@ 2024-01-03 17:14 ` Sergey Bugaev
  2024-01-03 21:00   ` Samuel Thibault
  2024-01-03 17:14 ` [RFC PATCH 05/23] hurd: Disable Prefer_MAP_32BIT_EXEC on non-x86_64 for now Sergey Bugaev
                   ` (21 subsequent siblings)
  25 siblings, 1 reply; 50+ messages in thread
From: Sergey Bugaev @ 2024-01-03 17:14 UTC (permalink / raw)
  To: libc-alpha, bug-hurd

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---

We should try to include vm_param.h less; this statically asserts that
these files are not possibly using the PAGE_SIZE definition.

dl-sysdep.c used VM_MAX_ADDRESS for the "loser kludge for vm_map kernel
bug"; that bug has been fixed and the kludge removed. setup-thread.c has
been including vm_param.h from the start; I can't see any reason for it.

 mach/setup-thread.c           | 1 -
 sysdeps/mach/hurd/dl-sysdep.c | 1 -
 2 files changed, 2 deletions(-)

diff --git a/mach/setup-thread.c b/mach/setup-thread.c
index 72bf1083..1e7f9953 100644
--- a/mach/setup-thread.c
+++ b/mach/setup-thread.c
@@ -19,7 +19,6 @@
 #include <mach/setup-thread.h>
 #include <thread_state.h>
 #include <string.h>
-#include <mach/machine/vm_param.h>
 #include <ldsodefs.h>
 #include "sysdep.h"		/* Defines stack direction.  */
 
diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c
index d3933bfe..43129a1e 100644
--- a/sysdeps/mach/hurd/dl-sysdep.c
+++ b/sysdeps/mach/hurd/dl-sysdep.c
@@ -32,7 +32,6 @@
 #include <sysdep.h>
 #include <argz.h>
 #include <mach/mig_support.h>
-#include <mach/machine/vm_param.h>
 #include "hurdstartup.h"
 #include <hurd/lookup.h>
 #include <hurd/auth.h>
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [RFC PATCH 05/23] hurd: Disable Prefer_MAP_32BIT_EXEC on non-x86_64 for now
  2024-01-03 17:14 [RFC PATCH 00/23] aarch64-gnu port Sergey Bugaev
                   ` (3 preceding siblings ...)
  2024-01-03 17:14 ` [PATCH 04/23] mach: Drop some unnecessary vm_param.h includes Sergey Bugaev
@ 2024-01-03 17:14 ` Sergey Bugaev
  2024-01-03 17:14 ` [PATCH 06/23] mach: Drop SNARF_ARGS macro Sergey Bugaev
                   ` (20 subsequent siblings)
  25 siblings, 0 replies; 50+ messages in thread
From: Sergey Bugaev @ 2024-01-03 17:14 UTC (permalink / raw)
  To: libc-alpha, bug-hurd

While we could support it on any architecture, the tunable is currently
only defined on x86_64.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---

Alternatively, we could declare the tunable for all Hurd ports (e.g. in
sysdeps/mach/hurd/dl-tunables.list), but I'm concerned about whether it
would interact well with the existing definition for x86_64. Is it
considered OK for the same tunable to be declared in two places?

 sysdeps/mach/hurd/dl-sysdep.c | 2 +-
 sysdeps/mach/hurd/mmap.c      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c
index 43129a1e..6ba00e41 100644
--- a/sysdeps/mach/hurd/dl-sysdep.c
+++ b/sysdeps/mach/hurd/dl-sysdep.c
@@ -457,7 +457,7 @@ __mmap (void *addr, size_t len, int prot, int flags, int fd, off_t offset)
   if (prot & PROT_EXEC)
     vmprot |= VM_PROT_EXECUTE;
 
-#ifdef __LP64__
+#ifdef __x86_64__
   if ((addr == NULL) && (prot & PROT_EXEC)
       && HAS_ARCH_FEATURE (Prefer_MAP_32BIT_EXEC))
     flags |= MAP_32BIT;
diff --git a/sysdeps/mach/hurd/mmap.c b/sysdeps/mach/hurd/mmap.c
index 7b945610..30e369f0 100644
--- a/sysdeps/mach/hurd/mmap.c
+++ b/sysdeps/mach/hurd/mmap.c
@@ -60,7 +60,7 @@ __mmap (void *addr, size_t len, int prot, int flags, int fd, off_t offset)
   copy = ! (flags & MAP_SHARED);
   anywhere = ! (flags & MAP_FIXED);
 
-#ifdef __LP64__
+#ifdef __x86_64__
   if ((addr == NULL) && (prot & PROT_EXEC)
       && HAS_ARCH_FEATURE (Prefer_MAP_32BIT_EXEC))
     flags |= MAP_32BIT;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [PATCH 06/23] mach: Drop SNARF_ARGS macro
  2024-01-03 17:14 [RFC PATCH 00/23] aarch64-gnu port Sergey Bugaev
                   ` (4 preceding siblings ...)
  2024-01-03 17:14 ` [RFC PATCH 05/23] hurd: Disable Prefer_MAP_32BIT_EXEC on non-x86_64 for now Sergey Bugaev
@ 2024-01-03 17:14 ` Sergey Bugaev
  2024-01-03 21:00   ` Samuel Thibault
  2024-01-03 17:14 ` [RFC PATCH 07/23] hurd: Pass the data pointer to _hurd_stack_setup explicitly Sergey Bugaev
                   ` (19 subsequent siblings)
  25 siblings, 1 reply; 50+ messages in thread
From: Sergey Bugaev @ 2024-01-03 17:14 UTC (permalink / raw)
  To: libc-alpha, bug-hurd

We're obtaining arguments from the stack differently, see init-first.c.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/mach/sysdep.h     |  7 -------
 sysdeps/mach/x86/sysdep.h | 14 --------------
 2 files changed, 21 deletions(-)

diff --git a/sysdeps/mach/sysdep.h b/sysdeps/mach/sysdep.h
index 8eeac45b..3e0553d8 100644
--- a/sysdeps/mach/sysdep.h
+++ b/sysdeps/mach/sysdep.h
@@ -56,13 +56,6 @@
 /* This is not used on all machines.  */
 #endif
 
-/* Set variables ARGC, ARGV, and ENVP for the arguments
-   left on the stack by the microkernel.  */
-#ifndef SNARF_ARGS
-#define SNARF_ARGS(argc, argv, envp)
-#error SNARF_ARGS not defined by sysdeps/mach/MACHINE/sysdep.h
-#endif
-
 /* LOSE can be defined as the `halt' instruction or something
    similar which will cause the process to die in a characteristic
    way suggesting a bug.  */
diff --git a/sysdeps/mach/x86/sysdep.h b/sysdeps/mach/x86/sysdep.h
index ed9f7f46..63be5638 100644
--- a/sysdeps/mach/x86/sysdep.h
+++ b/sysdeps/mach/x86/sysdep.h
@@ -25,20 +25,6 @@
 
 #define LOSE asm volatile ("hlt")
 
-#define SNARF_ARGS(entry_sp, argc, argv, envp)				      \
-  do									      \
-    {									      \
-      char **p;								      \
-      argc = (int) *entry_sp;						      \
-      argv = (char **) (entry_sp + 1);					      \
-      p = argv;								      \
-      while (*p++ != NULL)						      \
-	;								      \
-      if (p >= (char **) argv[0])					      \
-	--p;								      \
-      envp = p;							      \
-    } while (0)
-
 #define STACK_GROWTH_DOWN
 
 /* Get the machine-independent Mach definitions.  */
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [RFC PATCH 07/23] hurd: Pass the data pointer to _hurd_stack_setup explicitly
  2024-01-03 17:14 [RFC PATCH 00/23] aarch64-gnu port Sergey Bugaev
                   ` (5 preceding siblings ...)
  2024-01-03 17:14 ` [PATCH 06/23] mach: Drop SNARF_ARGS macro Sergey Bugaev
@ 2024-01-03 17:14 ` Sergey Bugaev
  2024-01-04 22:47   ` Samuel Thibault
  2024-01-03 17:14 ` [RFC PATCH 08/23] hurd: Drop x86-specific assembly from init-first.c Sergey Bugaev
                   ` (18 subsequent siblings)
  25 siblings, 1 reply; 50+ messages in thread
From: Sergey Bugaev @ 2024-01-03 17:14 UTC (permalink / raw)
  To: libc-alpha, bug-hurd

Instead of relying on the stack frame layout to figure out where the stack
pointer was prior to the _hurd_stack_setup () call, just pass the pointer
as an argument explicitly. This is less brittle and much more portable.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/mach/hurd/i386/static-start.S   |  3 +++
 sysdeps/mach/hurd/x86/init-first.c      | 16 +++++++---------
 sysdeps/mach/hurd/x86_64/static-start.S |  1 +
 3 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/sysdeps/mach/hurd/i386/static-start.S b/sysdeps/mach/hurd/i386/static-start.S
index d83505b2..3ffcb47d 100644
--- a/sysdeps/mach/hurd/i386/static-start.S
+++ b/sysdeps/mach/hurd/i386/static-start.S
@@ -19,7 +19,10 @@
 	.text
 	.globl _start
 _start:
+	pushl %esp
 	call _hurd_stack_setup
+	/* No need to "addl %4, %esp", since _hurd_stack_setup
+	 * returns with an already adjusted stack pointer.  */
 	xorl %edx, %edx
 	jmp _start1
 
diff --git a/sysdeps/mach/hurd/x86/init-first.c b/sysdeps/mach/hurd/x86/init-first.c
index bb051418..6f71d71b 100644
--- a/sysdeps/mach/hurd/x86/init-first.c
+++ b/sysdeps/mach/hurd/x86/init-first.c
@@ -197,7 +197,7 @@ strong_alias (posixland_init, __libc_init_first);
    which should not exist at all.  */
 void
 inhibit_stack_protector
-_hurd_stack_setup (void)
+_hurd_stack_setup (void **argptr)
 {
   /* This is the very first C code that runs in a statically linked
      executable -- calling this function is the first thing that _start in
@@ -206,14 +206,12 @@ _hurd_stack_setup (void)
 
      _start1 expects the arguments, environment, and a Hurd data block to be
      located at the top of the stack.  The data may already be located there,
-     or we may need to receive it from the exec server.  */
-  void *caller = __builtin_extract_return_addr (__builtin_return_address (0));
-  /* If the arguments and environment are already located on the stack, this is
-     where they are, just above our call frame.  Note that this may not be a
-     valid pointer in case we're supposed to receive the arguments from the exec
-     server, so we can not dereference it yet.  */
-  void **p = (void **) __builtin_frame_address (0) + 2;
+     or we may need to receive it from the exec server.  If the data is located
+     on the stack (just above our call frame), argptr points to it.  Note that
+     this may not be a valid pointer in case we're supposed to receive the
+     arguments from the exec server, so we can not dereference it yet.  */
 
+  void *caller = __builtin_extract_return_addr (__builtin_return_address (0));
   /* Init the essential things.  */
   first_init ();
 
@@ -245,7 +243,7 @@ _hurd_stack_setup (void)
      the stack pointer to the data (which is somewhere on the current stack
      anyway).  This way, _start1 find the data on the top of the stack, just as
      it expects to.  */
-  _hurd_startup (p, &doinit);
+  _hurd_startup (argptr, &doinit);
   __builtin_unreachable ();
 }
 #endif
diff --git a/sysdeps/mach/hurd/x86_64/static-start.S b/sysdeps/mach/hurd/x86_64/static-start.S
index 9b9db937..0ec00905 100644
--- a/sysdeps/mach/hurd/x86_64/static-start.S
+++ b/sysdeps/mach/hurd/x86_64/static-start.S
@@ -25,6 +25,7 @@ _start:
 	leaq __strlen_sse2(%rip), %rax
 	movq %rax, strlen@GOTPCREL(%rip)
 
+	movq %rsp, %rdi
 	call _hurd_stack_setup
 	xorq %rdx, %rdx
 	jmp _start1
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [RFC PATCH 08/23] hurd: Drop x86-specific assembly from init-first.c
  2024-01-03 17:14 [RFC PATCH 00/23] aarch64-gnu port Sergey Bugaev
                   ` (6 preceding siblings ...)
  2024-01-03 17:14 ` [RFC PATCH 07/23] hurd: Pass the data pointer to _hurd_stack_setup explicitly Sergey Bugaev
@ 2024-01-03 17:14 ` Sergey Bugaev
  2024-01-04 22:48   ` Samuel Thibault
  2024-01-03 17:14 ` [RFC PATCH 09/23] hurd: Make init-first.c no longer x86-specific Sergey Bugaev
                   ` (17 subsequent siblings)
  25 siblings, 1 reply; 50+ messages in thread
From: Sergey Bugaev @ 2024-01-03 17:14 UTC (permalink / raw)
  To: libc-alpha, bug-hurd

We already have the RETURN_TO macro for this exact use case, and it's already
used in the non-static code path. Use it here too.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---

This was the last piece of x86 specifics in init-first.c!
(Remember, it started as sysdeps/mach/hurd/i386/init-first.c, with lots of
i386-specific assumptions about how arguments are passed and so on.)

 sysdeps/mach/hurd/x86/init-first.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/sysdeps/mach/hurd/x86/init-first.c b/sysdeps/mach/hurd/x86/init-first.c
index 6f71d71b..211b2096 100644
--- a/sysdeps/mach/hurd/x86/init-first.c
+++ b/sysdeps/mach/hurd/x86/init-first.c
@@ -218,15 +218,7 @@ _hurd_stack_setup (void **argptr)
   void doinit (intptr_t *data)
     {
       init ((void **) data);
-# ifdef __x86_64__
-      asm volatile ("movq %0, %%rsp\n" /* Switch to new outermost stack.  */
-                    "xorq %%rbp, %%rbp\n" /* Clear outermost frame pointer.  */
-                    "jmp *%1" : : "r" (data), "r" (caller));
-# else
-      asm volatile ("movl %0, %%esp\n" /* Switch to new outermost stack.  */
-		    "xorl %%ebp, %%ebp\n" /* Clear outermost frame pointer.  */
-		    "jmp *%1" : : "r" (data), "r" (caller));
-# endif
+      RETURN_TO (data, caller, 0);
       __builtin_unreachable ();
     }
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [RFC PATCH 09/23] hurd: Make init-first.c no longer x86-specific
  2024-01-03 17:14 [RFC PATCH 00/23] aarch64-gnu port Sergey Bugaev
                   ` (7 preceding siblings ...)
  2024-01-03 17:14 ` [RFC PATCH 08/23] hurd: Drop x86-specific assembly from init-first.c Sergey Bugaev
@ 2024-01-03 17:14 ` Sergey Bugaev
  2024-01-04 22:48   ` Samuel Thibault
  2024-01-03 17:14 ` [RFC PATCH 10/23] hurd: Only init early static TLS if it's used to store stack or pointer guards Sergey Bugaev
                   ` (16 subsequent siblings)
  25 siblings, 1 reply; 50+ messages in thread
From: Sergey Bugaev @ 2024-01-03 17:14 UTC (permalink / raw)
  To: libc-alpha, bug-hurd

This will make it usable in other ports.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/mach/hurd/{x86 => }/init-first.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename sysdeps/mach/hurd/{x86 => }/init-first.c (98%)

diff --git a/sysdeps/mach/hurd/x86/init-first.c b/sysdeps/mach/hurd/init-first.c
similarity index 98%
rename from sysdeps/mach/hurd/x86/init-first.c
rename to sysdeps/mach/hurd/init-first.c
index 211b2096..85261916 100644
--- a/sysdeps/mach/hurd/x86/init-first.c
+++ b/sysdeps/mach/hurd/init-first.c
@@ -1,4 +1,4 @@
-/* Initialization code run first thing by the ELF startup code.  For x86/Hurd.
+/* Initialization code run first thing by the ELF startup code.  For Hurd.
    Copyright (C) 1995-2024 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -155,7 +155,7 @@ first_init (void)
 
 #ifndef SHARED
   /* In the static case, we need to set up TLS early so that the stack
-     protection guard can be read at gs:0x14 by the gcc-generated snippets.  */
+     protection guard can be read at from TLS by the GCC-generated snippets.  */
   _hurd_tls_init (&__init1_tcbhead, 0);
 #endif
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [RFC PATCH 10/23] hurd: Only init early static TLS if it's used to store stack or pointer guards
  2024-01-03 17:14 [RFC PATCH 00/23] aarch64-gnu port Sergey Bugaev
                   ` (8 preceding siblings ...)
  2024-01-03 17:14 ` [RFC PATCH 09/23] hurd: Make init-first.c no longer x86-specific Sergey Bugaev
@ 2024-01-03 17:14 ` Sergey Bugaev
  2024-01-04 22:48   ` Samuel Thibault
  2024-01-03 17:14 ` [RFC PATCH 11/23] hurd: Initializy _dl_pagesize early in static builds Sergey Bugaev
                   ` (15 subsequent siblings)
  25 siblings, 1 reply; 50+ messages in thread
From: Sergey Bugaev @ 2024-01-03 17:14 UTC (permalink / raw)
  To: libc-alpha, bug-hurd

This is the case on both x86 architectures, but not on AArch64.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/mach/hurd/init-first.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/sysdeps/mach/hurd/init-first.c b/sysdeps/mach/hurd/init-first.c
index 85261916..26ccd37e 100644
--- a/sysdeps/mach/hurd/init-first.c
+++ b/sysdeps/mach/hurd/init-first.c
@@ -38,7 +38,16 @@ extern int __libc_argc attribute_hidden;
 extern char **__libc_argv attribute_hidden;
 extern char **_dl_argv;
 
-#ifndef SHARED
+#if !defined (SHARED) && (defined (THREAD_SET_STACK_GUARD) || defined (THREAD_SET_POINTER_GUARD))
+/* In the static case, we need to set up TLS early so that the stack
+   protection guard can be read at from TLS by the GCC-generated snippets,
+   on architectures that store the guard in TLS and not globally.  */
+# define USE_INIT1_TCBHEAD 1
+#else
+# define USE_INIT1_TCBHEAD 0
+#endif
+
+#if USE_INIT1_TCBHEAD
 static tcbhead_t __init1_tcbhead;
 #endif
 
@@ -153,9 +162,7 @@ first_init (void)
   /* Initialize data structures so we can do RPCs.  */
   __mach_init ();
 
-#ifndef SHARED
-  /* In the static case, we need to set up TLS early so that the stack
-     protection guard can be read at from TLS by the GCC-generated snippets.  */
+#if USE_INIT1_TCBHEAD
   _hurd_tls_init (&__init1_tcbhead, 0);
 #endif
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [RFC PATCH 11/23] hurd: Initializy _dl_pagesize early in static builds
  2024-01-03 17:14 [RFC PATCH 00/23] aarch64-gnu port Sergey Bugaev
                   ` (9 preceding siblings ...)
  2024-01-03 17:14 ` [RFC PATCH 10/23] hurd: Only init early static TLS if it's used to store stack or pointer guards Sergey Bugaev
@ 2024-01-03 17:14 ` Sergey Bugaev
  2024-01-04 22:48   ` Samuel Thibault
  2024-01-03 17:14 ` [RFC PATCH 12/23] aarch64: Make cpu-features definitions not Linux-specific Sergey Bugaev
                   ` (14 subsequent siblings)
  25 siblings, 1 reply; 50+ messages in thread
From: Sergey Bugaev @ 2024-01-03 17:14 UTC (permalink / raw)
  To: libc-alpha, bug-hurd

We fetch __vm_page_size as the very first RPC that we do, inside
__mach_init (). Propagate that to _dl_pagesize ASAP after that,
before any other initialization.

In dynamic builds, this is already done immediately after
__mach_init (), inside _dl_sysdep_start ().

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/mach/hurd/init-first.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sysdeps/mach/hurd/init-first.c b/sysdeps/mach/hurd/init-first.c
index 26ccd37e..22c35747 100644
--- a/sysdeps/mach/hurd/init-first.c
+++ b/sysdeps/mach/hurd/init-first.c
@@ -162,6 +162,10 @@ first_init (void)
   /* Initialize data structures so we can do RPCs.  */
   __mach_init ();
 
+#ifndef SHARED
+  GLRO(dl_pagesize) = __vm_page_size;
+#endif
+
 #if USE_INIT1_TCBHEAD
   _hurd_tls_init (&__init1_tcbhead, 0);
 #endif
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [RFC PATCH 12/23] aarch64: Make cpu-features definitions not Linux-specific
  2024-01-03 17:14 [RFC PATCH 00/23] aarch64-gnu port Sergey Bugaev
                   ` (10 preceding siblings ...)
  2024-01-03 17:14 ` [RFC PATCH 11/23] hurd: Initializy _dl_pagesize early in static builds Sergey Bugaev
@ 2024-01-03 17:14 ` Sergey Bugaev
  2024-01-04 22:48   ` Samuel Thibault
  2024-01-03 17:14 ` [RFC PATCH 13/23] aarch64: Add dl-procinfo Sergey Bugaev
                   ` (13 subsequent siblings)
  25 siblings, 1 reply; 50+ messages in thread
From: Sergey Bugaev @ 2024-01-03 17:14 UTC (permalink / raw)
  To: libc-alpha, bug-hurd

These describe generic AArch64 CPU features, and are not tied to a
kernel-specific way of determining them. We can share them between
the Linux and Hurd AArch64 ports.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/{unix/sysv/linux => }/aarch64/cpu-features.h | 0
 sysdeps/{unix/sysv/linux => }/aarch64/libc-start.c   | 0
 2 files changed, 0 insertions(+), 0 deletions(-)
 rename sysdeps/{unix/sysv/linux => }/aarch64/cpu-features.h (100%)
 rename sysdeps/{unix/sysv/linux => }/aarch64/libc-start.c (100%)

diff --git a/sysdeps/unix/sysv/linux/aarch64/cpu-features.h b/sysdeps/aarch64/cpu-features.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/aarch64/cpu-features.h
rename to sysdeps/aarch64/cpu-features.h
diff --git a/sysdeps/unix/sysv/linux/aarch64/libc-start.c b/sysdeps/aarch64/libc-start.c
similarity index 100%
rename from sysdeps/unix/sysv/linux/aarch64/libc-start.c
rename to sysdeps/aarch64/libc-start.c
-- 
2.43.0


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [RFC PATCH 13/23] aarch64: Add dl-procinfo
  2024-01-03 17:14 [RFC PATCH 00/23] aarch64-gnu port Sergey Bugaev
                   ` (11 preceding siblings ...)
  2024-01-03 17:14 ` [RFC PATCH 12/23] aarch64: Make cpu-features definitions not Linux-specific Sergey Bugaev
@ 2024-01-03 17:14 ` Sergey Bugaev
  2024-01-03 17:14 ` [RFC PATCH 14/23] aarch64: Allow building without kernel support for BTI Sergey Bugaev
                   ` (12 subsequent siblings)
  25 siblings, 0 replies; 50+ messages in thread
From: Sergey Bugaev @ 2024-01-03 17:14 UTC (permalink / raw)
  To: libc-alpha, bug-hurd

This is based on the Linux version, but doesn't define
GLRO(dl_aarch64_cap_flags) and implement _dl_hwcap_string (which seems
unused anyway) based on Linux HWCAP bit values.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/aarch64/dl-procinfo.c | 59 +++++++++++++++++++++++++++++++++++
 sysdeps/aarch64/dl-procinfo.h | 38 ++++++++++++++++++++++
 2 files changed, 97 insertions(+)
 create mode 100644 sysdeps/aarch64/dl-procinfo.c
 create mode 100644 sysdeps/aarch64/dl-procinfo.h

diff --git a/sysdeps/aarch64/dl-procinfo.c b/sysdeps/aarch64/dl-procinfo.c
new file mode 100644
index 00000000..5a51edbc
--- /dev/null
+++ b/sysdeps/aarch64/dl-procinfo.c
@@ -0,0 +1,59 @@
+/* Data for AArch64 version of processor capability information.
+   Copyright (C) 2017-2024 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+/* If anything should be added here check whether the size of each string
+   is still ok with the given array size.
+
+   All the #ifdefs in the definitions are quite irritating but
+   necessary if we want to avoid duplicating the information.  There
+   are three different modes:
+
+   - PROCINFO_DECL is defined.  This means we are only interested in
+     declarations.
+
+   - PROCINFO_DECL is not defined:
+
+     + if SHARED is defined the file is included in an array
+       initializer.  The .element = { ... } syntax is needed.
+
+     + if SHARED is not defined a normal array initialization is
+       needed.
+  */
+
+#ifndef PROCINFO_CLASS
+# define PROCINFO_CLASS
+#endif
+
+#if !IS_IN (ldconfig)
+# if !defined PROCINFO_DECL && defined SHARED
+  ._dl_aarch64_cpu_features
+# else
+PROCINFO_CLASS struct cpu_features _dl_aarch64_cpu_features
+# endif
+# ifndef PROCINFO_DECL
+= { }
+# endif
+# if !defined SHARED || defined PROCINFO_DECL
+;
+# else
+,
+# endif
+#endif
+
+#undef PROCINFO_DECL
+#undef PROCINFO_CLASS
diff --git a/sysdeps/aarch64/dl-procinfo.h b/sysdeps/aarch64/dl-procinfo.h
new file mode 100644
index 00000000..176de5cd
--- /dev/null
+++ b/sysdeps/aarch64/dl-procinfo.h
@@ -0,0 +1,38 @@
+/* Processor capability information handling macros - aarch64 version.
+   Copyright (C) 2017-2024 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _DL_PROCINFO_H
+#define _DL_PROCINFO_H	1
+
+#include <sys/auxv.h>
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <sysdep.h>
+
+/* We cannot provide a general printing function.  */
+#define _dl_procinfo(type, word) -1
+
+/* No additional library search paths.  */
+#define HWCAP_IMPORTANT HWCAP_ATOMICS
+
+/* There're no platforms to filter out.  */
+#define _DL_HWCAP_PLATFORM 0
+
+#define _dl_string_platform(str) (-1)
+
+#endif /* dl-procinfo.h */
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [RFC PATCH 14/23] aarch64: Allow building without kernel support for BTI
  2024-01-03 17:14 [RFC PATCH 00/23] aarch64-gnu port Sergey Bugaev
                   ` (12 preceding siblings ...)
  2024-01-03 17:14 ` [RFC PATCH 13/23] aarch64: Add dl-procinfo Sergey Bugaev
@ 2024-01-03 17:14 ` Sergey Bugaev
  2024-01-03 17:14 ` [RFC PATCH 15/23] mach: Add a basic AArch64 port Sergey Bugaev
                   ` (11 subsequent siblings)
  25 siblings, 0 replies; 50+ messages in thread
From: Sergey Bugaev @ 2024-01-03 17:14 UTC (permalink / raw)
  To: libc-alpha, bug-hurd

If PROT_BTI is not defined, turn _dl_bti_protect () into a no-op.

We intend to support BTI & PROT_BTI on the Hurd eventually, but we're
not there yet.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/aarch64/dl-bti.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/sysdeps/aarch64/dl-bti.c b/sysdeps/aarch64/dl-bti.c
index fd0d308a..4cf85630 100644
--- a/sysdeps/aarch64/dl-bti.c
+++ b/sysdeps/aarch64/dl-bti.c
@@ -28,6 +28,7 @@
 
 /* Enable BTI protection for MAP.  */
 
+#ifdef PROT_BTI
 void
 _dl_bti_protect (struct link_map *map, int fd)
 {
@@ -59,6 +60,15 @@ _dl_bti_protect (struct link_map *map, int fd)
       }
 }
 
+#else /* PROT_BTI */
+void
+_dl_bti_protect (struct link_map *map, int fd)
+{
+  (void) map;
+  (void) fd;
+}
+#endif
+
 
 static void
 bti_failed (struct link_map *l, const char *program)
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [RFC PATCH 15/23] mach: Add a basic AArch64 port
  2024-01-03 17:14 [RFC PATCH 00/23] aarch64-gnu port Sergey Bugaev
                   ` (13 preceding siblings ...)
  2024-01-03 17:14 ` [RFC PATCH 14/23] aarch64: Allow building without kernel support for BTI Sergey Bugaev
@ 2024-01-03 17:14 ` Sergey Bugaev
  2024-01-03 17:14 ` [RFC PATCH 16/23] hurd: " Sergey Bugaev
                   ` (10 subsequent siblings)
  25 siblings, 0 replies; 50+ messages in thread
From: Sergey Bugaev @ 2024-01-03 17:14 UTC (permalink / raw)
  To: libc-alpha, bug-hurd

This doesn't add any of the Hurd- or HTL-specific bits yet.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---

I don't think RPC_aarch64_get_hwcaps.c actually needs no-stack-protector
since the stack protector is not (currently?) stored in TLS on AArch64,
but let's have it there for consistency.

cpu-features.c is heavily based on its Linux version, but hooked up to
use the aarch64_get_hwcaps () RPC, invented specifically for this
purpose, instead of auxval entries, which we don't have on the Hurd.

sys/ucontext.h is mid-way between the Linux version (and x86 Hurd
versions) and the FreeBSD version, but laid out to match the Mach
aarch64_thread_state. Notably, like on FreeBSD, gregs/fpregs is an
actual struct and not an array; but the field naming is like that of
Linux and Hurd-on-x86. This unfortunately means there will be no
source-level compatibility for applications with either Linux or BSD
sys/ucontext.h.

 mach/Makefile                          |   1 +
 sysdeps/mach/aarch64/bits/mach/param.h |  24 ++++++
 sysdeps/mach/aarch64/cpu-features.c    | 109 +++++++++++++++++++++++++
 sysdeps/mach/aarch64/sys/ucontext.h    |  73 +++++++++++++++++
 sysdeps/mach/aarch64/sysdep.h          |  45 ++++++++++
 sysdeps/mach/aarch64/thread_state.h    |  44 ++++++++++
 sysdeps/mach/configure                 |   1 +
 sysdeps/mach/configure.ac              |   1 +
 8 files changed, 298 insertions(+)
 create mode 100644 sysdeps/mach/aarch64/bits/mach/param.h
 create mode 100644 sysdeps/mach/aarch64/cpu-features.c
 create mode 100644 sysdeps/mach/aarch64/sys/ucontext.h
 create mode 100644 sysdeps/mach/aarch64/sysdep.h
 create mode 100644 sysdeps/mach/aarch64/thread_state.h

diff --git a/mach/Makefile b/mach/Makefile
index 0ea3b3c1..92394951 100644
--- a/mach/Makefile
+++ b/mach/Makefile
@@ -56,6 +56,7 @@ generated =
 
 # Avoid ssp before TLS is initialized.
 CFLAGS-mach_init.o = $(no-stack-protector)
+CFLAGS-RPC_aarch64_get_hwcaps.o = $(no-stack-protector)
 CFLAGS-RPC_vm_statistics.o = $(no-stack-protector)
 CFLAGS-RPC_vm_map.o = $(no-stack-protector)
 CFLAGS-RPC_vm_protect.o = $(no-stack-protector)
diff --git a/sysdeps/mach/aarch64/bits/mach/param.h b/sysdeps/mach/aarch64/bits/mach/param.h
new file mode 100644
index 00000000..4f7b76ed
--- /dev/null
+++ b/sysdeps/mach/aarch64/bits/mach/param.h
@@ -0,0 +1,24 @@
+/* Old-style Unix parameters and limits.  aarch64 Mach version.
+   Copyright (C) 1993-2024 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _SYS_PARAM_H
+# error "Never use <bits/mach/param.h> directly; include <sys/param.h> instead."
+#endif
+
+/* There is no EXEC_PAGESIZE.  Use vm_page_size or getpagesize ()
+   or sysconf (_SC_PAGESIZE) instead.  */
diff --git a/sysdeps/mach/aarch64/cpu-features.c b/sysdeps/mach/aarch64/cpu-features.c
new file mode 100644
index 00000000..a818bf76
--- /dev/null
+++ b/sysdeps/mach/aarch64/cpu-features.c
@@ -0,0 +1,109 @@
+/* Initialize CPU feature data.  Mach aarch64 version.
+   This file is part of the GNU C Library.
+   Copyright (C) 2017-2024 Free Software Foundation, Inc.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <array_length.h>
+#include <cpu-features.h>
+#include <elf/dl-hwcaps.h>
+#include <dl-tunables-parse.h>
+#include <mach/aarch64/mach_aarch64.h>
+
+#define DCZID_DZP_MASK (1 << 4)
+#define DCZID_BS_MASK (0xf)
+
+/* The maximal set of permitted tags that the MTE random tag generation
+   instruction may use.  We exclude tag 0 because a) we want to reserve
+   that for the libc heap structures and b) because it makes it easier
+   to see when pointer have been correctly tagged.  */
+#define MTE_ALLOWED_TAGS (0xfffe << PR_MTE_TAG_SHIFT)
+
+struct cpu_list
+{
+  const char *name;
+  size_t len;
+  uint64_t midr;
+};
+
+static const struct cpu_list cpu_list[] =
+{
+#define CPU_LIST_ENTRY(__str, __num) { __str, sizeof (__str) - 1, __num }
+  CPU_LIST_ENTRY ("thunderxt88",    0x430F0A10),
+  CPU_LIST_ENTRY ("thunderx2t99",   0x431F0AF0),
+  CPU_LIST_ENTRY ("thunderx2t99p1", 0x420F5160),
+  CPU_LIST_ENTRY ("ares",           0x411FD0C0),
+  CPU_LIST_ENTRY ("emag",           0x503F0001),
+  CPU_LIST_ENTRY ("kunpeng920",     0x481FD010),
+  CPU_LIST_ENTRY ("a64fx",          0x460F0010),
+  CPU_LIST_ENTRY ("generic",        0x0),
+};
+
+static uint64_t
+get_midr_from_mcpu (const struct tunable_str_t *mcpu)
+{
+  for (int i = 0; i < array_length (cpu_list); i++)
+    if (tunable_strcmp (mcpu, cpu_list[i].name, cpu_list[i].len))
+      return cpu_list[i].midr;
+
+  return UINT64_MAX;
+}
+
+static inline void
+init_cpu_features (struct cpu_features *cpu_features)
+{
+  error_t err;
+  uint32_t hwcaps[HWCAPS_COUNT];
+  mach_msg_type_number_t hwcaps_size = HWCAPS_COUNT;
+  uint64_t midr, revidr;
+
+  err = __aarch64_get_hwcaps (__mach_host_self (), hwcaps,
+			      &hwcaps_size, &midr, &revidr);
+  assert_perror (err);
+
+  if (hwcaps_size >= 1)
+    GLRO (dl_hwcap) = hwcaps[0];
+  if (hwcaps_size >= 2)
+    GLRO (dl_hwcap2) = hwcaps[1];
+
+  cpu_features->midr_el1 = midr;
+
+  /* Get the tunable override.  */
+  const struct tunable_str_t *mcpu = TUNABLE_GET (glibc, cpu, name,
+						  struct tunable_str_t *,
+						  NULL);
+  if (mcpu != NULL)
+    {
+      midr = get_midr_from_mcpu (mcpu);
+      if (midr != UINT64_MAX)
+        cpu_features->midr_el1 = midr;
+    }
+
+  /* Check if ZVA is enabled.  */
+  unsigned dczid;
+  asm volatile ("mrs %0, dczid_el0" : "=r"(dczid));
+
+  if ((dczid & DCZID_DZP_MASK) == 0)
+    cpu_features->zva_size = 4 << (dczid & DCZID_BS_MASK);
+
+  /* Check if BTI is supported.  */
+  cpu_features->bti = GLRO (dl_hwcap2) & HWCAP2_BTI;
+
+  /* Check if SVE is supported.  */
+  cpu_features->sve = GLRO (dl_hwcap) & HWCAP_SVE;
+
+  /* Check if MOPS is supported.  */
+  cpu_features->mops = GLRO (dl_hwcap2) & HWCAP2_MOPS;
+}
diff --git a/sysdeps/mach/aarch64/sys/ucontext.h b/sysdeps/mach/aarch64/sys/ucontext.h
new file mode 100644
index 00000000..f77ebc87
--- /dev/null
+++ b/sysdeps/mach/aarch64/sys/ucontext.h
@@ -0,0 +1,73 @@
+/* Copyright (C) 1998-2024 Free Software Foundation, Inc.
+
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+/* System V/AArch64 ABI compliant context switching support.  */
+
+#ifndef _SYS_UCONTEXT_H
+#define _SYS_UCONTEXT_H	1
+
+#include <features.h>
+
+#include <bits/types/sigset_t.h>
+#include <bits/types/stack_t.h>
+
+#ifdef __USE_MISC
+# define __ctx(fld) fld
+#else
+# define __ctx(fld) __ ## fld
+#endif
+
+/* Type for general register.  */
+__extension__ typedef long long int greg_t;
+
+/* gregset_t is laid out to match mach/aarch64/thread_status.h:struct aarch64_thread_state */
+typedef struct
+{
+  greg_t __ctx(x)[31];
+  greg_t __ctx(sp);
+  greg_t __ctx(pc);
+  greg_t __ctx(tpidr_el0);
+  unsigned int __ctx(cpsr);
+} gregset_t;
+
+/* fpregset_t is laid out to match mach/aarch64/thread_status.h:struct aarch64_float_state */
+typedef struct
+{
+  __int128_t __ctx(v)[32];
+  unsigned int __ctx(fpsr);
+  unsigned int __ctx(fpcr);
+} fpregset_t;
+
+typedef struct
+{
+  gregset_t __ctx(gregs);
+  fpregset_t __ctx(fpregs);
+} mcontext_t;
+
+typedef struct ucontext_t
+{
+  unsigned long __ctx(uc_flags);
+  struct ucontext_t *uc_link;
+  stack_t uc_stack;
+  sigset_t uc_sigmask;
+  mcontext_t uc_mcontext;
+} ucontext_t;
+
+#undef __ctx
+
+#endif /* sys/ucontext.h */
diff --git a/sysdeps/mach/aarch64/sysdep.h b/sysdeps/mach/aarch64/sysdep.h
new file mode 100644
index 00000000..edf8e016
--- /dev/null
+++ b/sysdeps/mach/aarch64/sysdep.h
@@ -0,0 +1,45 @@
+/* Copyright (C) 1991-2024 Free Software Foundation, Inc.
+
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _MACH_AARCH64_SYSDEP_H
+#define _MACH_AARCH64_SYSDEP_H 1
+
+/* Defines RTLD_PRIVATE_ERRNO and USE_DL_SYSINFO.  */
+#include <dl-sysdep.h>
+#include <tls.h>
+/* Get the hwcap definitions.  */
+#include <mach/aarch64/mach_aarch64_types.h>
+
+#define LOSE asm volatile ("udf #0xdead")
+
+#define STACK_GROWTH_DOWN
+
+/* Get the machine-independent Mach definitions.  */
+#include <sysdeps/mach/sysdep.h>
+
+#undef ENTRY
+#undef ALIGN
+
+#define RETURN_TO(sp, pc, retval) \
+  asm volatile ("mov sp, %0; mov x30, %1; ret" \
+		: : "r" (sp), "r" (pc))
+
+#include <sysdeps/aarch64/sysdep.h>
+#include <sysdeps/unix/sysdep.h>
+
+#endif /* mach/aarch64/sysdep.h */
diff --git a/sysdeps/mach/aarch64/thread_state.h b/sysdeps/mach/aarch64/thread_state.h
new file mode 100644
index 00000000..5ddf9118
--- /dev/null
+++ b/sysdeps/mach/aarch64/thread_state.h
@@ -0,0 +1,44 @@
+/* Mach thread state definitions for machine-independent code.  aarch64 version.
+   Copyright (C) 1994-2024 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _MACH_AARCH64_THREAD_STATE_H
+#define _MACH_AARCH64_THREAD_STATE_H 1
+
+#include <mach/machine/thread_status.h>
+#include <libc-pointer-arith.h>
+
+#define MACHINE_NEW_THREAD_STATE_FLAVOR	AARCH64_THREAD_STATE
+#define MACHINE_THREAD_STATE_FLAVOR	AARCH64_THREAD_STATE
+#define MACHINE_THREAD_STATE_COUNT	AARCH64_THREAD_STATE_COUNT
+
+#define machine_thread_state aarch64_thread_state
+
+#define PC pc
+#define SP sp
+#define SYSRETURN x[0]
+
+struct machine_thread_all_state
+  {
+    struct aarch64_thread_state basic;
+    struct aarch64_float_state fpu;
+    int set;
+  };
+
+#include <sysdeps/mach/thread_state.h>
+
+#endif /* mach/aarch64/thread_state.h */
diff --git a/sysdeps/mach/configure b/sysdeps/mach/configure
index f15160d0..18f98967 100644
--- a/sysdeps/mach/configure
+++ b/sysdeps/mach/configure
@@ -268,6 +268,7 @@ for ifc in mach mach4 gnumach \
 	   clock clock_priv host_priv host_security ledger lock_set \
 	   processor processor_set task task_notify thread_act vm_map \
 	   memory_object memory_object_default i386/mach_i386 x86_64/mach_i386 \
+	   aarch64/mach_aarch64 \
 	   ; do
   as_ac_Header=`printf "%s\n" "ac_cv_header_mach/${ifc}.defs" | $as_tr_sh`
 ac_fn_c_check_header_preproc "$LINENO" "mach/${ifc}.defs" "$as_ac_Header"
diff --git a/sysdeps/mach/configure.ac b/sysdeps/mach/configure.ac
index 730fb25d..03e45df2 100644
--- a/sysdeps/mach/configure.ac
+++ b/sysdeps/mach/configure.ac
@@ -64,6 +64,7 @@ for ifc in mach mach4 gnumach \
 	   clock clock_priv host_priv host_security ledger lock_set \
 	   processor processor_set task task_notify thread_act vm_map \
 	   memory_object memory_object_default i386/mach_i386 x86_64/mach_i386 \
+	   aarch64/mach_aarch64 \
 	   ; do
   AC_CHECK_HEADER(mach/${ifc}.defs, [dnl
   mach_interface_list="$mach_interface_list $ifc"],, -)
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [RFC PATCH 16/23] hurd: Add a basic AArch64 port
  2024-01-03 17:14 [RFC PATCH 00/23] aarch64-gnu port Sergey Bugaev
                   ` (14 preceding siblings ...)
  2024-01-03 17:14 ` [RFC PATCH 15/23] mach: Add a basic AArch64 port Sergey Bugaev
@ 2024-01-03 17:14 ` Sergey Bugaev
  2024-01-03 17:14 ` [RFC PATCH 17/23] hurd: Implement TLS on AArch64 Sergey Bugaev
                   ` (9 subsequent siblings)
  25 siblings, 0 replies; 50+ messages in thread
From: Sergey Bugaev @ 2024-01-03 17:14 UTC (permalink / raw)
  To: libc-alpha, bug-hurd

The following commits will add TLS, HTL, and the signal bits.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---

We're using GLIBC_2.39 as the baseline shlib version.

static-start.S reproduces the same GOT pre-filling trick as on x86_64; I
have verified that this does not prevent real implementations from being
installed later.

 sysdeps/mach/hurd/aarch64/Implies        |  3 ++
 sysdeps/mach/hurd/aarch64/longjmp-ts.c   | 50 +++++++++++++++++++++++
 sysdeps/mach/hurd/aarch64/shlib-versions |  2 +
 sysdeps/mach/hurd/aarch64/static-start.S | 52 ++++++++++++++++++++++++
 sysdeps/mach/hurd/aarch64/vm_param.h     | 24 +++++++++++
 5 files changed, 131 insertions(+)
 create mode 100644 sysdeps/mach/hurd/aarch64/Implies
 create mode 100644 sysdeps/mach/hurd/aarch64/longjmp-ts.c
 create mode 100644 sysdeps/mach/hurd/aarch64/shlib-versions
 create mode 100644 sysdeps/mach/hurd/aarch64/static-start.S
 create mode 100644 sysdeps/mach/hurd/aarch64/vm_param.h

diff --git a/sysdeps/mach/hurd/aarch64/Implies b/sysdeps/mach/hurd/aarch64/Implies
new file mode 100644
index 00000000..02af165f
--- /dev/null
+++ b/sysdeps/mach/hurd/aarch64/Implies
@@ -0,0 +1,3 @@
+mach/hurd/htl
+aarch64/htl
+mach/hurd/aarch64/htl
diff --git a/sysdeps/mach/hurd/aarch64/longjmp-ts.c b/sysdeps/mach/hurd/aarch64/longjmp-ts.c
new file mode 100644
index 00000000..17507662
--- /dev/null
+++ b/sysdeps/mach/hurd/aarch64/longjmp-ts.c
@@ -0,0 +1,50 @@
+/* Perform a `longjmp' on a Mach thread_state.  aarch64 version.
+   Copyright (C) 1991-2024 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <setjmp.h>
+#include <jmpbuf-offsets.h>
+#include <mach/thread_status.h>
+
+
+/* Set up STATE to do the equivalent of `longjmp (ENV, VAL);'.  */
+
+void
+_hurd_longjmp_thread_state (void *state, jmp_buf env, int val)
+{
+  struct aarch64_thread_state *ts = state;
+
+  ts->x[19] = env[0].__jmpbuf[JB_X19];
+  ts->x[20] = env[0].__jmpbuf[JB_X20];
+  ts->x[21] = env[0].__jmpbuf[JB_X21];
+  ts->x[22] = env[0].__jmpbuf[JB_X22];
+  ts->x[23] = env[0].__jmpbuf[JB_X23];
+  ts->x[24] = env[0].__jmpbuf[JB_X24];
+  ts->x[25] = env[0].__jmpbuf[JB_X25];
+  ts->x[26] = env[0].__jmpbuf[JB_X26];
+  ts->x[27] = env[0].__jmpbuf[JB_X27];
+  ts->x[28] = env[0].__jmpbuf[JB_X28];
+  ts->x[29] = env[0].__jmpbuf[JB_X29];
+  ts->x[30] = env[0].__jmpbuf[JB_LR];
+
+  /* XXX: We're ignoring all the d[] (SIMD) registers.
+     Is that fine?  */
+
+  ts->pc = env[0].__jmpbuf[JB_LR];
+  ts->sp = _jmpbuf_sp (env[0].__jmpbuf);
+  ts->x[0] = val ?: 1;
+}
diff --git a/sysdeps/mach/hurd/aarch64/shlib-versions b/sysdeps/mach/hurd/aarch64/shlib-versions
new file mode 100644
index 00000000..8c238d6b
--- /dev/null
+++ b/sysdeps/mach/hurd/aarch64/shlib-versions
@@ -0,0 +1,2 @@
+DEFAULT			GLIBC_2.39
+ld=ld-aarch64.so.1
diff --git a/sysdeps/mach/hurd/aarch64/static-start.S b/sysdeps/mach/hurd/aarch64/static-start.S
new file mode 100644
index 00000000..7a1c19c0
--- /dev/null
+++ b/sysdeps/mach/hurd/aarch64/static-start.S
@@ -0,0 +1,52 @@
+/* Startup code for statically linked Hurd/aarch64 binaries.
+   Copyright (C) 1998-2024 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <sysdep.h>
+
+/* This is the actual entry point for statically linked aarch64-gnu executables,
+   the very first code to run in a process.  */
+
+	.text
+ENTRY(_start)
+	/* Set up the initial stack frame.  */
+	cfi_undefined (x30)
+	mov	x29, #0
+	mov	x30, #0
+
+	/* Pre-fill GOT entries for select ifunc routines that may get
+	   called during _hurd_stack_setup () with baseline implementations.  */
+	adrp	x1, __memcpy_generic
+	add	x1, x1, #:lo12:__memcpy_generic
+	adrp	x0, :got:memcpy
+	str	x1, [x0, :got_lo12:memcpy]
+
+	adrp	x1, __strlen_generic
+	add	x1, x1, #:lo12:__strlen_generic
+	adrp	x0, :got:strlen
+	str	x1, [x0, :got_lo12:strlen]
+
+	mov	x0, sp
+	bl	_hurd_stack_setup
+
+	/* Jump to the regular entry point.  */
+	mov	x0, #0
+	b	_start1
+END(_start)
+
+#define _start _start1
+#include <sysdeps/aarch64/start.S>
diff --git a/sysdeps/mach/hurd/aarch64/vm_param.h b/sysdeps/mach/hurd/aarch64/vm_param.h
new file mode 100644
index 00000000..304a2f2b
--- /dev/null
+++ b/sysdeps/mach/hurd/aarch64/vm_param.h
@@ -0,0 +1,24 @@
+/* Copyright (C) 2020-2024 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _AARCH64_VM_PARAM_H
+#define _AARCH64_VM_PARAM_H
+
+/* Arbitrary start of the brk. This is after usual binary and library mappings.  */
+#define BRK_START	0x200000000000
+
+#endif /* aarch64/vm_param.h */
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [RFC PATCH 17/23] hurd: Implement TLS on AArch64
  2024-01-03 17:14 [RFC PATCH 00/23] aarch64-gnu port Sergey Bugaev
                   ` (15 preceding siblings ...)
  2024-01-03 17:14 ` [RFC PATCH 16/23] hurd: " Sergey Bugaev
@ 2024-01-03 17:14 ` Sergey Bugaev
  2024-01-03 17:14 ` [RFC PATCH 18/23] hurd: Implement longjmp for AArch64 Sergey Bugaev
                   ` (8 subsequent siblings)
  25 siblings, 0 replies; 50+ messages in thread
From: Sergey Bugaev @ 2024-01-03 17:14 UTC (permalink / raw)
  To: libc-alpha, bug-hurd

This is using TLS_DTV_AT_TP, aka "Variant I" layout. tpidr_el0, which is
both readable and writable from userspace, is used as the thread pointer.

We store our Hurd-specific data (sigstate and reply port) *before* the
TCB head, in a tcbprehead_t structure. This tcbprehead_t structure is
also what THREAD_SELF, THREAD_GETMEM, and THREAD_SETMEM macros access.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 .../mach/hurd/aarch64/dl-tls-initialized.c    |  19 ++
 sysdeps/mach/hurd/aarch64/tls.h               | 206 ++++++++++++++++++
 2 files changed, 225 insertions(+)
 create mode 100644 sysdeps/mach/hurd/aarch64/dl-tls-initialized.c
 create mode 100644 sysdeps/mach/hurd/aarch64/tls.h

diff --git a/sysdeps/mach/hurd/aarch64/dl-tls-initialized.c b/sysdeps/mach/hurd/aarch64/dl-tls-initialized.c
new file mode 100644
index 00000000..65080099
--- /dev/null
+++ b/sysdeps/mach/hurd/aarch64/dl-tls-initialized.c
@@ -0,0 +1,19 @@
+/* Determine whether TLS is initialized, for aarch64/Hurd.
+   Copyright (C) 1995-2024 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+/* Nothing here, it's all handled in tls.h */
diff --git a/sysdeps/mach/hurd/aarch64/tls.h b/sysdeps/mach/hurd/aarch64/tls.h
new file mode 100644
index 00000000..69dfa9aa
--- /dev/null
+++ b/sysdeps/mach/hurd/aarch64/tls.h
@@ -0,0 +1,206 @@
+/* Copyright (C) 2005-2024 Free Software Foundation, Inc.
+
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _AARCH64_TLS_H
+#define _AARCH64_TLS_H	1
+
+/* Some things really need not be machine-dependent.  */
+#include <sysdeps/mach/hurd/tls.h>
+
+#include <dl-sysdep.h>
+
+#ifndef __ASSEMBLER__
+# include <assert.h>
+# include <stdbool.h>
+# include <stddef.h>
+# include <stdint.h>
+# include <dl-dtv.h>
+# include <errno.h>
+# include <thread_state.h>
+#endif /* __ASSEMBLER__ */
+
+#ifndef __ASSEMBLER__
+
+/* Get system call information.  */
+# include <sysdep.h>
+
+/* The TP points to the start of the thread blocks.  */
+# define TLS_DTV_AT_TP	1
+# define TLS_TCB_AT_TP	0
+
+typedef struct
+{
+  /* Used by the exception handling implementation in the dynamic loader.  */
+  struct rtld_catch *rtld_catch;
+
+  struct hurd_sigstate *_hurd_sigstate;
+  mach_port_t reply_port;      /* This thread's reply port.  */
+
+  int gscope_flag;
+} tcbprehead_t;
+
+typedef struct
+{
+  dtv_t *dtv;
+  void *private;
+} tcbhead_t;
+
+/* This is the size of the initial TCB.  */
+# define TLS_INIT_TCB_SIZE	sizeof (tcbhead_t)
+
+/* This is the size we need before TCB.  */
+# define TLS_PRE_TCB_SIZE	sizeof (tcbprehead_t)
+
+# define TCB_ALIGNMENT		64
+
+/* Install new dtv for current thread.  */
+# define INSTALL_NEW_DTV(dtv) \
+  (THREAD_DTV() = (dtv))
+
+/* Return the address of the dtv for the current thread.  */
+# define THREAD_DTV() \
+  (((tcbhead_t *) __builtin_thread_pointer ())->dtv)
+
+/* Return the thread descriptor for the current thread.  */
+# define THREAD_SELF \
+ ((tcbprehead_t *)__builtin_thread_pointer () - 1)
+
+/* Read member of the thread descriptor directly.  */
+# define THREAD_GETMEM(descr, member) \
+  ((descr)->member)
+
+/* Write member of the thread descriptor directly.  */
+# define THREAD_SETMEM(descr, member, value) \
+  ((descr)->member = (value))
+
+/* Return the TCB address of a thread given its state.
+   Note: this is expensive.  */
+static inline tcbprehead_t * __attribute__ ((unused))
+THREAD_TCB (thread_t thread,
+            struct machine_thread_all_state *all_state)
+{
+  int ok;
+  const struct aarch64_thread_state *state;
+  tcbhead_t *tcb;
+
+  ok = machine_get_basic_state (thread, all_state);
+  assert (ok);
+  state = &((struct machine_thread_all_state *) all_state)->basic;
+  tcb = (tcbhead_t *) state->tpidr_el0;
+  return (tcbprehead_t *) tcb - 1;
+}
+
+/* From hurd.h, reproduced here to avoid a circular include.  */
+extern thread_t __hurd_thread_self (void);
+libc_hidden_proto (__hurd_thread_self);
+
+/* Set up TLS in the new thread of a fork child, copying from the original.  */
+static inline kern_return_t __attribute__ ((unused))
+_hurd_tls_fork (thread_t child, thread_t orig,
+                struct aarch64_thread_state *state)
+{
+  error_t err;
+  struct aarch64_thread_state orig_state;
+  mach_msg_type_number_t state_count = AARCH64_THREAD_STATE_COUNT;
+
+  if (orig != __hurd_thread_self ())
+    {
+      err = __thread_get_state (orig, AARCH64_THREAD_STATE,
+				(thread_state_t) &orig_state,
+				&state_count);
+      if (err)
+        return err;
+      assert (state_count == AARCH64_THREAD_STATE_COUNT);
+      state->tpidr_el0 = orig_state.tpidr_el0;
+    }
+  else
+    state->tpidr_el0 = (uintptr_t) __builtin_thread_pointer ();
+  return 0;
+}
+
+static inline kern_return_t __attribute__ ((unused))
+_hurd_tls_new (thread_t child, tcbhead_t *tcb)
+{
+  error_t err;
+  struct aarch64_thread_state state;
+  mach_msg_type_number_t state_count = AARCH64_THREAD_STATE;
+
+  err = __thread_get_state (child, AARCH64_THREAD_STATE,
+			    (thread_state_t) &state,
+			    &state_count);
+  if (err)
+    return err;
+  assert (state_count == AARCH64_THREAD_STATE_COUNT);
+
+  state.tpidr_el0 = (uintptr_t) tcb;
+
+  return __thread_set_state (child, AARCH64_THREAD_STATE,
+			     (thread_state_t) &state,
+			     state_count);
+}
+
+# if !defined (SHARED) || IS_IN (rtld)
+#  define __LIBC_NO_TLS() __builtin_expect (!__builtin_thread_pointer (), 0)
+
+static inline bool __attribute__ ((unused))
+_hurd_tls_init (tcbhead_t *tcb, bool full)
+{
+  extern mach_port_t __hurd_reply_port0;
+
+  if (full)
+    /* Take over the reply port we've been using.  */
+    (((tcbprehead_t *) tcb) - 1)->reply_port = __hurd_reply_port0;
+
+  __asm __volatile ("msr tpidr_el0, %0" : : "r" (tcb));
+  if (full)
+    /* This port is now owned by the TCB.  */
+    __hurd_reply_port0 = MACH_PORT_NULL;
+  return true;
+}
+
+#  define TLS_INIT_TP(descr) _hurd_tls_init ((tcbhead_t *) (descr), 1)
+# else /* defined (SHARED) && !IS_IN (rtld) */
+#  define __LIBC_NO_TLS() 0
+# endif
+
+/* Global scope switch support.  */
+# define THREAD_GSCOPE_FLAG_UNUSED 0
+# define THREAD_GSCOPE_FLAG_USED   1
+# define THREAD_GSCOPE_FLAG_WAIT   2
+
+# define THREAD_GSCOPE_SET_FLAG() \
+  do									     \
+    {									     \
+      THREAD_SELF->gscope_flag = THREAD_GSCOPE_FLAG_USED;		     \
+      atomic_write_barrier ();						     \
+    }									     \
+  while (0)
+
+# define THREAD_GSCOPE_RESET_FLAG() \
+  do									     \
+    { int __flag							     \
+	= atomic_exchange_release (&THREAD_SELF->gscope_flag,		     \
+				   THREAD_GSCOPE_FLAG_UNUSED);		     \
+      if (__flag == THREAD_GSCOPE_FLAG_WAIT)				     \
+	lll_wake (THREAD_SELF->gscope_flag, LLL_PRIVATE);		     \
+    }									     \
+  while (0)
+
+# endif /* __ASSEMBLER__ */
+
+#endif	/* tls.h */
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [RFC PATCH 18/23] hurd: Implement longjmp for AArch64
  2024-01-03 17:14 [RFC PATCH 00/23] aarch64-gnu port Sergey Bugaev
                   ` (16 preceding siblings ...)
  2024-01-03 17:14 ` [RFC PATCH 17/23] hurd: Implement TLS on AArch64 Sergey Bugaev
@ 2024-01-03 17:14 ` Sergey Bugaev
  2024-01-03 17:14 ` [RFC PATCH 19/23] Add FPE_FLTIDO Sergey Bugaev
                   ` (7 subsequent siblings)
  25 siblings, 0 replies; 50+ messages in thread
From: Sergey Bugaev @ 2024-01-03 17:14 UTC (permalink / raw)
  To: libc-alpha, bug-hurd

This is based on the generic AArch64 version, but it additionally
respects and updates the Hurd sigstate.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---

This is also entirely untested. Please review carefully.

 sysdeps/aarch64/htl/tcb-offsets.sym          |   5 +
 sysdeps/mach/hurd/aarch64/Makefile           |  24 +++
 sysdeps/mach/hurd/aarch64/____longjmp_chk.S  | 173 +++++++++++++++++++
 sysdeps/mach/hurd/aarch64/__longjmp.S        | 150 ++++++++++++++++
 sysdeps/mach/hurd/aarch64/signal-defines.sym |  10 ++
 5 files changed, 362 insertions(+)
 create mode 100644 sysdeps/aarch64/htl/tcb-offsets.sym
 create mode 100644 sysdeps/mach/hurd/aarch64/Makefile
 create mode 100644 sysdeps/mach/hurd/aarch64/____longjmp_chk.S
 create mode 100644 sysdeps/mach/hurd/aarch64/__longjmp.S
 create mode 100644 sysdeps/mach/hurd/aarch64/signal-defines.sym

diff --git a/sysdeps/aarch64/htl/tcb-offsets.sym b/sysdeps/aarch64/htl/tcb-offsets.sym
new file mode 100644
index 00000000..56140780
--- /dev/null
+++ b/sysdeps/aarch64/htl/tcb-offsets.sym
@@ -0,0 +1,5 @@
+#include <sysdep.h>
+#include <tls.h>
+#include <kernel-features.h>
+
+SIGSTATE_OFFSET         offsetof (tcbprehead_t, _hurd_sigstate) - sizeof (tcbprehead_t)
diff --git a/sysdeps/mach/hurd/aarch64/Makefile b/sysdeps/mach/hurd/aarch64/Makefile
new file mode 100644
index 00000000..9210d436
--- /dev/null
+++ b/sysdeps/mach/hurd/aarch64/Makefile
@@ -0,0 +1,24 @@
+# Copyright (C) 2020-2024 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <https://www.gnu.org/licenses/>.
+
+ifeq ($(subdir),debug)
+gen-as-const-headers += signal-defines.sym
+endif
+
+ifeq ($(subdir),setjmp)
+gen-as-const-headers += signal-defines.sym
+endif
diff --git a/sysdeps/mach/hurd/aarch64/____longjmp_chk.S b/sysdeps/mach/hurd/aarch64/____longjmp_chk.S
new file mode 100644
index 00000000..90f062df
--- /dev/null
+++ b/sysdeps/mach/hurd/aarch64/____longjmp_chk.S
@@ -0,0 +1,173 @@
+/* Copyright (C) 1997-2024 Free Software Foundation, Inc.
+
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library.  If not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <asm-syntax.h>
+#include <jmpbuf-offsets.h>
+#include <pointer_guard.h>
+#include <tcb-offsets.h>
+#include <signal-defines.h>
+#include <stap-probe.h>
+#include <sysdep.h>
+
+#define SS_ONSTACK	1
+#define SS_ONSTACK_BIT	0
+
+	.section .rodata.str1.1,"aMS",%progbits,1
+	.type   longjmp_msg,%object
+longjmp_msg:
+	.string "longjmp causes uninitialized stack frame"
+	.size   longjmp_msg, .-longjmp_msg
+	.text
+
+# define CALL_FAIL						\
+	adrp	x0, longjmp_msg;				\
+	add	x0, x0, :lo12:longjmp_msg;			\
+	b	HIDDEN_JUMPTARGET(__fortify_fail)		\
+
+/* Jump to the position specified by ENV, causing the
+   setjmp call there to return VAL, or 1 if VAL is 0.
+   void __longjmp (__jmp_buf env, int val).  */
+        .text
+ENTRY(____longjmp_chk)
+	cfi_def_cfa(x0, 0)
+	cfi_offset(x19, JB_X19<<3)
+	cfi_offset(x20, JB_X20<<3)
+	cfi_offset(x21, JB_X21<<3)
+	cfi_offset(x22, JB_X22<<3)
+	cfi_offset(x23, JB_X23<<3)
+	cfi_offset(x24, JB_X24<<3)
+	cfi_offset(x25, JB_X25<<3)
+	cfi_offset(x26, JB_X26<<3)
+	cfi_offset(x27, JB_X27<<3)
+	cfi_offset(x28, JB_X28<<3)
+	cfi_offset(x29, JB_X29<<3)
+	cfi_offset(x30, JB_LR<<3)
+
+	cfi_offset( d8, JB_D8<<3)
+	cfi_offset( d9, JB_D9<<3)
+	cfi_offset(d10, JB_D10<<3)
+	cfi_offset(d11, JB_D11<<3)
+	cfi_offset(d12, JB_D12<<3)
+	cfi_offset(d13, JB_D13<<3)
+	cfi_offset(d14, JB_D14<<3)
+	cfi_offset(d15, JB_D15<<3)
+
+	PTR_ARG (0)
+
+	ldp	x19, x20, [x0, #JB_X19<<3]
+	ldp	x21, x22, [x0, #JB_X21<<3]
+	ldp	x23, x24, [x0, #JB_X23<<3]
+	ldp	x25, x26, [x0, #JB_X25<<3]
+	ldp	x27, x28, [x0, #JB_X27<<3]
+#ifdef PTR_DEMANGLE
+	ldp	x29,  x4, [x0, #JB_X29<<3]
+	PTR_DEMANGLE (30, 4, 3, 2)
+#else
+	ldp	x29, x30, [x0, #JB_X29<<3]
+#endif
+	/* longjmp probe takes 3 arguments, address of jump buffer as
+	   first argument (8@x0), return value as second argument (-4@x1),
+	   and target address (8@x30), respectively.  */
+	LIBC_PROBE (longjmp, 3, 8@x0, -4@x1, 8@x30)
+	ldp	 d8,  d9, [x0, #JB_D8<<3]
+	ldp	d10, d11, [x0, #JB_D10<<3]
+	ldp	d12, d13, [x0, #JB_D12<<3]
+	ldp	d14, d15, [x0, #JB_D14<<3]
+
+        /* Originally this was implemented with a series of
+	   .cfi_restore() directives.
+
+           The theory was that cfi_restore should revert to previous
+           frame value is the same as the current value.  In practice
+           this doesn't work, even after cfi_restore() gdb continues
+           to try to recover a previous frame value offset from x0,
+           which gets stuffed after a few more instructions.  The
+           cfi_same_value() mechanism appears to work fine.  */
+
+	cfi_same_value(x19)
+	cfi_same_value(x20)
+	cfi_same_value(x21)
+	cfi_same_value(x22)
+	cfi_same_value(x23)
+	cfi_same_value(x24)
+	cfi_same_value(x25)
+	cfi_same_value(x26)
+	cfi_same_value(x27)
+	cfi_same_value(x28)
+	cfi_same_value(x29)
+	cfi_same_value(x30)
+	cfi_same_value(d8)
+	cfi_same_value(d9)
+	cfi_same_value(d10)
+	cfi_same_value(d11)
+	cfi_same_value(d12)
+	cfi_same_value(d13)
+	cfi_same_value(d14)
+	cfi_same_value(d15)
+#ifdef PTR_DEMANGLE
+	ldr	x4, [x0, #JB_SP<<3]
+	PTR_DEMANGLE (5, 4, 3, 2)
+#else
+	ldr	x5, [x0, #JB_SP<<3]
+#endif
+
+	mrs	x3, tpidr_el0
+#if !defined (SHARED) || IS_IN (rtld)
+	cbz	x3, L(ok)	/* TLS not initialized yet */
+#endif
+	ldr	x3, [x3, #SIGSTATE_OFFSET]
+	cbz	x3, L(ok)	/* sigstate not initialized yet */
+
+	ldrb	w4, [x3, # (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_FLAGS__OFFSET)]
+	tbnz	w4, #SS_ONSTACK_BIT, L(onstack)
+	/* We haven't been using an altstack.  Jumping to a higher-address
+	   frame is always allowed, otherwise it's not allowed.  */
+	mov	x6, sp
+	cmp	x5, x6
+	b.lt	L(ok)
+
+L(fail):
+	CALL_FAIL
+
+L(onstack):
+	/* We have been using an altstack.  Was it above or below ours? */
+	ldr	x2, [x3, # (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_SP__OFFSET)]
+	cmp	x2, x5
+	b.lt	L(oks)		/* Jumping below the altstack, switch */
+	ldr	x6, [x3, # (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_SIZE__OFFSET)]
+	add	x2, x2, x6
+	cmp	x2, x5
+	b.lt	L(ok)		/* Jumping inside the altstack, do not switch */
+
+	/* Jumping above the altstack, switch */
+L(oks):
+	and	w4, w4, #~(SS_ONSTACK)
+	str	w4, [x3, # (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_FLAGS__OFFSET)]
+L(ok):
+	mov	sp, x5
+
+	/* longjmp_target probe takes 3 arguments, address of jump buffer
+	   as first argument (8@x0), return value as second argument (-4@x1),
+	   and target address (8@x30), respectively.  */
+	LIBC_PROBE (longjmp_target, 3, 8@x0, -4@x1, 8@x30)
+	cmp	x1, #0
+	mov	x0, #1
+	csel	x0, x1, x0, ne
+	/* Use br instead of ret because ret is guaranteed to mispredict */
+	br	x30
+END (____longjmp_chk)
diff --git a/sysdeps/mach/hurd/aarch64/__longjmp.S b/sysdeps/mach/hurd/aarch64/__longjmp.S
new file mode 100644
index 00000000..c9f2e1ce
--- /dev/null
+++ b/sysdeps/mach/hurd/aarch64/__longjmp.S
@@ -0,0 +1,150 @@
+/* Copyright (C) 1997-2024 Free Software Foundation, Inc.
+
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library.  If not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <asm-syntax.h>
+#include <jmpbuf-offsets.h>
+#include <pointer_guard.h>
+#include <tcb-offsets.h>
+#include <signal-defines.h>
+#include <stap-probe.h>
+#include <sysdep.h>
+
+#define SS_ONSTACK	1
+#define SS_ONSTACK_BIT	0
+
+/* __longjmp(jmpbuf, val) */
+
+ENTRY (__longjmp)
+	cfi_def_cfa(x0, 0)
+	cfi_offset(x19, JB_X19<<3)
+	cfi_offset(x20, JB_X20<<3)
+	cfi_offset(x21, JB_X21<<3)
+	cfi_offset(x22, JB_X22<<3)
+	cfi_offset(x23, JB_X23<<3)
+	cfi_offset(x24, JB_X24<<3)
+	cfi_offset(x25, JB_X25<<3)
+	cfi_offset(x26, JB_X26<<3)
+	cfi_offset(x27, JB_X27<<3)
+	cfi_offset(x28, JB_X28<<3)
+	cfi_offset(x29, JB_X29<<3)
+	cfi_offset(x30, JB_LR<<3)
+
+	cfi_offset( d8, JB_D8<<3)
+	cfi_offset( d9, JB_D9<<3)
+	cfi_offset(d10, JB_D10<<3)
+	cfi_offset(d11, JB_D11<<3)
+	cfi_offset(d12, JB_D12<<3)
+	cfi_offset(d13, JB_D13<<3)
+	cfi_offset(d14, JB_D14<<3)
+	cfi_offset(d15, JB_D15<<3)
+
+	PTR_ARG (0)
+
+	ldp	x19, x20, [x0, #JB_X19<<3]
+	ldp	x21, x22, [x0, #JB_X21<<3]
+	ldp	x23, x24, [x0, #JB_X23<<3]
+	ldp	x25, x26, [x0, #JB_X25<<3]
+	ldp	x27, x28, [x0, #JB_X27<<3]
+#ifdef PTR_DEMANGLE
+	ldp	x29,  x4, [x0, #JB_X29<<3]
+	PTR_DEMANGLE (30, 4, 3, 2)
+#else
+	ldp	x29, x30, [x0, #JB_X29<<3]
+#endif
+	/* longjmp probe takes 3 arguments, address of jump buffer as
+	   first argument (8@x0), return value as second argument (-4@x1),
+	   and target address (8@x30), respectively.  */
+	LIBC_PROBE (longjmp, 3, 8@x0, -4@x1, 8@x30)
+	ldp	 d8,  d9, [x0, #JB_D8<<3]
+	ldp	d10, d11, [x0, #JB_D10<<3]
+	ldp	d12, d13, [x0, #JB_D12<<3]
+	ldp	d14, d15, [x0, #JB_D14<<3]
+
+        /* Originally this was implemented with a series of
+	   .cfi_restore() directives.
+
+           The theory was that cfi_restore should revert to previous
+           frame value is the same as the current value.  In practice
+           this doesn't work, even after cfi_restore() gdb continues
+           to try to recover a previous frame value offset from x0,
+           which gets stuffed after a few more instructions.  The
+           cfi_same_value() mechanism appears to work fine.  */
+
+	cfi_same_value(x19)
+	cfi_same_value(x20)
+	cfi_same_value(x21)
+	cfi_same_value(x22)
+	cfi_same_value(x23)
+	cfi_same_value(x24)
+	cfi_same_value(x25)
+	cfi_same_value(x26)
+	cfi_same_value(x27)
+	cfi_same_value(x28)
+	cfi_same_value(x29)
+	cfi_same_value(x30)
+	cfi_same_value(d8)
+	cfi_same_value(d9)
+	cfi_same_value(d10)
+	cfi_same_value(d11)
+	cfi_same_value(d12)
+	cfi_same_value(d13)
+	cfi_same_value(d14)
+	cfi_same_value(d15)
+#ifdef PTR_DEMANGLE
+	ldr	x4, [x0, #JB_SP<<3]
+	PTR_DEMANGLE (5, 4, 3, 2)
+#else
+	ldr	x5, [x0, #JB_SP<<3]
+#endif
+
+	mrs	x3, tpidr_el0
+#if !defined (SHARED) || IS_IN (rtld)
+	cbz	x3, L(ok)	/* TLS not initialized yet */
+#endif
+	ldr	x3, [x3, #SIGSTATE_OFFSET]
+	cbz	x3, L(ok)	/* sigstate not initialized yet */
+	/* If we haven't been using an altstack, don't switch */
+	ldrb	w4, [x3, # (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_FLAGS__OFFSET)]
+	tbz	w4, #SS_ONSTACK_BIT, L(ok)
+
+	/* We have been using an altstack.  Was it above or below ours? */
+	ldr	x2, [x3, # (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_SP__OFFSET)]
+	cmp	x2, x5
+	b.lt	L(oks)		/* Jumping below the altstack, switch */
+	ldr	x6, [x3, # (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_SIZE__OFFSET)]
+	add	x2, x2, x6
+	cmp	x2, x5
+	b.lt	L(ok)		/* Jumping inside the altstack, do not switch */
+
+	/* Jumping above the altstack, switch */
+L(oks):
+	and	w4, w4, #~(SS_ONSTACK)
+	str	w4, [x3, # (HURD_SIGSTATE__SIGALTSTACK__OFFSET + SIGALTSTACK__SS_FLAGS__OFFSET)]
+L(ok):
+	mov	sp, x5
+
+	/* longjmp_target probe takes 3 arguments, address of jump buffer
+	   as first argument (8@x0), return value as second argument (-4@x1),
+	   and target address (8@x30), respectively.  */
+	LIBC_PROBE (longjmp_target, 3, 8@x0, -4@x1, 8@x30)
+	cmp	x1, #0
+	mov	x0, #1
+	csel	x0, x1, x0, ne
+	/* Use br instead of ret because ret is guaranteed to mispredict */
+	br	x30
+END (__longjmp)
diff --git a/sysdeps/mach/hurd/aarch64/signal-defines.sym b/sysdeps/mach/hurd/aarch64/signal-defines.sym
new file mode 100644
index 00000000..e42bbbe0
--- /dev/null
+++ b/sysdeps/mach/hurd/aarch64/signal-defines.sym
@@ -0,0 +1,10 @@
+#include <hurd/signal.h>
+#include <signal.h>
+
+--
+
+HURD_SIGSTATE__SIGALTSTACK__OFFSET	offsetof(struct hurd_sigstate, sigaltstack)
+
+SIGALTSTACK__SS_SP__OFFSET		offsetof(stack_t, ss_sp)
+SIGALTSTACK__SS_SIZE__OFFSET		offsetof(stack_t, ss_size)
+SIGALTSTACK__SS_FLAGS__OFFSET		offsetof(stack_t, ss_flags)
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [RFC PATCH 19/23] Add FPE_FLTIDO
  2024-01-03 17:14 [RFC PATCH 00/23] aarch64-gnu port Sergey Bugaev
                   ` (17 preceding siblings ...)
  2024-01-03 17:14 ` [RFC PATCH 18/23] hurd: Implement longjmp for AArch64 Sergey Bugaev
@ 2024-01-03 17:14 ` Sergey Bugaev
  2024-01-03 17:14 ` [RFC PATCH 20/23] hurd: Add an AArch64 signal implementation Sergey Bugaev
                   ` (6 subsequent siblings)
  25 siblings, 0 replies; 50+ messages in thread
From: Sergey Bugaev @ 2024-01-03 17:14 UTC (permalink / raw)
  To: libc-alpha, bug-hurd

This is a new si_code value for the SIGFPE signal that has been added
to FreeBSD, and is also going to be used on the Hurd.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 bits/siginfo-consts.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/bits/siginfo-consts.h b/bits/siginfo-consts.h
index 4eef775e..362a06a6 100644
--- a/bits/siginfo-consts.h
+++ b/bits/siginfo-consts.h
@@ -75,8 +75,10 @@ enum
 #  define FPE_FLTRES	FPE_FLTRES
   FPE_FLTINV,			/* Floating point invalid operation.  */
 #  define FPE_FLTINV	FPE_FLTINV
-  FPE_FLTSUB			/* Subscript out of range.  */
+  FPE_FLTSUB,			/* Subscript out of range.  */
 #  define FPE_FLTSUB	FPE_FLTSUB
+  FPE_FLTIDO			/* Input denormal operation.  */
+#  define FPE_FLTIDO	FPE_FLTIDO
 };
 
 /* `si_code' values for SIGSEGV signal.  */
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [RFC PATCH 20/23] hurd: Add an AArch64 signal implementation
  2024-01-03 17:14 [RFC PATCH 00/23] aarch64-gnu port Sergey Bugaev
                   ` (18 preceding siblings ...)
  2024-01-03 17:14 ` [RFC PATCH 19/23] Add FPE_FLTIDO Sergey Bugaev
@ 2024-01-03 17:14 ` Sergey Bugaev
  2024-01-03 17:14 ` [RFC PATCH 21/23] htl: Implement some support for TLS_DTV_AT_TP Sergey Bugaev
                   ` (5 subsequent siblings)
  25 siblings, 0 replies; 50+ messages in thread
From: Sergey Bugaev @ 2024-01-03 17:14 UTC (permalink / raw)
  To: libc-alpha, bug-hurd

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---

This is somewhat complete, but untested. Notably absent is a
sigreturn () implementation, which would depend on whether we manage to
make thread_set_state () able to operate on the calling thread.

I didn't bother too much with exception2signal () because the details of
which exceptions we're going to be able to detect (and how to map them
properly) are not quite clear yet.

 sysdeps/mach/hurd/aarch64/bits/sigcontext.h |  96 ++++++
 sysdeps/mach/hurd/aarch64/exc2signal.c      | 119 +++++++
 sysdeps/mach/hurd/aarch64/intr-msg.h        | 123 ++++++++
 sysdeps/mach/hurd/aarch64/trampoline.c      | 327 ++++++++++++++++++++
 4 files changed, 665 insertions(+)
 create mode 100644 sysdeps/mach/hurd/aarch64/bits/sigcontext.h
 create mode 100644 sysdeps/mach/hurd/aarch64/exc2signal.c
 create mode 100644 sysdeps/mach/hurd/aarch64/intr-msg.h
 create mode 100644 sysdeps/mach/hurd/aarch64/trampoline.c

diff --git a/sysdeps/mach/hurd/aarch64/bits/sigcontext.h b/sysdeps/mach/hurd/aarch64/bits/sigcontext.h
new file mode 100644
index 00000000..1e3b8b71
--- /dev/null
+++ b/sysdeps/mach/hurd/aarch64/bits/sigcontext.h
@@ -0,0 +1,96 @@
+/* Machine-dependent signal context structure for GNU Hurd.  aarch64 version.
+   Copyright (C) 1991-2024 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _BITS_SIGCONTEXT_H
+#define _BITS_SIGCONTEXT_H 1
+
+#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
+# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
+#endif
+
+/* Signal handlers are actually called:
+   void handler (int sig, int code, struct sigcontext *scp);  */
+
+#include <bits/types/__sigset_t.h>
+#include <mach/machine/fp_reg.h>
+
+/* State of this thread when the signal was taken.  */
+struct sigcontext
+  {
+    /* These first members are machine-independent.  */
+
+    int sc_onstack;		/* Nonzero if running on sigstack.  */
+    __sigset_t sc_mask;		/* Blocked signals to restore.  */
+
+    /* MiG reply port this thread is using.  */
+    unsigned int sc_reply_port;
+
+    /* Port this thread is doing an interruptible RPC on.  */
+    unsigned int sc_intr_port;
+
+    /* Error code associated with this signal (interpreted as `error_t').  */
+    int sc_error;
+
+    /* Make sure the below members are properly aligned, and not packed
+       together with sc_error -- otherwise the layout won't match that of
+       aarch64_thread_state.  */
+    int sc_pad1;
+
+    /* All following members are machine-dependent.  The rest of this
+       structure is written to be laid out identically to:
+       {
+	 struct aarch64_thread_state basic;
+	 struct aarch64_float_state fpu;
+       }
+       trampoline.c knows this, so it must be changed if this changes.  */
+
+#define sc_aarch64_thread_state sc_x[0] /* Beginning of correspondence.  */
+    long sc_x[31];
+    long sc_sp;
+    long sc_pc;
+    long sc_tpidr_el0;
+    int sc_cpsr;
+
+#define sc_aarch64_float_state sc_v[0]
+    __int128_t sc_v[32];
+    int sc_fpsr;
+    int sc_fpcr;
+  };
+
+/* Traditional BSD names for some members.  */
+#define sc_fp	sc_x[29]	/* Frame pointer.  */
+#define sc_ps	sc_cpsr
+
+
+/* The deprecated sigcode values below are passed as an extra, non-portable
+   argument to regular signal handlers.  You should use SA_SIGINFO handlers
+   instead, which use the standard POSIX signal codes.  */
+
+/* Codes for SIGFPE.  */
+#define FPE_INTOVF_TRAP		0x1 /* integer overflow */
+#define FPE_INTDIV_FAULT	0x2 /* integer divide by zero */
+#define FPE_FLTOVF_FAULT	0x3 /* floating overflow */
+#define FPE_FLTDIV_FAULT	0x4 /* floating divide by zero */
+#define FPE_FLTUND_FAULT	0x5 /* floating underflow */
+#define FPE_SUBRNG_FAULT	0x7 /* BOUNDS instruction failed */
+#define FPE_FLTDNR_FAULT	0x8 /* denormalized operand */
+#define FPE_FLTINX_FAULT	0x9 /* floating loss of precision */
+#define FPE_EMERR_FAULT		0xa /* mysterious emulation error 33 */
+#define FPE_EMBND_FAULT		0xb /* emulation BOUNDS instruction failed */
+
+#endif /* bits/sigcontext.h */
diff --git a/sysdeps/mach/hurd/aarch64/exc2signal.c b/sysdeps/mach/hurd/aarch64/exc2signal.c
new file mode 100644
index 00000000..c260b496
--- /dev/null
+++ b/sysdeps/mach/hurd/aarch64/exc2signal.c
@@ -0,0 +1,119 @@
+/* Translate Mach exception codes into signal numbers.  aarch64 version.
+   Copyright (C) 1991-2024 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <hurd.h>
+#include <hurd/signal.h>
+#include <mach/exception.h>
+
+/* Translate the Mach exception codes, as received in an `exception_raise' RPC,
+   into a signal number and signal subcode.  */
+
+static void
+exception2signal (struct hurd_signal_detail *detail, int *signo, int posix)
+{
+  detail->error = 0;
+
+  switch (detail->exc)
+    {
+    default:
+      *signo = SIGIOT;
+      detail->code = detail->exc;
+      break;
+
+    case EXC_BAD_ACCESS:
+      switch (detail->exc_code)
+        {
+	case KERN_INVALID_ADDRESS:
+	case KERN_MEMORY_FAILURE:
+	  *signo = SIGSEGV;
+	  detail->code = posix ? SEGV_MAPERR : detail->exc_subcode;
+	  break;
+
+	case KERN_PROTECTION_FAILURE:
+	case KERN_WRITE_PROTECTION_FAILURE:
+	  *signo = SIGSEGV;
+	  detail->code = posix ? SEGV_ACCERR : detail->exc_subcode;
+	  break;
+
+	default:
+	  *signo = SIGBUS;
+	  detail->code = posix ? BUS_ADRERR : detail->exc_subcode;
+	  break;
+	}
+      detail->error = detail->exc_code;
+      break;
+
+    case EXC_BAD_INSTRUCTION:
+      *signo = SIGILL;
+      detail->code = posix ? ILL_ILLOPC : 0;
+      break;
+
+    case EXC_ARITHMETIC:
+      *signo = SIGFPE;
+      switch (detail->exc_code)
+	{
+	case EXC_AARCH64_FP_ID:
+	  detail->code = posix ? FPE_FLTIDO : 0;
+	case EXC_AARCH64_FP_IX:
+	  detail->code = posix ? FPE_FLTRES : FPE_FLTINX_FAULT;
+	  break;
+	case EXC_AARCH64_FP_UF:
+	  detail->code = posix ? FPE_FLTUND : FPE_FLTDNR_FAULT;
+	  break;
+	case EXC_AARCH64_FP_OF:
+	  detail->code = posix ? FPE_FLTOVF : FPE_FLTOVF_FAULT;
+	  break;
+	case EXC_AARCH64_FP_DZ:
+	  detail->code = posix ? FPE_FLTDIV : FPE_FLTDIV_FAULT;
+	  break;
+	case EXC_AARCH64_FP_IO:
+	  /* NB: We used to send SIGILL here but we can't distinguish
+	     POSIX vs. legacy with respect to what signal we send.  */
+	  detail->code = posix ? FPE_FLTINV : 0 /*ILL_FPEOPR_FAULT*/;
+	  break;
+	default:
+	  detail->code = 0;
+	}
+      break;
+
+    case EXC_EMULATION:
+    case EXC_SOFTWARE:
+      *signo = SIGEMT;
+      detail->code = 0;
+      break;
+
+
+    case EXC_BREAKPOINT:
+      *signo = SIGTRAP;
+      detail->code = posix ? TRAP_BRKPT : 0;
+      break;
+    }
+}
+libc_hidden_def (_hurd_exception2signal)
+
+void
+_hurd_exception2signal (struct hurd_signal_detail *detail, int *signo)
+{
+  exception2signal (detail, signo, 1);
+}
+
+void
+_hurd_exception2signal_legacy (struct hurd_signal_detail *detail, int *signo)
+{
+  exception2signal (detail, signo, 0);
+}
diff --git a/sysdeps/mach/hurd/aarch64/intr-msg.h b/sysdeps/mach/hurd/aarch64/intr-msg.h
new file mode 100644
index 00000000..fd2e9092
--- /dev/null
+++ b/sysdeps/mach/hurd/aarch64/intr-msg.h
@@ -0,0 +1,123 @@
+/* Machine-dependent details of interruptible RPC messaging.  aarch64 version.
+   Copyright (C) 1995-2024 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+
+/* Note that we must mark OPTION and TIMEOUT as outputs of this operation,
+   to indicate that the signal thread might mutate them as part
+   of sending us to a signal handler.  */
+
+#define INTR_MSG_TRAP(msg, option, send_size, rcv_size, rcv_name, timeout, notify, cancel_p, intr_port_p) \
+({									      \
+  register uintptr_t /* error_t */ err asm ("x0");			      \
+  register uintptr_t option_x1 asm ("x1") = option;			      \
+  register uintptr_t send_size_x2 asm ("x2") = send_size;		      \
+  register uintptr_t rcv_size_x3 asm ("x3") = rcv_size;			      \
+  register uintptr_t rcv_name_x4 asm ("x4") = rcv_name;			      \
+  register uintptr_t timeout_x5 asm ("x5") = timeout;			      \
+  register uintptr_t notify_x6 asm ("x6") = notify;			      \
+  register void *msg_x9 asm ("x9") = msg;  /* used by trampoline.c */	      \
+  asm volatile ("\n"							      \
+       ".globl _hurd_intr_rpc_msg_about_to\n"				      \
+       ".globl _hurd_intr_rpc_msg_setup_done\n"				      \
+       ".globl _hurd_intr_rpc_msg_in_trap\n"				      \
+       /* Clear x0 before we do the check for cancel below.  This is to
+          detect x0 being set to non-zero (actually MACH_SEND_INTERRUPTED)
+          from the outside (namely, _hurdsig_abort_rpcs), which signals us
+          to skip the trap we were about to enter.  */			      \
+       "	mov %[err], #0\n"					      \
+       "_hurd_intr_rpc_msg_about_to:\n"					      \
+       /* We need to make a last check of cancel, in case we got interrupted
+          right before _hurd_intr_rpc_msg_about_to.  */			      \
+       "	ldr w8, %[cancel]\n"					      \
+       "	cbz w8, _hurd_intr_rpc_msg_do\n"			      \
+       /* We got interrupted, note so and return EINTR.  */		      \
+       "	str wzr, %[intr_port]\n"				      \
+       "	mov %[err], %[eintr_lo]\n"				      \
+       "	movk %[err], %[eintr_hi], lsl 16\n"			      \
+       "	b _hurd_intr_rpc_msg_sp_restored\n"			      \
+       "_hurd_intr_rpc_msg_do:\n"					      \
+       /* Ok, prepare the mach_msg_trap arguments.  We pass all the 7 args
+          in registers.  */						      \
+       "_hurd_intr_rpc_msg_setup_done:\n"				      \
+       /* From here on, it is safe to make us jump over the syscall.  Now
+          check if we have been told to skip the syscall while running
+          the above.  */						      \
+       "	cbnz %[err], _hurd_intr_rpc_msg_in_trap\n"		      \
+       /* Do the actual syscall.  */					      \
+       "	mov %[err], %[msg]\n"					      \
+       "	mov x8, #-25\n"						      \
+       "_hurd_intr_rpc_msg_do_trap:\n"					      \
+       "	svc #0\n" /* status in %[err] */			      \
+       "_hurd_intr_rpc_msg_in_trap:\n"					      \
+       "_hurd_intr_rpc_msg_sp_restored:\n"				      \
+       : [err] "=r" (err), "+r" (option_x1),				      \
+         [intr_port] "=m" (*intr_port_p),				      \
+         "+r" (timeout_x5)						      \
+       : [msg] "r" (msg_x9), "r" (send_size_x2), "r" (rcv_size_x3),	      \
+         "r" (rcv_name_x4), "r" (notify_x6),				      \
+         [cancel] "m" (*cancel_p),					      \
+         [eintr_lo] "i" (EINTR & 0xffff), [eintr_hi] "i" (EINTR >> 16));      \
+  option = option_x1;							      \
+  timeout = timeout_x5;							      \
+  err;									      \
+})
+\f
+#include "hurdfault.h"
+
+/* This cannot be an inline function because it calls setjmp.  */
+#define SYSCALL_EXAMINE(state, callno)					      \
+({									      \
+  int result;								      \
+  unsigned int *p = (unsigned int *) (state)->pc - 4;			      \
+  if (_hurdsig_catch_memory_fault (p))					      \
+    return 0;								      \
+  if (result = (*p == 0xd4000001))					      \
+    /* The PC is just after a "svc #0" instruction.
+       This is a system call in progress; x8 holds the call number.  */	      \
+    *(callno) = (state)->x[8];						      \
+  _hurdsig_end_catch_fault ();						      \
+  result;								      \
+})
+
+
+/* This cannot be an inline function because it calls setjmp.  */
+#define MSG_EXAMINE(state, msgid, rcvname, send_name, opt, tmout)	      \
+({									      \
+  int ret = 0;								      \
+  const struct machine_thread_state *s = (state);			      \
+  const mach_msg_header_t *msg = (const void *) s->x[0];		      \
+  *(opt) = s->x[1];							      \
+  *(rcvname) = s->x[4];							      \
+  *(tmout) = s->x[5];							      \
+  if (msg == 0)								      \
+    {									      \
+      *(send_name) = MACH_PORT_NULL;					      \
+      *(msgid) = 0;							      \
+    }									      \
+  else									      \
+    {									      \
+      ret = _hurdsig_catch_memory_fault (msg) ? -1 : 0;			      \
+      if (ret == 0)							      \
+        {								      \
+          *(send_name) = msg->msgh_remote_port;				      \
+          *(msgid) = msg->msgh_id;					      \
+          _hurdsig_end_catch_fault ();					      \
+        }								      \
+    }									      \
+  ret;									      \
+})
diff --git a/sysdeps/mach/hurd/aarch64/trampoline.c b/sysdeps/mach/hurd/aarch64/trampoline.c
new file mode 100644
index 00000000..864175c6
--- /dev/null
+++ b/sysdeps/mach/hurd/aarch64/trampoline.c
@@ -0,0 +1,327 @@
+/* Set thread_state for sighandler, and sigcontext to recover.  aarch64 version.
+   Copyright (C) 1994-2024 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <hurd/signal.h>
+#include <hurd/userlink.h>
+#include <thread_state.h>
+#include <mach/exception.h>
+//#include <mach/machine/eflags.h>
+#include <assert.h>
+#include <errno.h>
+#include "hurdfault.h"
+//#include <intr-msg.h>
+#include <sys/ucontext.h>
+
+
+/* Fill in a siginfo_t structure for SA_SIGINFO-enabled handlers.  */
+static void fill_siginfo (siginfo_t *si, int signo,
+			  const struct hurd_signal_detail *detail,
+			  const struct machine_thread_all_state *state)
+{
+  si->si_signo = signo;
+  si->si_errno = detail->error;
+  si->si_code = detail->code;
+
+  /* XXX We would need a protocol change for sig_post to include
+   * this information.  */
+  si->si_pid = -1;
+  si->si_uid = -1;
+
+  /* Address of the faulting instruction or memory access.  */
+  if (detail->exc == EXC_BAD_ACCESS)
+    si->si_addr = (void *) detail->exc_subcode;
+  else
+    si->si_addr = (void *) state->basic.pc;
+
+  /* XXX On SIGCHLD, this should be the exit status of the child
+   * process.  We would need a protocol change for the proc server
+   * to send this information along with the signal.  */
+  si->si_status = 0;
+
+  si->si_band = 0;              /* SIGPOLL is not supported yet.  */
+  si->si_value.sival_int = 0;   /* sigqueue() is not supported yet.  */
+}
+
+/* Fill in a ucontext_t structure SA_SIGINFO-enabled handlers.  */
+static void fill_ucontext (ucontext_t *uc, const struct sigcontext *sc)
+{
+  uc->uc_flags = 0;
+  uc->uc_link = NULL;
+  uc->uc_sigmask = sc->sc_mask;
+  uc->uc_stack.ss_sp = (__ptr_t) sc->sc_sp;
+  uc->uc_stack.ss_size = 0;
+  uc->uc_stack.ss_flags = 0;
+
+  /* Registers.  */
+  memcpy (&uc->uc_mcontext.gregs.x[0], &sc->sc_x[0],
+	  (const unsigned char *) &sc->sc_aarch64_float_state
+          - (const unsigned char *) &sc->sc_aarch64_thread_state);
+  /* XXX FPU state.  */
+  memset (&uc->uc_mcontext.fpregs, 0, sizeof (fpregset_t));
+}
+
+struct sigcontext *
+_hurd_setup_sighandler (struct hurd_sigstate *ss, const struct sigaction *action,
+			__sighandler_t handler,
+			int signo, struct hurd_signal_detail *detail,
+			int rpc_wait,
+			struct machine_thread_all_state *state)
+{
+  void trampoline (void) attribute_hidden;
+  void rpc_wait_trampoline (void) attribute_hidden;
+  void *sigsp;
+  struct sigcontext *scp;
+  struct
+    {
+      union
+        {
+          int signo;
+          /* Make sure signo takes up a pointer-sized slot on the stack.
+             (This should already be the case considering the siginfop
+             pointer below, but better be explicit.)  */
+          void *_pointer_sized;
+        };
+      union
+	{
+	  /* Extra arguments for traditional signal handlers */
+	  struct
+	    {
+	      long int sigcode;
+	      struct sigcontext *scp;       /* Points to ctx, below.  */
+	    } legacy;
+
+	  /* Extra arguments for SA_SIGINFO handlers */
+	  struct
+	    {
+	      siginfo_t *siginfop;          /* Points to siginfo, below.  */
+	      ucontext_t *uctxp;            /* Points to uctx, below.  */
+	    } posix;
+	};
+
+      void *_pad;
+      void *sigreturn_addr;
+      struct sigcontext *return_scp; /* Argument to sigreturn.  */
+
+      /* NB: sigreturn assumes link is next to ctx.  */
+      struct sigcontext ctx;
+      struct hurd_userlink link;
+      ucontext_t ucontext;
+      siginfo_t siginfo;
+    } *stackframe;
+
+  _Static_assert (offsetof (typeof (*stackframe), sigreturn_addr) % 16 == 0,
+                  "sigreturn_addr must be 16-byte aligned");
+  _Static_assert (sizeof (*stackframe) % 16 == 0,
+		  "stackframe size must be a multiple of 16");
+
+  if (ss->context)
+    {
+      /* We have a previous sigcontext that sigreturn was about
+	 to restore when another signal arrived.  We will just base
+	 our setup on that.  */
+      if (! _hurdsig_catch_memory_fault (ss->context))
+	{
+	  memcpy (&state->basic, &ss->context->sc_aarch64_thread_state,
+		  sizeof (state->basic));
+	  memcpy (&state->fpu, &ss->context->sc_aarch64_float_state,
+		  sizeof (state->fpu));
+	  state->set |= (1 << AARCH64_THREAD_STATE) | (1 << AARCH64_FLOAT_STATE);
+	}
+    }
+
+  if (! machine_get_basic_state (ss->thread, state))
+    return NULL;
+
+  if ((action->sa_flags & SA_ONSTACK)
+      && !(ss->sigaltstack.ss_flags & (SS_DISABLE|SS_ONSTACK)))
+    {
+      sigsp = ss->sigaltstack.ss_sp + ss->sigaltstack.ss_size;
+      ss->sigaltstack.ss_flags |= SS_ONSTACK;
+    }
+  else
+    /* No red zone on aarch64-gnu.  */
+    sigsp = (char *) state->basic.sp;
+
+  /* Push the arguments to call `trampoline' on the stack.  */
+  sigsp -= sizeof (*stackframe);
+  stackframe = sigsp;
+
+  if (_hurdsig_catch_memory_fault (stackframe))
+    {
+      /* We got a fault trying to write the stack frame.
+	 We cannot set up the signal handler.
+	 Returning NULL tells our caller, who will nuke us with a SIGILL.  */
+      return NULL;
+    }
+  else
+    {
+      int ok;
+
+      extern void _hurdsig_longjmp_from_handler (void *, jmp_buf, int);
+
+      /* Add a link to the thread's active-resources list.  We mark this as
+	 the only user of the "resource", so the cleanup function will be
+	 called by any longjmp which is unwinding past the signal frame.
+	 The cleanup function (in sigunwind.c) will make sure that all the
+	 appropriate cleanups done by sigreturn are taken care of.  */
+      stackframe->link.cleanup = &_hurdsig_longjmp_from_handler;
+      stackframe->link.cleanup_data = &stackframe->ctx;
+      stackframe->link.resource.next = NULL;
+      stackframe->link.resource.prevp = NULL;
+      stackframe->link.thread.next = ss->active_resources;
+      stackframe->link.thread.prevp = &ss->active_resources;
+      if (stackframe->link.thread.next)
+	stackframe->link.thread.next->thread.prevp
+	  = &stackframe->link.thread.next;
+      ss->active_resources = &stackframe->link;
+
+      /* Set up the sigcontext from the current state of the thread.  */
+
+      scp = &stackframe->ctx;
+      scp->sc_onstack = ss->sigaltstack.ss_flags & SS_ONSTACK ? 1 : 0;
+
+      /* struct sigcontext is laid out so that starting at sc_x[0] mimics a
+	 struct aarch64_thread_state.  */
+      _Static_assert (offsetof (struct sigcontext, sc_aarch64_thread_state)
+		      % __alignof__ (struct aarch64_thread_state) == 0,
+		      "sc_aarch64_thread_state layout mismatch");
+      memcpy (&scp->sc_aarch64_thread_state,
+	      &state->basic, sizeof (state->basic));
+
+      /* struct sigcontext is laid out so that starting at sc_v[0] mimics
+	 a struct aarch64_float_state.  */
+      _Static_assert (offsetof (struct sigcontext, sc_aarch64_float_state)
+		      % __alignof__ (struct aarch64_float_state) == 0,
+		      "sc_aarch64_float_state layout mismatch");
+      ok = machine_get_state (ss->thread, state, AARCH64_FLOAT_STATE,
+			      &state->fpu, &scp->sc_aarch64_float_state,
+			      sizeof (state->fpu));
+
+      /* Set up the arguments for the signal handler.  */
+      stackframe->signo = signo;
+      if (action->sa_flags & SA_SIGINFO)
+	{
+	  stackframe->posix.siginfop = &stackframe->siginfo;
+	  stackframe->posix.uctxp = &stackframe->ucontext;
+	  fill_siginfo (&stackframe->siginfo, signo, detail, state);
+	  fill_ucontext (&stackframe->ucontext, scp);
+	}
+      else
+	{
+	  if (detail->exc)
+	    {
+	      int nsigno;
+	      _hurd_exception2signal_legacy (detail, &nsigno);
+	      assert (nsigno == signo);
+	    }
+	  else
+	    detail->code = 0;
+
+	  stackframe->legacy.sigcode = detail->code;
+	  stackframe->legacy.scp = &stackframe->ctx;
+	}
+
+      /* Set up the bottom of the stack.  */
+      stackframe->sigreturn_addr = &__sigreturn;
+      stackframe->return_scp = &stackframe->ctx;
+
+      _hurdsig_end_catch_fault ();
+
+      if (! ok)
+	return NULL;
+    }
+
+  /* Modify the thread state to call the trampoline code on the new stack.  */
+  state->basic.sp = (uintptr_t) sigsp;
+
+  if (rpc_wait)
+    {
+      /* The signalee thread was blocked in a mach_msg_trap system call,
+         still waiting for a reply.  We will have it run the special
+         trampoline code which retries the message receive before running
+         the signal handler.
+
+         To do this we change the OPTION argument (in x1) to enable only
+         message reception, since the request message has already been
+         sent.  */
+
+      assert (state->basic.x[1] & MACH_RCV_MSG);
+      /* Disable the message-send, since it has already completed.  The
+         calls we retry need only wait to receive the reply message.  */
+      state->basic.x[1] &= ~MACH_SEND_MSG;
+
+      /* Limit the time to receive the reply message, in case the server
+         claimed that `interrupt_operation' succeeded but in fact the RPC
+         is hung.  */
+      state->basic.x[1] |= MACH_RCV_TIMEOUT;
+      state->basic.x[5] = _hurd_interrupted_rpc_timeout;
+
+      state->basic.pc = (uintptr_t) rpc_wait_trampoline;
+      /* After doing the message receive, the trampoline code will need to
+         update the x0 value to be restored by sigreturn.  To simplify
+         the assembly code, we pass the address of its slot in SCP to the
+         trampoline code in x21.  */
+      state->basic.x[21] = (uintptr_t) &scp->sc_x[0];
+    }
+  else
+    state->basic.pc = (uintptr_t) trampoline;
+
+  /* We pass the handler function to the trampoline code in x20.  */
+  state->basic.x[20] = (uintptr_t) handler;
+
+  return scp;
+}
+
+asm ("rpc_wait_trampoline:\n"
+  /* This is the entry point when we have an RPC reply message to receive
+     before running the handler.  The MACH_MSG_SEND bit has already been
+     cleared in the OPTION argument in our x1.  For our convenience, x21
+     points to the sc_x[0] member of the sigcontext.
+
+     When the sigcontext was saved, x0 was MACH_RCV_INTERRUPTED.  To repeat
+     the message call, we need to restore the original message buffer
+     pointer; intr-msg.h keeps a backup copy of it in x9 specifically for
+     this purpose.  */
+     "mov x0, x9\n"
+     "svc #0\n"
+     /* Now the message receive has completed and the original caller of
+        the RPC (i.e. the code running when the signal arrived) needs to
+        see the final return value of the message receive in x0.  So store
+        the new x0 value into the sc_x[0] member of the sigcontext (whose
+        address is in x21 to make this code simpler).  */
+     "str x0, [x21]\n"
+
+     "trampoline:\n"
+     /* Entry point for running the handler normally.  The arguments to the
+        handler function are on the top of the stack:
+
+        [sp]		SIGNO
+        [sp, #8]	SIGCODE
+        [sp, #16]	SCP
+        [sp, #24]	_pad
+
+        Pop them off to the registers, to pass as arguments to the handler.
+     */
+     "ldp x0, x1, [sp], 16\n"
+     "ldr x2, [sp], 16\n"
+     "blr x20\n"		/* Call handler (signo, sigcode, scp).  */
+     /* The word at the top of stack is &__sigreturn, following it is a copy
+        of SCP for __sigreturn's argument.  Load the SCP as for a call, and
+        "return" to calling __sigreturn (SCP); this call never returns.  */
+     "ldp x30, x0, [sp], 16\n"
+     "ret");
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [RFC PATCH 21/23] htl: Implement some support for TLS_DTV_AT_TP
  2024-01-03 17:14 [RFC PATCH 00/23] aarch64-gnu port Sergey Bugaev
                   ` (19 preceding siblings ...)
  2024-01-03 17:14 ` [RFC PATCH 20/23] hurd: Add an AArch64 signal implementation Sergey Bugaev
@ 2024-01-03 17:14 ` Sergey Bugaev
  2024-01-03 17:14 ` [RFC PATCH 22/23] htl: Add an AArch64 implementation Sergey Bugaev
                   ` (4 subsequent siblings)
  25 siblings, 0 replies; 50+ messages in thread
From: Sergey Bugaev @ 2024-01-03 17:14 UTC (permalink / raw)
  To: libc-alpha, bug-hurd

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---

Also untested.

 htl/pt-create.c                     |  2 ++
 sysdeps/htl/dl-thread_gscope_wait.c | 16 ++++++++++++++--
 sysdeps/mach/hurd/htl/pt-sysdep.c   |  9 +++++++++
 3 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/htl/pt-create.c b/htl/pt-create.c
index fac61f1b..8a735d99 100644
--- a/htl/pt-create.c
+++ b/htl/pt-create.c
@@ -177,7 +177,9 @@ __pthread_create_internal (struct __pthread **thread,
       err = ENOMEM;
       goto failed_thread_tls_alloc;
     }
+#if TLS_TCB_AT_TP
   pthread->tcb->tcb = pthread->tcb;
+#endif
 
   /* And initialize the rest of the machine context.  This may include
      additional machine- and system-specific initializations that
diff --git a/sysdeps/htl/dl-thread_gscope_wait.c b/sysdeps/htl/dl-thread_gscope_wait.c
index 90a9a798..ee0a3165 100644
--- a/sysdeps/htl/dl-thread_gscope_wait.c
+++ b/sysdeps/htl/dl-thread_gscope_wait.c
@@ -20,6 +20,18 @@
 #include <pthread.h>
 #include <htl/pt-internal.h>
 
+static inline int *
+thread_gscope_flag (struct __pthread *t)
+{
+#if TLS_TCB_AT_TP
+  return &t->tcb->gscope_flag;
+#elif TLS_DTV_AT_TP
+  return &((tcbprehead_t *) t->tcb - 1)->gscope_flag;
+#else
+# error "Either TLS_TCB_AT_TP or TLS_DTV_AT_TP must be defined"
+#endif
+}
+
 void
 __thread_gscope_wait (void)
 {
@@ -33,10 +45,10 @@ __thread_gscope_wait (void)
   for (i = 0; i < GL (dl_pthread_num_threads); ++i)
     {
       t = GL (dl_pthread_threads[i]);
-      if (t == NULL || t->tcb->gscope_flag == THREAD_GSCOPE_FLAG_UNUSED)
+      if (t == NULL || *thread_gscope_flag (t) == THREAD_GSCOPE_FLAG_UNUSED)
         continue;
 
-      gscope_flagp = &t->tcb->gscope_flag;
+      gscope_flagp = thread_gscope_flag (t);
 
       /* We have to wait until this thread is done with the global
          scope.  First tell the thread that we are waiting and
diff --git a/sysdeps/mach/hurd/htl/pt-sysdep.c b/sysdeps/mach/hurd/htl/pt-sysdep.c
index 270e7753..5372cbf7 100644
--- a/sysdeps/mach/hurd/htl/pt-sysdep.c
+++ b/sysdeps/mach/hurd/htl/pt-sysdep.c
@@ -100,7 +100,16 @@ _init_routine (void *stack)
      to the new stack.  Pretend it wasn't allocated so that it remains
      valid if the main thread terminates.  */
   thread->stack = 0;
+#if TLS_TCB_AT_TP
   thread->tcb = THREAD_SELF;
+#elif TLS_DTV_AT_TP
+  /* Assuming THREAD_SELF is implemented as subtracting TLS_PRE_TCB_SIZE
+     from the value of a thread pointer regsiter, this should optimize
+     down to simply reading that register.  */
+  thread->tcb = (tcbhead_t *) (((char *) THREAD_SELF) + TLS_PRE_TCB_SIZE);
+#else
+# error "Either TLS_TCB_AT_TP or TLS_DTV_AT_TP must be defined"
+#endif
 
 #ifndef PAGESIZE
   __pthread_default_attr.__guardsize = __vm_page_size;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [RFC PATCH 22/23] htl: Add an AArch64 implementation
  2024-01-03 17:14 [RFC PATCH 00/23] aarch64-gnu port Sergey Bugaev
                   ` (20 preceding siblings ...)
  2024-01-03 17:14 ` [RFC PATCH 21/23] htl: Implement some support for TLS_DTV_AT_TP Sergey Bugaev
@ 2024-01-03 17:14 ` Sergey Bugaev
  2024-01-03 17:14 ` [RFC PATCH 23/23] hurd: Add expected aarch64-gnu abistlists Sergey Bugaev
                   ` (3 subsequent siblings)
  25 siblings, 0 replies; 50+ messages in thread
From: Sergey Bugaev @ 2024-01-03 17:14 UTC (permalink / raw)
  To: libc-alpha, bug-hurd

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---

This is completely untested.

 sysdeps/aarch64/htl/Makefile                 | 20 +++++
 sysdeps/aarch64/htl/bits/pthreadtypes-arch.h | 36 +++++++++
 sysdeps/aarch64/htl/machine-sp.h             | 29 +++++++
 sysdeps/aarch64/htl/pt-machdep.h             | 28 +++++++
 sysdeps/mach/hurd/aarch64/htl/pt-machdep.c   | 55 ++++++++++++++
 sysdeps/mach/hurd/aarch64/htl/pt-setup.c     | 80 ++++++++++++++++++++
 6 files changed, 248 insertions(+)
 create mode 100644 sysdeps/aarch64/htl/Makefile
 create mode 100644 sysdeps/aarch64/htl/bits/pthreadtypes-arch.h
 create mode 100644 sysdeps/aarch64/htl/machine-sp.h
 create mode 100644 sysdeps/aarch64/htl/pt-machdep.h
 create mode 100644 sysdeps/mach/hurd/aarch64/htl/pt-machdep.c
 create mode 100644 sysdeps/mach/hurd/aarch64/htl/pt-setup.c

diff --git a/sysdeps/aarch64/htl/Makefile b/sysdeps/aarch64/htl/Makefile
new file mode 100644
index 00000000..686b843d
--- /dev/null
+++ b/sysdeps/aarch64/htl/Makefile
@@ -0,0 +1,20 @@
+# Copyright (C) 2020-2024 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <https://www.gnu.org/licenses/>.
+
+ifeq ($(subdir),csu)
+gen-as-const-headers += tcb-offsets.sym
+endif
diff --git a/sysdeps/aarch64/htl/bits/pthreadtypes-arch.h b/sysdeps/aarch64/htl/bits/pthreadtypes-arch.h
new file mode 100644
index 00000000..9ee1568e
--- /dev/null
+++ b/sysdeps/aarch64/htl/bits/pthreadtypes-arch.h
@@ -0,0 +1,36 @@
+/* Machine-specific pthread type layouts.  Hurd aarch64 version.
+   Copyright (C) 2002-2024 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _BITS_PTHREADTYPES_ARCH_H
+#define _BITS_PTHREADTYPES_ARCH_H	1
+
+#define __SIZEOF_PTHREAD_MUTEX_T 32
+#define __SIZEOF_PTHREAD_ATTR_T 48
+#define __SIZEOF_PTHREAD_RWLOCK_T 48
+#define __SIZEOF_PTHREAD_BARRIER_T 40
+#define __SIZEOF_PTHREAD_MUTEXATTR_T 16
+#define __SIZEOF_PTHREAD_COND_T 40
+#define __SIZEOF_PTHREAD_CONDATTR_T 8
+#define __SIZEOF_PTHREAD_RWLOCKATTR_T 4
+#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
+#define __SIZEOF_PTHREAD_ONCE_T 8
+
+#define __LOCK_ALIGNMENT
+#define __ONCE_ALIGNMENT
+
+#endif /* bits/pthreadtypes.h */
diff --git a/sysdeps/aarch64/htl/machine-sp.h b/sysdeps/aarch64/htl/machine-sp.h
new file mode 100644
index 00000000..b21331a0
--- /dev/null
+++ b/sysdeps/aarch64/htl/machine-sp.h
@@ -0,0 +1,29 @@
+/* Machine-specific function to return the stack pointer.  aarch64 version.
+   Copyright (C) 1994-2024 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library;  if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _MACHINE_SP_H
+#define _MACHINE_SP_H
+
+/* Return the current stack pointer.  */
+
+#define __thread_stack_pointer() ({						\
+  register uintptr_t __sp__ asm("sp");						\
+  __sp__;									\
+})
+
+#endif /* machine-sp.h */
diff --git a/sysdeps/aarch64/htl/pt-machdep.h b/sysdeps/aarch64/htl/pt-machdep.h
new file mode 100644
index 00000000..c3681b4a
--- /dev/null
+++ b/sysdeps/aarch64/htl/pt-machdep.h
@@ -0,0 +1,28 @@
+/* Machine dependent pthreads internal definitions.  aarch64 version.
+   Copyright (C) 2000-2024 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library;  if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _PT_MACHDEP_H
+#define _PT_MACHDEP_H	1
+
+struct pthread_mcontext
+{
+  void *pc;
+  void *sp;
+};
+
+#endif /* pt-machdep.h */
diff --git a/sysdeps/mach/hurd/aarch64/htl/pt-machdep.c b/sysdeps/mach/hurd/aarch64/htl/pt-machdep.c
new file mode 100644
index 00000000..f2a3354c
--- /dev/null
+++ b/sysdeps/mach/hurd/aarch64/htl/pt-machdep.c
@@ -0,0 +1,55 @@
+/* Machine dependent pthreads code.  Hurd/aarch64 version.
+   Copyright (C) 2000-2024 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library;  if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <errno.h>
+#include <assert.h>
+
+#include <mach.h>
+#include <mach/machine/thread_status.h>
+#include <mach/mig_errors.h>
+#include <mach/thread_status.h>
+
+int
+__thread_set_pcsptp (thread_t thread,
+                     int set_pc, void *pc,
+                     int set_sp, void *sp,
+                     int set_tp, void *tp)
+{
+  error_t err;
+  struct aarch64_thread_state state;
+  mach_msg_type_number_t state_count;
+
+  state_count = AARCH64_THREAD_STATE_COUNT;
+
+  err = __thread_get_state (thread, AARCH64_THREAD_STATE,
+                            (thread_state_t) &state, &state_count);
+  if (err)
+    return err;
+  assert (state_count == AARCH64_THREAD_STATE_COUNT);
+
+  if (set_pc)
+    state.pc = (uintptr_t) pc;
+  if (set_sp)
+    state.sp = (uintptr_t) sp;
+  if (set_tp)
+    state.tpidr_el0 = (uintptr_t) tp;
+
+  return __thread_set_state (thread, AARCH64_THREAD_STATE,
+			     (thread_state_t) &state,
+			     AARCH64_THREAD_STATE_COUNT);
+}
diff --git a/sysdeps/mach/hurd/aarch64/htl/pt-setup.c b/sysdeps/mach/hurd/aarch64/htl/pt-setup.c
new file mode 100644
index 00000000..7d1562a0
--- /dev/null
+++ b/sysdeps/mach/hurd/aarch64/htl/pt-setup.c
@@ -0,0 +1,80 @@
+/* Setup thread stack.  Hurd/aarch64 version.
+   Copyright (C) 2000-2024 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library;  if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <stdint.h>
+#include <assert.h>
+#include <mach.h>
+#include <hurd.h>
+
+#include <thread_state.h>
+#include <pt-internal.h>
+
+/* Set up the stack for THREAD.  Return the stack pointer
+   for the new thread.  */
+static void *
+stack_setup (struct __pthread *thread)
+{
+  error_t err;
+  uintptr_t bottom, top;
+
+  /* Calculate the top of the new stack.  */
+  bottom = (uintptr_t) thread->stackaddr;
+  top = bottom + thread->stacksize + round_page (thread->guardsize);
+
+  if (thread->guardsize)
+    {
+      err = __vm_protect (__mach_task_self (), (vm_address_t) bottom,
+			  thread->guardsize, 0, 0);
+      assert_perror (err);
+    }
+
+  return (void *) top;
+}
+
+int
+__pthread_setup (struct __pthread *thread,
+		 void (*entry_point) (struct __pthread *, void *(*)(void *),
+				      void *), void *(*start_routine) (void *),
+		 void *arg)
+{
+  error_t err;
+  struct aarch64_thread_state state;
+
+  if (thread->kernel_thread == __hurd_thread_self ())
+    return 0;
+
+  thread->mcontext.pc = entry_point;
+  thread->mcontext.sp = stack_setup (thread);
+
+  /* Set up the state to call entry_point (thread, start_routine, arg) */
+  memset (&state, 0, sizeof (state));
+  state.sp = (uintptr_t) thread->mcontext.sp;
+  state.pc = (uintptr_t) thread->mcontext.pc;
+  state.x[0] = (uintptr_t) thread;
+  state.x[1] = (uintptr_t) start_routine;
+  state.x[2] = (uintptr_t) arg;
+  state.x[29] = state.x[30] = 0;
+  state.tpidr_el0 = (uintptr_t) thread->tcb;
+
+  err = __thread_set_state (thread->kernel_thread, AARCH64_THREAD_STATE,
+			    (thread_state_t) &state,
+			    AARCH64_THREAD_STATE_COUNT);
+  assert_perror (err);
+
+  return 0;
+}
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* [RFC PATCH 23/23] hurd: Add expected aarch64-gnu abistlists
  2024-01-03 17:14 [RFC PATCH 00/23] aarch64-gnu port Sergey Bugaev
                   ` (21 preceding siblings ...)
  2024-01-03 17:14 ` [RFC PATCH 22/23] htl: Add an AArch64 implementation Sergey Bugaev
@ 2024-01-03 17:14 ` Sergey Bugaev
  2024-01-03 17:30 ` [RFC PATCH 00/23] aarch64-gnu port Joseph Myers
                   ` (2 subsequent siblings)
  25 siblings, 0 replies; 50+ messages in thread
From: Sergey Bugaev @ 2024-01-03 17:14 UTC (permalink / raw)
  To: libc-alpha, bug-hurd

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/mach/hurd/aarch64/ld.abilist          |   18 +
 .../mach/hurd/aarch64/libBrokenLocale.abilist |    1 +
 sysdeps/mach/hurd/aarch64/libanl.abilist      |    4 +
 sysdeps/mach/hurd/aarch64/libc.abilist        | 2123 +++++++++++++++++
 .../hurd/aarch64/libc_malloc_debug.abilist    |   26 +
 sysdeps/mach/hurd/aarch64/libdl.abilist       |    0
 sysdeps/mach/hurd/aarch64/libm.abilist        | 1030 ++++++++
 sysdeps/mach/hurd/aarch64/libmvec.abilist     |   75 +
 sysdeps/mach/hurd/aarch64/libpthread.abilist  |  165 ++
 sysdeps/mach/hurd/aarch64/libresolv.abilist   |   55 +
 sysdeps/mach/hurd/aarch64/librt.abilist       |   33 +
 11 files changed, 3530 insertions(+)
 create mode 100644 sysdeps/mach/hurd/aarch64/ld.abilist
 create mode 100644 sysdeps/mach/hurd/aarch64/libBrokenLocale.abilist
 create mode 100644 sysdeps/mach/hurd/aarch64/libanl.abilist
 create mode 100644 sysdeps/mach/hurd/aarch64/libc.abilist
 create mode 100644 sysdeps/mach/hurd/aarch64/libc_malloc_debug.abilist
 create mode 100644 sysdeps/mach/hurd/aarch64/libdl.abilist
 create mode 100644 sysdeps/mach/hurd/aarch64/libm.abilist
 create mode 100644 sysdeps/mach/hurd/aarch64/libmvec.abilist
 create mode 100644 sysdeps/mach/hurd/aarch64/libpthread.abilist
 create mode 100644 sysdeps/mach/hurd/aarch64/libresolv.abilist
 create mode 100644 sysdeps/mach/hurd/aarch64/librt.abilist

diff --git a/sysdeps/mach/hurd/aarch64/ld.abilist b/sysdeps/mach/hurd/aarch64/ld.abilist
new file mode 100644
index 00000000..8c232f4c
--- /dev/null
+++ b/sysdeps/mach/hurd/aarch64/ld.abilist
@@ -0,0 +1,18 @@
+GLIBC_2.39 __close F
+GLIBC_2.39 __errno_location F
+GLIBC_2.39 __getpid F
+GLIBC_2.39 __libc_stack_end D 0x8
+GLIBC_2.39 __mmap F
+GLIBC_2.39 __open F
+GLIBC_2.39 __open64 F
+GLIBC_2.39 __pread64 F
+GLIBC_2.39 __read F
+GLIBC_2.39 __sbrk F
+GLIBC_2.39 __stack_chk_guard D 0x8
+GLIBC_2.39 __tls_get_addr F
+GLIBC_2.39 __write F
+GLIBC_2.39 __writev F
+GLIBC_2.39 _dl_mcount F
+GLIBC_2.39 _hurd_intr_rpc_mach_msg F
+GLIBC_2.39 _r_debug D 0x28
+GLIBC_2.39 abort F
diff --git a/sysdeps/mach/hurd/aarch64/libBrokenLocale.abilist b/sysdeps/mach/hurd/aarch64/libBrokenLocale.abilist
new file mode 100644
index 00000000..45381a8d
--- /dev/null
+++ b/sysdeps/mach/hurd/aarch64/libBrokenLocale.abilist
@@ -0,0 +1 @@
+GLIBC_2.39 __ctype_get_mb_cur_max F
diff --git a/sysdeps/mach/hurd/aarch64/libanl.abilist b/sysdeps/mach/hurd/aarch64/libanl.abilist
new file mode 100644
index 00000000..f7e37d5a
--- /dev/null
+++ b/sysdeps/mach/hurd/aarch64/libanl.abilist
@@ -0,0 +1,4 @@
+GLIBC_2.39 gai_cancel F
+GLIBC_2.39 gai_error F
+GLIBC_2.39 gai_suspend F
+GLIBC_2.39 getaddrinfo_a F
diff --git a/sysdeps/mach/hurd/aarch64/libc.abilist b/sysdeps/mach/hurd/aarch64/libc.abilist
new file mode 100644
index 00000000..89f95a6d
--- /dev/null
+++ b/sysdeps/mach/hurd/aarch64/libc.abilist
@@ -0,0 +1,2123 @@
+GLIBC_2.39 _Exit F
+GLIBC_2.39 _Fork F
+GLIBC_2.39 _IO_2_1_stderr_ D 0xe0
+GLIBC_2.39 _IO_2_1_stdin_ D 0xe0
+GLIBC_2.39 _IO_2_1_stdout_ D 0xe0
+GLIBC_2.39 _IO_adjust_column F
+GLIBC_2.39 _IO_adjust_wcolumn F
+GLIBC_2.39 _IO_default_doallocate F
+GLIBC_2.39 _IO_default_finish F
+GLIBC_2.39 _IO_default_pbackfail F
+GLIBC_2.39 _IO_default_uflow F
+GLIBC_2.39 _IO_default_xsgetn F
+GLIBC_2.39 _IO_default_xsputn F
+GLIBC_2.39 _IO_do_write F
+GLIBC_2.39 _IO_doallocbuf F
+GLIBC_2.39 _IO_fclose F
+GLIBC_2.39 _IO_fdopen F
+GLIBC_2.39 _IO_feof F
+GLIBC_2.39 _IO_ferror F
+GLIBC_2.39 _IO_fflush F
+GLIBC_2.39 _IO_fgetpos F
+GLIBC_2.39 _IO_fgetpos64 F
+GLIBC_2.39 _IO_fgets F
+GLIBC_2.39 _IO_file_attach F
+GLIBC_2.39 _IO_file_close F
+GLIBC_2.39 _IO_file_close_it F
+GLIBC_2.39 _IO_file_doallocate F
+GLIBC_2.39 _IO_file_finish F
+GLIBC_2.39 _IO_file_fopen F
+GLIBC_2.39 _IO_file_init F
+GLIBC_2.39 _IO_file_jumps D 0xa8
+GLIBC_2.39 _IO_file_open F
+GLIBC_2.39 _IO_file_overflow F
+GLIBC_2.39 _IO_file_read F
+GLIBC_2.39 _IO_file_seek F
+GLIBC_2.39 _IO_file_seekoff F
+GLIBC_2.39 _IO_file_setbuf F
+GLIBC_2.39 _IO_file_stat F
+GLIBC_2.39 _IO_file_sync F
+GLIBC_2.39 _IO_file_underflow F
+GLIBC_2.39 _IO_file_write F
+GLIBC_2.39 _IO_file_xsputn F
+GLIBC_2.39 _IO_flockfile F
+GLIBC_2.39 _IO_flush_all F
+GLIBC_2.39 _IO_flush_all_linebuffered F
+GLIBC_2.39 _IO_fopen F
+GLIBC_2.39 _IO_fprintf F
+GLIBC_2.39 _IO_fputs F
+GLIBC_2.39 _IO_fread F
+GLIBC_2.39 _IO_free_backup_area F
+GLIBC_2.39 _IO_free_wbackup_area F
+GLIBC_2.39 _IO_fsetpos F
+GLIBC_2.39 _IO_fsetpos64 F
+GLIBC_2.39 _IO_ftell F
+GLIBC_2.39 _IO_ftrylockfile F
+GLIBC_2.39 _IO_funlockfile F
+GLIBC_2.39 _IO_fwrite F
+GLIBC_2.39 _IO_getc F
+GLIBC_2.39 _IO_getline F
+GLIBC_2.39 _IO_getline_info F
+GLIBC_2.39 _IO_gets F
+GLIBC_2.39 _IO_init F
+GLIBC_2.39 _IO_init_marker F
+GLIBC_2.39 _IO_init_wmarker F
+GLIBC_2.39 _IO_iter_begin F
+GLIBC_2.39 _IO_iter_end F
+GLIBC_2.39 _IO_iter_file F
+GLIBC_2.39 _IO_iter_next F
+GLIBC_2.39 _IO_least_wmarker F
+GLIBC_2.39 _IO_link_in F
+GLIBC_2.39 _IO_list_all D 0x8
+GLIBC_2.39 _IO_list_lock F
+GLIBC_2.39 _IO_list_resetlock F
+GLIBC_2.39 _IO_list_unlock F
+GLIBC_2.39 _IO_marker_delta F
+GLIBC_2.39 _IO_marker_difference F
+GLIBC_2.39 _IO_padn F
+GLIBC_2.39 _IO_peekc_locked F
+GLIBC_2.39 _IO_popen F
+GLIBC_2.39 _IO_printf F
+GLIBC_2.39 _IO_proc_close F
+GLIBC_2.39 _IO_proc_open F
+GLIBC_2.39 _IO_putc F
+GLIBC_2.39 _IO_puts F
+GLIBC_2.39 _IO_remove_marker F
+GLIBC_2.39 _IO_seekmark F
+GLIBC_2.39 _IO_seekoff F
+GLIBC_2.39 _IO_seekpos F
+GLIBC_2.39 _IO_seekwmark F
+GLIBC_2.39 _IO_setb F
+GLIBC_2.39 _IO_setbuffer F
+GLIBC_2.39 _IO_setvbuf F
+GLIBC_2.39 _IO_sgetn F
+GLIBC_2.39 _IO_sprintf F
+GLIBC_2.39 _IO_sputbackc F
+GLIBC_2.39 _IO_sputbackwc F
+GLIBC_2.39 _IO_sscanf F
+GLIBC_2.39 _IO_str_init_readonly F
+GLIBC_2.39 _IO_str_init_static F
+GLIBC_2.39 _IO_str_overflow F
+GLIBC_2.39 _IO_str_pbackfail F
+GLIBC_2.39 _IO_str_seekoff F
+GLIBC_2.39 _IO_str_underflow F
+GLIBC_2.39 _IO_sungetc F
+GLIBC_2.39 _IO_sungetwc F
+GLIBC_2.39 _IO_switch_to_get_mode F
+GLIBC_2.39 _IO_switch_to_main_wget_area F
+GLIBC_2.39 _IO_switch_to_wbackup_area F
+GLIBC_2.39 _IO_switch_to_wget_mode F
+GLIBC_2.39 _IO_un_link F
+GLIBC_2.39 _IO_ungetc F
+GLIBC_2.39 _IO_unsave_markers F
+GLIBC_2.39 _IO_unsave_wmarkers F
+GLIBC_2.39 _IO_vfprintf F
+GLIBC_2.39 _IO_vsprintf F
+GLIBC_2.39 _IO_wdefault_doallocate F
+GLIBC_2.39 _IO_wdefault_finish F
+GLIBC_2.39 _IO_wdefault_pbackfail F
+GLIBC_2.39 _IO_wdefault_uflow F
+GLIBC_2.39 _IO_wdefault_xsgetn F
+GLIBC_2.39 _IO_wdefault_xsputn F
+GLIBC_2.39 _IO_wdo_write F
+GLIBC_2.39 _IO_wdoallocbuf F
+GLIBC_2.39 _IO_wfile_jumps D 0xa8
+GLIBC_2.39 _IO_wfile_overflow F
+GLIBC_2.39 _IO_wfile_seekoff F
+GLIBC_2.39 _IO_wfile_sync F
+GLIBC_2.39 _IO_wfile_underflow F
+GLIBC_2.39 _IO_wfile_xsputn F
+GLIBC_2.39 _IO_wmarker_delta F
+GLIBC_2.39 _IO_wsetb F
+GLIBC_2.39 _S_catch_exception_raise F
+GLIBC_2.39 _S_msg_add_auth F
+GLIBC_2.39 _S_msg_del_auth F
+GLIBC_2.39 _S_msg_describe_ports F
+GLIBC_2.39 _S_msg_get_dtable F
+GLIBC_2.39 _S_msg_get_env_variable F
+GLIBC_2.39 _S_msg_get_environment F
+GLIBC_2.39 _S_msg_get_fd F
+GLIBC_2.39 _S_msg_get_init_int F
+GLIBC_2.39 _S_msg_get_init_ints F
+GLIBC_2.39 _S_msg_get_init_port F
+GLIBC_2.39 _S_msg_get_init_ports F
+GLIBC_2.39 _S_msg_proc_newids F
+GLIBC_2.39 _S_msg_report_wait F
+GLIBC_2.39 _S_msg_set_dtable F
+GLIBC_2.39 _S_msg_set_env_variable F
+GLIBC_2.39 _S_msg_set_environment F
+GLIBC_2.39 _S_msg_set_fd F
+GLIBC_2.39 _S_msg_set_init_int F
+GLIBC_2.39 _S_msg_set_init_ints F
+GLIBC_2.39 _S_msg_set_init_port F
+GLIBC_2.39 _S_msg_set_init_ports F
+GLIBC_2.39 _S_msg_sig_post F
+GLIBC_2.39 _S_msg_sig_post_untraced F
+GLIBC_2.39 ___brk_addr D 0x8
+GLIBC_2.39 __argz_count F
+GLIBC_2.39 __argz_next F
+GLIBC_2.39 __argz_stringify F
+GLIBC_2.39 __asprintf F
+GLIBC_2.39 __asprintf_chk F
+GLIBC_2.39 __assert F
+GLIBC_2.39 __assert_fail F
+GLIBC_2.39 __assert_perror_fail F
+GLIBC_2.39 __backtrace F
+GLIBC_2.39 __backtrace_symbols F
+GLIBC_2.39 __backtrace_symbols_fd F
+GLIBC_2.39 __bsd_getpgrp F
+GLIBC_2.39 __bzero F
+GLIBC_2.39 __check_rhosts_file D 0x4
+GLIBC_2.39 __chk_fail F
+GLIBC_2.39 __close F
+GLIBC_2.39 __cmsg_nxthdr F
+GLIBC_2.39 __confstr_chk F
+GLIBC_2.39 __connect F
+GLIBC_2.39 __ctype_b_loc F
+GLIBC_2.39 __ctype_get_mb_cur_max F
+GLIBC_2.39 __ctype_tolower_loc F
+GLIBC_2.39 __ctype_toupper_loc F
+GLIBC_2.39 __cxa_at_quick_exit F
+GLIBC_2.39 __cxa_atexit F
+GLIBC_2.39 __cxa_finalize F
+GLIBC_2.39 __cxa_thread_atexit_impl F
+GLIBC_2.39 __cyg_profile_func_enter F
+GLIBC_2.39 __cyg_profile_func_exit F
+GLIBC_2.39 __daylight D 0x4
+GLIBC_2.39 __dcgettext F
+GLIBC_2.39 __dgettext F
+GLIBC_2.39 __dprintf_chk F
+GLIBC_2.39 __dup2 F
+GLIBC_2.39 __duplocale F
+GLIBC_2.39 __environ D 0x8
+GLIBC_2.39 __errno_location F
+GLIBC_2.39 __explicit_bzero_chk F
+GLIBC_2.39 __fbufsize F
+GLIBC_2.39 __fcntl F
+GLIBC_2.39 __fdelt_chk F
+GLIBC_2.39 __fdelt_warn F
+GLIBC_2.39 __ffs F
+GLIBC_2.39 __fgets_chk F
+GLIBC_2.39 __fgets_unlocked_chk F
+GLIBC_2.39 __fgetws_chk F
+GLIBC_2.39 __fgetws_unlocked_chk F
+GLIBC_2.39 __finite F
+GLIBC_2.39 __finitef F
+GLIBC_2.39 __finitel F
+GLIBC_2.39 __flbf F
+GLIBC_2.39 __fork F
+GLIBC_2.39 __fpending F
+GLIBC_2.39 __fprintf_chk F
+GLIBC_2.39 __fpu_control D 0x4
+GLIBC_2.39 __fpurge F
+GLIBC_2.39 __fread_chk F
+GLIBC_2.39 __fread_unlocked_chk F
+GLIBC_2.39 __freadable F
+GLIBC_2.39 __freading F
+GLIBC_2.39 __freelocale F
+GLIBC_2.39 __fsetlocking F
+GLIBC_2.39 __fwprintf_chk F
+GLIBC_2.39 __fwritable F
+GLIBC_2.39 __fwriting F
+GLIBC_2.39 __getauxval F
+GLIBC_2.39 __getcwd_chk F
+GLIBC_2.39 __getdelim F
+GLIBC_2.39 __getdomainname_chk F
+GLIBC_2.39 __getgroups_chk F
+GLIBC_2.39 __gethostname_chk F
+GLIBC_2.39 __getlogin_r_chk F
+GLIBC_2.39 __getpagesize F
+GLIBC_2.39 __getpgid F
+GLIBC_2.39 __getpid F
+GLIBC_2.39 __gets_chk F
+GLIBC_2.39 __gettimeofday F
+GLIBC_2.39 __getwd_chk F
+GLIBC_2.39 __gmtime_r F
+GLIBC_2.39 __h_errno_location F
+GLIBC_2.39 __hurd_dfail F
+GLIBC_2.39 __hurd_fail F
+GLIBC_2.39 __hurd_sockfail F
+GLIBC_2.39 __isalnum_l F
+GLIBC_2.39 __isalpha_l F
+GLIBC_2.39 __isascii_l F
+GLIBC_2.39 __isblank_l F
+GLIBC_2.39 __iscntrl_l F
+GLIBC_2.39 __isctype F
+GLIBC_2.39 __isdigit_l F
+GLIBC_2.39 __isgraph_l F
+GLIBC_2.39 __isinf F
+GLIBC_2.39 __isinff F
+GLIBC_2.39 __isinfl F
+GLIBC_2.39 __islower_l F
+GLIBC_2.39 __isnan F
+GLIBC_2.39 __isnanf F
+GLIBC_2.39 __isnanl F
+GLIBC_2.39 __isoc23_fscanf F
+GLIBC_2.39 __isoc23_fwscanf F
+GLIBC_2.39 __isoc23_scanf F
+GLIBC_2.39 __isoc23_sscanf F
+GLIBC_2.39 __isoc23_strtoimax F
+GLIBC_2.39 __isoc23_strtol F
+GLIBC_2.39 __isoc23_strtol_l F
+GLIBC_2.39 __isoc23_strtoll F
+GLIBC_2.39 __isoc23_strtoll_l F
+GLIBC_2.39 __isoc23_strtoul F
+GLIBC_2.39 __isoc23_strtoul_l F
+GLIBC_2.39 __isoc23_strtoull F
+GLIBC_2.39 __isoc23_strtoull_l F
+GLIBC_2.39 __isoc23_strtoumax F
+GLIBC_2.39 __isoc23_swscanf F
+GLIBC_2.39 __isoc23_vfscanf F
+GLIBC_2.39 __isoc23_vfwscanf F
+GLIBC_2.39 __isoc23_vscanf F
+GLIBC_2.39 __isoc23_vsscanf F
+GLIBC_2.39 __isoc23_vswscanf F
+GLIBC_2.39 __isoc23_vwscanf F
+GLIBC_2.39 __isoc23_wcstoimax F
+GLIBC_2.39 __isoc23_wcstol F
+GLIBC_2.39 __isoc23_wcstol_l F
+GLIBC_2.39 __isoc23_wcstoll F
+GLIBC_2.39 __isoc23_wcstoll_l F
+GLIBC_2.39 __isoc23_wcstoul F
+GLIBC_2.39 __isoc23_wcstoul_l F
+GLIBC_2.39 __isoc23_wcstoull F
+GLIBC_2.39 __isoc23_wcstoull_l F
+GLIBC_2.39 __isoc23_wcstoumax F
+GLIBC_2.39 __isoc23_wscanf F
+GLIBC_2.39 __isoc99_fscanf F
+GLIBC_2.39 __isoc99_fwscanf F
+GLIBC_2.39 __isoc99_scanf F
+GLIBC_2.39 __isoc99_sscanf F
+GLIBC_2.39 __isoc99_swscanf F
+GLIBC_2.39 __isoc99_vfscanf F
+GLIBC_2.39 __isoc99_vfwscanf F
+GLIBC_2.39 __isoc99_vscanf F
+GLIBC_2.39 __isoc99_vsscanf F
+GLIBC_2.39 __isoc99_vswscanf F
+GLIBC_2.39 __isoc99_vwscanf F
+GLIBC_2.39 __isoc99_wscanf F
+GLIBC_2.39 __isprint_l F
+GLIBC_2.39 __ispunct_l F
+GLIBC_2.39 __isspace_l F
+GLIBC_2.39 __isupper_l F
+GLIBC_2.39 __iswalnum_l F
+GLIBC_2.39 __iswalpha_l F
+GLIBC_2.39 __iswblank_l F
+GLIBC_2.39 __iswcntrl_l F
+GLIBC_2.39 __iswctype F
+GLIBC_2.39 __iswctype_l F
+GLIBC_2.39 __iswdigit_l F
+GLIBC_2.39 __iswgraph_l F
+GLIBC_2.39 __iswlower_l F
+GLIBC_2.39 __iswprint_l F
+GLIBC_2.39 __iswpunct_l F
+GLIBC_2.39 __iswspace_l F
+GLIBC_2.39 __iswupper_l F
+GLIBC_2.39 __iswxdigit_l F
+GLIBC_2.39 __isxdigit_l F
+GLIBC_2.39 __libc_allocate_rtsig F
+GLIBC_2.39 __libc_calloc F
+GLIBC_2.39 __libc_current_sigrtmax F
+GLIBC_2.39 __libc_current_sigrtmin F
+GLIBC_2.39 __libc_free F
+GLIBC_2.39 __libc_freeres F
+GLIBC_2.39 __libc_init_first F
+GLIBC_2.39 __libc_mallinfo F
+GLIBC_2.39 __libc_malloc F
+GLIBC_2.39 __libc_mallopt F
+GLIBC_2.39 __libc_memalign F
+GLIBC_2.39 __libc_pvalloc F
+GLIBC_2.39 __libc_realloc F
+GLIBC_2.39 __libc_single_threaded D 0x1
+GLIBC_2.39 __libc_start_main F
+GLIBC_2.39 __libc_valloc F
+GLIBC_2.39 __longjmp_chk F
+GLIBC_2.39 __lseek F
+GLIBC_2.39 __mach_host_self_ D 0x4
+GLIBC_2.39 __mach_msg F
+GLIBC_2.39 __mach_msg_destroy F
+GLIBC_2.39 __mach_port_allocate F
+GLIBC_2.39 __mach_port_deallocate F
+GLIBC_2.39 __mach_port_insert_right F
+GLIBC_2.39 __mach_reply_port F
+GLIBC_2.39 __mach_task_self_ D 0x4
+GLIBC_2.39 __mach_thread_self F
+GLIBC_2.39 __mbrlen F
+GLIBC_2.39 __mbrtowc F
+GLIBC_2.39 __mbsnrtowcs_chk F
+GLIBC_2.39 __mbsrtowcs_chk F
+GLIBC_2.39 __mbstowcs_chk F
+GLIBC_2.39 __memcmpeq F
+GLIBC_2.39 __memcpy_chk F
+GLIBC_2.39 __memmove_chk F
+GLIBC_2.39 __mempcpy F
+GLIBC_2.39 __mempcpy_chk F
+GLIBC_2.39 __memset_chk F
+GLIBC_2.39 __mig_allocate F
+GLIBC_2.39 __mig_dealloc_reply_port F
+GLIBC_2.39 __mig_deallocate F
+GLIBC_2.39 __mig_get_reply_port F
+GLIBC_2.39 __mig_init F
+GLIBC_2.39 __mig_put_reply_port F
+GLIBC_2.39 __mig_strncpy F
+GLIBC_2.39 __mmap F
+GLIBC_2.39 __monstartup F
+GLIBC_2.39 __nanosleep F
+GLIBC_2.39 __newlocale F
+GLIBC_2.39 __nl_langinfo_l F
+GLIBC_2.39 __nss_configure_lookup F
+GLIBC_2.39 __nss_hostname_digits_dots F
+GLIBC_2.39 __obstack_printf_chk F
+GLIBC_2.39 __obstack_vprintf_chk F
+GLIBC_2.39 __open F
+GLIBC_2.39 __open64 F
+GLIBC_2.39 __open64_2 F
+GLIBC_2.39 __open_2 F
+GLIBC_2.39 __openat64_2 F
+GLIBC_2.39 __openat_2 F
+GLIBC_2.39 __overflow F
+GLIBC_2.39 __pipe F
+GLIBC_2.39 __poll F
+GLIBC_2.39 __poll_chk F
+GLIBC_2.39 __posix_getopt F
+GLIBC_2.39 __ppoll_chk F
+GLIBC_2.39 __pread64 F
+GLIBC_2.39 __pread64_chk F
+GLIBC_2.39 __pread_chk F
+GLIBC_2.39 __printf_chk F
+GLIBC_2.39 __printf_fp F
+GLIBC_2.39 __profile_frequency F
+GLIBC_2.39 __progname D 0x8
+GLIBC_2.39 __progname_full D 0x8
+GLIBC_2.39 __pthread_get_cleanup_stack F
+GLIBC_2.39 __pthread_self F
+GLIBC_2.39 __ptsname_r_chk F
+GLIBC_2.39 __pwrite64 F
+GLIBC_2.39 __rawmemchr F
+GLIBC_2.39 __rcmd_errstr D 0x8
+GLIBC_2.39 __read F
+GLIBC_2.39 __read_chk F
+GLIBC_2.39 __readlink_chk F
+GLIBC_2.39 __readlinkat_chk F
+GLIBC_2.39 __realpath_chk F
+GLIBC_2.39 __recv_chk F
+GLIBC_2.39 __recvfrom_chk F
+GLIBC_2.39 __register_atfork F
+GLIBC_2.39 __res_init F
+GLIBC_2.39 __res_nclose F
+GLIBC_2.39 __res_ninit F
+GLIBC_2.39 __res_randomid F
+GLIBC_2.39 __res_state F
+GLIBC_2.39 __sbrk F
+GLIBC_2.39 __sched_cpualloc F
+GLIBC_2.39 __sched_cpucount F
+GLIBC_2.39 __sched_cpufree F
+GLIBC_2.39 __sched_get_priority_max F
+GLIBC_2.39 __sched_get_priority_min F
+GLIBC_2.39 __sched_getparam F
+GLIBC_2.39 __sched_getscheduler F
+GLIBC_2.39 __sched_setscheduler F
+GLIBC_2.39 __sched_yield F
+GLIBC_2.39 __select F
+GLIBC_2.39 __send F
+GLIBC_2.39 __setpgid F
+GLIBC_2.39 __sigaction F
+GLIBC_2.39 __signbit F
+GLIBC_2.39 __signbitf F
+GLIBC_2.39 __signbitl F
+GLIBC_2.39 __sigpause F
+GLIBC_2.39 __sigsetjmp F
+GLIBC_2.39 __sigsuspend F
+GLIBC_2.39 __snprintf_chk F
+GLIBC_2.39 __sprintf_chk F
+GLIBC_2.39 __stack_chk_fail F
+GLIBC_2.39 __stpcpy F
+GLIBC_2.39 __stpcpy_chk F
+GLIBC_2.39 __stpncpy F
+GLIBC_2.39 __stpncpy_chk F
+GLIBC_2.39 __strcasecmp F
+GLIBC_2.39 __strcasecmp_l F
+GLIBC_2.39 __strcasestr F
+GLIBC_2.39 __strcat_chk F
+GLIBC_2.39 __strcoll_l F
+GLIBC_2.39 __strcpy_chk F
+GLIBC_2.39 __strdup F
+GLIBC_2.39 __strerror_r F
+GLIBC_2.39 __strfmon_l F
+GLIBC_2.39 __strftime_l F
+GLIBC_2.39 __strlcat_chk F
+GLIBC_2.39 __strlcpy_chk F
+GLIBC_2.39 __strncasecmp_l F
+GLIBC_2.39 __strncat_chk F
+GLIBC_2.39 __strncpy_chk F
+GLIBC_2.39 __strndup F
+GLIBC_2.39 __strsep_g F
+GLIBC_2.39 __strtod_internal F
+GLIBC_2.39 __strtod_l F
+GLIBC_2.39 __strtof_internal F
+GLIBC_2.39 __strtof_l F
+GLIBC_2.39 __strtok_r F
+GLIBC_2.39 __strtol_internal F
+GLIBC_2.39 __strtol_l F
+GLIBC_2.39 __strtold_internal F
+GLIBC_2.39 __strtold_l F
+GLIBC_2.39 __strtoll_internal F
+GLIBC_2.39 __strtoll_l F
+GLIBC_2.39 __strtoul_internal F
+GLIBC_2.39 __strtoul_l F
+GLIBC_2.39 __strtoull_internal F
+GLIBC_2.39 __strtoull_l F
+GLIBC_2.39 __strverscmp F
+GLIBC_2.39 __strxfrm_l F
+GLIBC_2.39 __swprintf_chk F
+GLIBC_2.39 __sysconf F
+GLIBC_2.39 __syslog_chk F
+GLIBC_2.39 __sysv_signal F
+GLIBC_2.39 __timezone D 0x8
+GLIBC_2.39 __toascii_l F
+GLIBC_2.39 __tolower_l F
+GLIBC_2.39 __toupper_l F
+GLIBC_2.39 __towctrans F
+GLIBC_2.39 __towctrans_l F
+GLIBC_2.39 __towlower_l F
+GLIBC_2.39 __towupper_l F
+GLIBC_2.39 __ttyname_r_chk F
+GLIBC_2.39 __tzname D 0x10
+GLIBC_2.39 __uflow F
+GLIBC_2.39 __underflow F
+GLIBC_2.39 __uselocale F
+GLIBC_2.39 __vasprintf_chk F
+GLIBC_2.39 __vdprintf_chk F
+GLIBC_2.39 __vfork F
+GLIBC_2.39 __vfprintf_chk F
+GLIBC_2.39 __vfscanf F
+GLIBC_2.39 __vfwprintf_chk F
+GLIBC_2.39 __vm_allocate F
+GLIBC_2.39 __vm_deallocate F
+GLIBC_2.39 __vm_page_size D 0x8
+GLIBC_2.39 __vprintf_chk F
+GLIBC_2.39 __vsnprintf F
+GLIBC_2.39 __vsnprintf_chk F
+GLIBC_2.39 __vsprintf_chk F
+GLIBC_2.39 __vsscanf F
+GLIBC_2.39 __vswprintf_chk F
+GLIBC_2.39 __vsyslog_chk F
+GLIBC_2.39 __vwprintf_chk F
+GLIBC_2.39 __wait F
+GLIBC_2.39 __waitpid F
+GLIBC_2.39 __wcpcpy_chk F
+GLIBC_2.39 __wcpncpy_chk F
+GLIBC_2.39 __wcrtomb_chk F
+GLIBC_2.39 __wcscasecmp_l F
+GLIBC_2.39 __wcscat_chk F
+GLIBC_2.39 __wcscoll_l F
+GLIBC_2.39 __wcscpy_chk F
+GLIBC_2.39 __wcsftime_l F
+GLIBC_2.39 __wcslcat_chk F
+GLIBC_2.39 __wcslcpy_chk F
+GLIBC_2.39 __wcsncasecmp_l F
+GLIBC_2.39 __wcsncat_chk F
+GLIBC_2.39 __wcsncpy_chk F
+GLIBC_2.39 __wcsnrtombs_chk F
+GLIBC_2.39 __wcsrtombs_chk F
+GLIBC_2.39 __wcstod_internal F
+GLIBC_2.39 __wcstod_l F
+GLIBC_2.39 __wcstof_internal F
+GLIBC_2.39 __wcstof_l F
+GLIBC_2.39 __wcstol_internal F
+GLIBC_2.39 __wcstol_l F
+GLIBC_2.39 __wcstold_internal F
+GLIBC_2.39 __wcstold_l F
+GLIBC_2.39 __wcstoll_internal F
+GLIBC_2.39 __wcstoll_l F
+GLIBC_2.39 __wcstombs_chk F
+GLIBC_2.39 __wcstoul_internal F
+GLIBC_2.39 __wcstoul_l F
+GLIBC_2.39 __wcstoull_internal F
+GLIBC_2.39 __wcstoull_l F
+GLIBC_2.39 __wcsxfrm_l F
+GLIBC_2.39 __wctomb_chk F
+GLIBC_2.39 __wctrans_l F
+GLIBC_2.39 __wctype_l F
+GLIBC_2.39 __wmemcpy_chk F
+GLIBC_2.39 __wmemmove_chk F
+GLIBC_2.39 __wmempcpy_chk F
+GLIBC_2.39 __wmemset_chk F
+GLIBC_2.39 __woverflow F
+GLIBC_2.39 __wprintf_chk F
+GLIBC_2.39 __write F
+GLIBC_2.39 __writev F
+GLIBC_2.39 __wuflow F
+GLIBC_2.39 __wunderflow F
+GLIBC_2.39 __xpg_basename F
+GLIBC_2.39 __xpg_sigpause F
+GLIBC_2.39 __xpg_strerror_r F
+GLIBC_2.39 _dl_find_object F
+GLIBC_2.39 _dl_mcount_wrapper F
+GLIBC_2.39 _dl_mcount_wrapper_check F
+GLIBC_2.39 _environ D 0x8
+GLIBC_2.39 _exit F
+GLIBC_2.39 _flushlbf F
+GLIBC_2.39 _hurd_canonicalize_directory_name_internal F
+GLIBC_2.39 _hurd_critical_section_lock F
+GLIBC_2.39 _hurd_critical_section_unlock F
+GLIBC_2.39 _hurd_device_master D 0x4
+GLIBC_2.39 _hurd_dtable D 0x8
+GLIBC_2.39 _hurd_dtable_lock D 0x28
+GLIBC_2.39 _hurd_dtablesize D 0x4
+GLIBC_2.39 _hurd_exception2signal F
+GLIBC_2.39 _hurd_exec F
+GLIBC_2.39 _hurd_exec_paths F
+GLIBC_2.39 _hurd_fd_error F
+GLIBC_2.39 _hurd_fd_error_signal F
+GLIBC_2.39 _hurd_fd_get F
+GLIBC_2.39 _hurd_host_priv D 0x4
+GLIBC_2.39 _hurd_init F
+GLIBC_2.39 _hurd_intern_fd F
+GLIBC_2.39 _hurd_intr_rpc_mach_msg F
+GLIBC_2.39 _hurd_libc_proc_init F
+GLIBC_2.39 _hurd_msgport D 0x4
+GLIBC_2.39 _hurd_port_cleanup F
+GLIBC_2.39 _hurd_port_free F
+GLIBC_2.39 _hurd_port_get F
+GLIBC_2.39 _hurd_port_init F
+GLIBC_2.39 _hurd_port_locked_get F
+GLIBC_2.39 _hurd_port_locked_set F
+GLIBC_2.39 _hurd_port_move F
+GLIBC_2.39 _hurd_port_set F
+GLIBC_2.39 _hurd_ports D 0x8
+GLIBC_2.39 _hurd_ports_use F
+GLIBC_2.39 _hurd_proc_init F
+GLIBC_2.39 _hurd_raise_signal F
+GLIBC_2.39 _hurd_self_sigstate F
+GLIBC_2.39 _hurd_thread_sigstate F
+GLIBC_2.39 _hurd_userlink_clear F
+GLIBC_2.39 _hurd_userlink_link F
+GLIBC_2.39 _hurd_userlink_unlink F
+GLIBC_2.39 _hurdsig_fault_catch_exception_raise F
+GLIBC_2.39 _hurdsig_fault_env D 0xc0
+GLIBC_2.39 _hurdsig_fault_preemptor D 0x30
+GLIBC_2.39 _hurdsig_interrupt_timeout D 0x4
+GLIBC_2.39 _libc_intl_domainname D 0x5
+GLIBC_2.39 _longjmp F
+GLIBC_2.39 _mcleanup F
+GLIBC_2.39 _mcount F
+GLIBC_2.39 _nl_default_dirname D 0xe
+GLIBC_2.39 _nl_domain_bindings D 0x8
+GLIBC_2.39 _nl_msg_cat_cntr D 0x4
+GLIBC_2.39 _obstack_allocated_p F
+GLIBC_2.39 _obstack_begin F
+GLIBC_2.39 _obstack_begin_1 F
+GLIBC_2.39 _obstack_free F
+GLIBC_2.39 _obstack_memory_used F
+GLIBC_2.39 _obstack_newchunk F
+GLIBC_2.39 _res D 0x238
+GLIBC_2.39 _res_hconf D 0x48
+GLIBC_2.39 _setjmp F
+GLIBC_2.39 _tolower F
+GLIBC_2.39 _toupper F
+GLIBC_2.39 a64l F
+GLIBC_2.39 abort F
+GLIBC_2.39 abs F
+GLIBC_2.39 accept F
+GLIBC_2.39 accept4 F
+GLIBC_2.39 access F
+GLIBC_2.39 acct F
+GLIBC_2.39 addmntent F
+GLIBC_2.39 addseverity F
+GLIBC_2.39 adjtime F
+GLIBC_2.39 alarm F
+GLIBC_2.39 aligned_alloc F
+GLIBC_2.39 alphasort F
+GLIBC_2.39 alphasort64 F
+GLIBC_2.39 arc4random F
+GLIBC_2.39 arc4random_buf F
+GLIBC_2.39 arc4random_uniform F
+GLIBC_2.39 argp_err_exit_status D 0x4
+GLIBC_2.39 argp_error F
+GLIBC_2.39 argp_failure F
+GLIBC_2.39 argp_help F
+GLIBC_2.39 argp_parse F
+GLIBC_2.39 argp_program_bug_address D 0x8
+GLIBC_2.39 argp_program_version D 0x8
+GLIBC_2.39 argp_program_version_hook D 0x8
+GLIBC_2.39 argp_state_help F
+GLIBC_2.39 argp_usage F
+GLIBC_2.39 argz_add F
+GLIBC_2.39 argz_add_sep F
+GLIBC_2.39 argz_append F
+GLIBC_2.39 argz_count F
+GLIBC_2.39 argz_create F
+GLIBC_2.39 argz_create_sep F
+GLIBC_2.39 argz_delete F
+GLIBC_2.39 argz_extract F
+GLIBC_2.39 argz_insert F
+GLIBC_2.39 argz_next F
+GLIBC_2.39 argz_replace F
+GLIBC_2.39 argz_stringify F
+GLIBC_2.39 asctime F
+GLIBC_2.39 asctime_r F
+GLIBC_2.39 asprintf F
+GLIBC_2.39 atof F
+GLIBC_2.39 atoi F
+GLIBC_2.39 atol F
+GLIBC_2.39 atoll F
+GLIBC_2.39 backtrace F
+GLIBC_2.39 backtrace_symbols F
+GLIBC_2.39 backtrace_symbols_fd F
+GLIBC_2.39 basename F
+GLIBC_2.39 bcmp F
+GLIBC_2.39 bcopy F
+GLIBC_2.39 bind F
+GLIBC_2.39 bind_textdomain_codeset F
+GLIBC_2.39 bindresvport F
+GLIBC_2.39 bindtextdomain F
+GLIBC_2.39 brk F
+GLIBC_2.39 bsd_signal F
+GLIBC_2.39 bsearch F
+GLIBC_2.39 btowc F
+GLIBC_2.39 bzero F
+GLIBC_2.39 c16rtomb F
+GLIBC_2.39 c32rtomb F
+GLIBC_2.39 c8rtomb F
+GLIBC_2.39 calloc F
+GLIBC_2.39 canonicalize_file_name F
+GLIBC_2.39 catclose F
+GLIBC_2.39 catgets F
+GLIBC_2.39 catopen F
+GLIBC_2.39 cfgetispeed F
+GLIBC_2.39 cfgetospeed F
+GLIBC_2.39 cfmakeraw F
+GLIBC_2.39 cfsetispeed F
+GLIBC_2.39 cfsetospeed F
+GLIBC_2.39 cfsetspeed F
+GLIBC_2.39 chdir F
+GLIBC_2.39 chflags F
+GLIBC_2.39 chmod F
+GLIBC_2.39 chown F
+GLIBC_2.39 chroot F
+GLIBC_2.39 clearenv F
+GLIBC_2.39 clearerr F
+GLIBC_2.39 clearerr_unlocked F
+GLIBC_2.39 clock F
+GLIBC_2.39 clock_getcpuclockid F
+GLIBC_2.39 clock_getres F
+GLIBC_2.39 clock_gettime F
+GLIBC_2.39 clock_nanosleep F
+GLIBC_2.39 clock_settime F
+GLIBC_2.39 close F
+GLIBC_2.39 close_range F
+GLIBC_2.39 closedir F
+GLIBC_2.39 closefrom F
+GLIBC_2.39 closelog F
+GLIBC_2.39 confstr F
+GLIBC_2.39 connect F
+GLIBC_2.39 copy_file_range F
+GLIBC_2.39 copysign F
+GLIBC_2.39 copysignf F
+GLIBC_2.39 copysignl F
+GLIBC_2.39 creat F
+GLIBC_2.39 creat64 F
+GLIBC_2.39 ctermid F
+GLIBC_2.39 ctime F
+GLIBC_2.39 ctime_r F
+GLIBC_2.39 cuserid F
+GLIBC_2.39 daemon F
+GLIBC_2.39 daylight D 0x4
+GLIBC_2.39 dcgettext F
+GLIBC_2.39 dcngettext F
+GLIBC_2.39 dgettext F
+GLIBC_2.39 difftime F
+GLIBC_2.39 directory_name_split F
+GLIBC_2.39 dirfd F
+GLIBC_2.39 dirname F
+GLIBC_2.39 div F
+GLIBC_2.39 dl_iterate_phdr F
+GLIBC_2.39 dladdr F
+GLIBC_2.39 dladdr1 F
+GLIBC_2.39 dlclose F
+GLIBC_2.39 dlerror F
+GLIBC_2.39 dlinfo F
+GLIBC_2.39 dlmopen F
+GLIBC_2.39 dlopen F
+GLIBC_2.39 dlsym F
+GLIBC_2.39 dlvsym F
+GLIBC_2.39 dn_comp F
+GLIBC_2.39 dn_expand F
+GLIBC_2.39 dn_skipname F
+GLIBC_2.39 dngettext F
+GLIBC_2.39 dprintf F
+GLIBC_2.39 drand48 F
+GLIBC_2.39 drand48_r F
+GLIBC_2.39 dup F
+GLIBC_2.39 dup2 F
+GLIBC_2.39 dup3 F
+GLIBC_2.39 duplocale F
+GLIBC_2.39 dysize F
+GLIBC_2.39 eaccess F
+GLIBC_2.39 ecvt F
+GLIBC_2.39 ecvt_r F
+GLIBC_2.39 endaliasent F
+GLIBC_2.39 endfsent F
+GLIBC_2.39 endgrent F
+GLIBC_2.39 endhostent F
+GLIBC_2.39 endmntent F
+GLIBC_2.39 endnetent F
+GLIBC_2.39 endnetgrent F
+GLIBC_2.39 endprotoent F
+GLIBC_2.39 endpwent F
+GLIBC_2.39 endrpcent F
+GLIBC_2.39 endservent F
+GLIBC_2.39 endsgent F
+GLIBC_2.39 endspent F
+GLIBC_2.39 endttyent F
+GLIBC_2.39 endusershell F
+GLIBC_2.39 endutent F
+GLIBC_2.39 endutxent F
+GLIBC_2.39 environ D 0x8
+GLIBC_2.39 envz_add F
+GLIBC_2.39 envz_entry F
+GLIBC_2.39 envz_get F
+GLIBC_2.39 envz_merge F
+GLIBC_2.39 envz_remove F
+GLIBC_2.39 envz_strip F
+GLIBC_2.39 erand48 F
+GLIBC_2.39 erand48_r F
+GLIBC_2.39 err F
+GLIBC_2.39 error F
+GLIBC_2.39 error_at_line F
+GLIBC_2.39 error_message_count D 0x4
+GLIBC_2.39 error_one_per_line D 0x4
+GLIBC_2.39 error_print_progname D 0x8
+GLIBC_2.39 errx F
+GLIBC_2.39 ether_aton F
+GLIBC_2.39 ether_aton_r F
+GLIBC_2.39 ether_hostton F
+GLIBC_2.39 ether_line F
+GLIBC_2.39 ether_ntoa F
+GLIBC_2.39 ether_ntoa_r F
+GLIBC_2.39 ether_ntohost F
+GLIBC_2.39 euidaccess F
+GLIBC_2.39 evc_wait F
+GLIBC_2.39 execl F
+GLIBC_2.39 execle F
+GLIBC_2.39 execlp F
+GLIBC_2.39 execv F
+GLIBC_2.39 execve F
+GLIBC_2.39 execveat F
+GLIBC_2.39 execvp F
+GLIBC_2.39 execvpe F
+GLIBC_2.39 exit F
+GLIBC_2.39 explicit_bzero F
+GLIBC_2.39 faccessat F
+GLIBC_2.39 fchdir F
+GLIBC_2.39 fchflags F
+GLIBC_2.39 fchmod F
+GLIBC_2.39 fchmodat F
+GLIBC_2.39 fchown F
+GLIBC_2.39 fchownat F
+GLIBC_2.39 fclose F
+GLIBC_2.39 fcloseall F
+GLIBC_2.39 fcntl F
+GLIBC_2.39 fcntl64 F
+GLIBC_2.39 fcvt F
+GLIBC_2.39 fcvt_r F
+GLIBC_2.39 fdatasync F
+GLIBC_2.39 fdopen F
+GLIBC_2.39 fdopendir F
+GLIBC_2.39 feof F
+GLIBC_2.39 feof_unlocked F
+GLIBC_2.39 ferror F
+GLIBC_2.39 ferror_unlocked F
+GLIBC_2.39 fexecve F
+GLIBC_2.39 fflush F
+GLIBC_2.39 fflush_unlocked F
+GLIBC_2.39 ffs F
+GLIBC_2.39 ffsl F
+GLIBC_2.39 ffsll F
+GLIBC_2.39 fgetc F
+GLIBC_2.39 fgetc_unlocked F
+GLIBC_2.39 fgetgrent F
+GLIBC_2.39 fgetgrent_r F
+GLIBC_2.39 fgetpos F
+GLIBC_2.39 fgetpos64 F
+GLIBC_2.39 fgetpwent F
+GLIBC_2.39 fgetpwent_r F
+GLIBC_2.39 fgets F
+GLIBC_2.39 fgets_unlocked F
+GLIBC_2.39 fgetsgent F
+GLIBC_2.39 fgetsgent_r F
+GLIBC_2.39 fgetspent F
+GLIBC_2.39 fgetspent_r F
+GLIBC_2.39 fgetwc F
+GLIBC_2.39 fgetwc_unlocked F
+GLIBC_2.39 fgetws F
+GLIBC_2.39 fgetws_unlocked F
+GLIBC_2.39 fgetxattr F
+GLIBC_2.39 file_name_lookup F
+GLIBC_2.39 file_name_lookup_under F
+GLIBC_2.39 file_name_path_lookup F
+GLIBC_2.39 file_name_split F
+GLIBC_2.39 fileno F
+GLIBC_2.39 fileno_unlocked F
+GLIBC_2.39 finite F
+GLIBC_2.39 finitef F
+GLIBC_2.39 finitel F
+GLIBC_2.39 flistxattr F
+GLIBC_2.39 flock F
+GLIBC_2.39 flockfile F
+GLIBC_2.39 fmemopen F
+GLIBC_2.39 fmtmsg F
+GLIBC_2.39 fnmatch F
+GLIBC_2.39 fopen F
+GLIBC_2.39 fopen64 F
+GLIBC_2.39 fopencookie F
+GLIBC_2.39 fopenport F
+GLIBC_2.39 fork F
+GLIBC_2.39 forkpty F
+GLIBC_2.39 fpathconf F
+GLIBC_2.39 fprintf F
+GLIBC_2.39 fputc F
+GLIBC_2.39 fputc_unlocked F
+GLIBC_2.39 fputs F
+GLIBC_2.39 fputs_unlocked F
+GLIBC_2.39 fputwc F
+GLIBC_2.39 fputwc_unlocked F
+GLIBC_2.39 fputws F
+GLIBC_2.39 fputws_unlocked F
+GLIBC_2.39 fread F
+GLIBC_2.39 fread_unlocked F
+GLIBC_2.39 free F
+GLIBC_2.39 freeaddrinfo F
+GLIBC_2.39 freeifaddrs F
+GLIBC_2.39 freelocale F
+GLIBC_2.39 fremovexattr F
+GLIBC_2.39 freopen F
+GLIBC_2.39 freopen64 F
+GLIBC_2.39 frexp F
+GLIBC_2.39 frexpf F
+GLIBC_2.39 frexpl F
+GLIBC_2.39 fscanf F
+GLIBC_2.39 fseek F
+GLIBC_2.39 fseeko F
+GLIBC_2.39 fseeko64 F
+GLIBC_2.39 fsetpos F
+GLIBC_2.39 fsetpos64 F
+GLIBC_2.39 fsetxattr F
+GLIBC_2.39 fstat F
+GLIBC_2.39 fstat64 F
+GLIBC_2.39 fstatat F
+GLIBC_2.39 fstatat64 F
+GLIBC_2.39 fstatfs F
+GLIBC_2.39 fstatfs64 F
+GLIBC_2.39 fstatvfs F
+GLIBC_2.39 fstatvfs64 F
+GLIBC_2.39 fsync F
+GLIBC_2.39 ftell F
+GLIBC_2.39 ftello F
+GLIBC_2.39 ftello64 F
+GLIBC_2.39 ftime F
+GLIBC_2.39 ftok F
+GLIBC_2.39 ftruncate F
+GLIBC_2.39 ftruncate64 F
+GLIBC_2.39 ftrylockfile F
+GLIBC_2.39 fts64_children F
+GLIBC_2.39 fts64_close F
+GLIBC_2.39 fts64_open F
+GLIBC_2.39 fts64_read F
+GLIBC_2.39 fts64_set F
+GLIBC_2.39 fts_children F
+GLIBC_2.39 fts_close F
+GLIBC_2.39 fts_open F
+GLIBC_2.39 fts_read F
+GLIBC_2.39 fts_set F
+GLIBC_2.39 ftw F
+GLIBC_2.39 ftw64 F
+GLIBC_2.39 funlockfile F
+GLIBC_2.39 futimens F
+GLIBC_2.39 futimes F
+GLIBC_2.39 futimesat F
+GLIBC_2.39 fwide F
+GLIBC_2.39 fwprintf F
+GLIBC_2.39 fwrite F
+GLIBC_2.39 fwrite_unlocked F
+GLIBC_2.39 fwscanf F
+GLIBC_2.39 gai_strerror F
+GLIBC_2.39 gcvt F
+GLIBC_2.39 get_avphys_pages F
+GLIBC_2.39 get_current_dir_name F
+GLIBC_2.39 get_nprocs F
+GLIBC_2.39 get_nprocs_conf F
+GLIBC_2.39 get_phys_pages F
+GLIBC_2.39 get_privileged_ports F
+GLIBC_2.39 getaddrinfo F
+GLIBC_2.39 getaliasbyname F
+GLIBC_2.39 getaliasbyname_r F
+GLIBC_2.39 getaliasent F
+GLIBC_2.39 getaliasent_r F
+GLIBC_2.39 getauth F
+GLIBC_2.39 getauxval F
+GLIBC_2.39 getc F
+GLIBC_2.39 getc_unlocked F
+GLIBC_2.39 getchar F
+GLIBC_2.39 getchar_unlocked F
+GLIBC_2.39 getcontext F
+GLIBC_2.39 getcrdir F
+GLIBC_2.39 getcttyid F
+GLIBC_2.39 getcwd F
+GLIBC_2.39 getcwdir F
+GLIBC_2.39 getdate F
+GLIBC_2.39 getdate_err D 0x4
+GLIBC_2.39 getdate_r F
+GLIBC_2.39 getdelim F
+GLIBC_2.39 getdirentries F
+GLIBC_2.39 getdirentries64 F
+GLIBC_2.39 getdomainname F
+GLIBC_2.39 getdport F
+GLIBC_2.39 getdtablesize F
+GLIBC_2.39 getegid F
+GLIBC_2.39 getentropy F
+GLIBC_2.39 getenv F
+GLIBC_2.39 geteuid F
+GLIBC_2.39 geteuids F
+GLIBC_2.39 getfsent F
+GLIBC_2.39 getfsfile F
+GLIBC_2.39 getfsspec F
+GLIBC_2.39 getgid F
+GLIBC_2.39 getgrent F
+GLIBC_2.39 getgrent_r F
+GLIBC_2.39 getgrgid F
+GLIBC_2.39 getgrgid_r F
+GLIBC_2.39 getgrnam F
+GLIBC_2.39 getgrnam_r F
+GLIBC_2.39 getgrouplist F
+GLIBC_2.39 getgroups F
+GLIBC_2.39 gethostbyaddr F
+GLIBC_2.39 gethostbyaddr_r F
+GLIBC_2.39 gethostbyname F
+GLIBC_2.39 gethostbyname2 F
+GLIBC_2.39 gethostbyname2_r F
+GLIBC_2.39 gethostbyname_r F
+GLIBC_2.39 gethostent F
+GLIBC_2.39 gethostent_r F
+GLIBC_2.39 gethostid F
+GLIBC_2.39 gethostname F
+GLIBC_2.39 getifaddrs F
+GLIBC_2.39 getipv4sourcefilter F
+GLIBC_2.39 getitimer F
+GLIBC_2.39 getline F
+GLIBC_2.39 getloadavg F
+GLIBC_2.39 getlogin F
+GLIBC_2.39 getlogin_r F
+GLIBC_2.39 getmntent F
+GLIBC_2.39 getmntent_r F
+GLIBC_2.39 getnameinfo F
+GLIBC_2.39 getnetbyaddr F
+GLIBC_2.39 getnetbyaddr_r F
+GLIBC_2.39 getnetbyname F
+GLIBC_2.39 getnetbyname_r F
+GLIBC_2.39 getnetent F
+GLIBC_2.39 getnetent_r F
+GLIBC_2.39 getnetgrent F
+GLIBC_2.39 getnetgrent_r F
+GLIBC_2.39 getopt F
+GLIBC_2.39 getopt_long F
+GLIBC_2.39 getopt_long_only F
+GLIBC_2.39 getpagesize F
+GLIBC_2.39 getpass F
+GLIBC_2.39 getpeername F
+GLIBC_2.39 getpgid F
+GLIBC_2.39 getpgrp F
+GLIBC_2.39 getpid F
+GLIBC_2.39 getppid F
+GLIBC_2.39 getpriority F
+GLIBC_2.39 getproc F
+GLIBC_2.39 getprotobyname F
+GLIBC_2.39 getprotobyname_r F
+GLIBC_2.39 getprotobynumber F
+GLIBC_2.39 getprotobynumber_r F
+GLIBC_2.39 getprotoent F
+GLIBC_2.39 getprotoent_r F
+GLIBC_2.39 getpt F
+GLIBC_2.39 getpw F
+GLIBC_2.39 getpwent F
+GLIBC_2.39 getpwent_r F
+GLIBC_2.39 getpwnam F
+GLIBC_2.39 getpwnam_r F
+GLIBC_2.39 getpwuid F
+GLIBC_2.39 getpwuid_r F
+GLIBC_2.39 getrandom F
+GLIBC_2.39 getresgid F
+GLIBC_2.39 getresuid F
+GLIBC_2.39 getrlimit F
+GLIBC_2.39 getrlimit64 F
+GLIBC_2.39 getrpcbyname F
+GLIBC_2.39 getrpcbyname_r F
+GLIBC_2.39 getrpcbynumber F
+GLIBC_2.39 getrpcbynumber_r F
+GLIBC_2.39 getrpcent F
+GLIBC_2.39 getrpcent_r F
+GLIBC_2.39 getrusage F
+GLIBC_2.39 gets F
+GLIBC_2.39 getservbyname F
+GLIBC_2.39 getservbyname_r F
+GLIBC_2.39 getservbyport F
+GLIBC_2.39 getservbyport_r F
+GLIBC_2.39 getservent F
+GLIBC_2.39 getservent_r F
+GLIBC_2.39 getsgent F
+GLIBC_2.39 getsgent_r F
+GLIBC_2.39 getsgnam F
+GLIBC_2.39 getsgnam_r F
+GLIBC_2.39 getsid F
+GLIBC_2.39 getsockname F
+GLIBC_2.39 getsockopt F
+GLIBC_2.39 getsourcefilter F
+GLIBC_2.39 getspent F
+GLIBC_2.39 getspent_r F
+GLIBC_2.39 getspnam F
+GLIBC_2.39 getspnam_r F
+GLIBC_2.39 getsubopt F
+GLIBC_2.39 gettext F
+GLIBC_2.39 gettimeofday F
+GLIBC_2.39 getttyent F
+GLIBC_2.39 getttynam F
+GLIBC_2.39 getuid F
+GLIBC_2.39 getumask F
+GLIBC_2.39 getusershell F
+GLIBC_2.39 getutent F
+GLIBC_2.39 getutent_r F
+GLIBC_2.39 getutid F
+GLIBC_2.39 getutid_r F
+GLIBC_2.39 getutline F
+GLIBC_2.39 getutline_r F
+GLIBC_2.39 getutmp F
+GLIBC_2.39 getutmpx F
+GLIBC_2.39 getutxent F
+GLIBC_2.39 getutxid F
+GLIBC_2.39 getutxline F
+GLIBC_2.39 getw F
+GLIBC_2.39 getwc F
+GLIBC_2.39 getwc_unlocked F
+GLIBC_2.39 getwchar F
+GLIBC_2.39 getwchar_unlocked F
+GLIBC_2.39 getwd F
+GLIBC_2.39 getxattr F
+GLIBC_2.39 glob F
+GLIBC_2.39 glob64 F
+GLIBC_2.39 glob_pattern_p F
+GLIBC_2.39 globfree F
+GLIBC_2.39 globfree64 F
+GLIBC_2.39 gmtime F
+GLIBC_2.39 gmtime_r F
+GLIBC_2.39 gnu_dev_major F
+GLIBC_2.39 gnu_dev_makedev F
+GLIBC_2.39 gnu_dev_minor F
+GLIBC_2.39 gnu_get_libc_release F
+GLIBC_2.39 gnu_get_libc_version F
+GLIBC_2.39 grantpt F
+GLIBC_2.39 group_member F
+GLIBC_2.39 gsignal F
+GLIBC_2.39 gtty F
+GLIBC_2.39 h_errlist D 0x28
+GLIBC_2.39 h_nerr D 0x4
+GLIBC_2.39 hasmntopt F
+GLIBC_2.39 hcreate F
+GLIBC_2.39 hcreate_r F
+GLIBC_2.39 hdestroy F
+GLIBC_2.39 hdestroy_r F
+GLIBC_2.39 herror F
+GLIBC_2.39 hsearch F
+GLIBC_2.39 hsearch_r F
+GLIBC_2.39 hstrerror F
+GLIBC_2.39 htonl F
+GLIBC_2.39 htons F
+GLIBC_2.39 hurd_catch_signal F
+GLIBC_2.39 hurd_check_cancel F
+GLIBC_2.39 hurd_directory_name_split F
+GLIBC_2.39 hurd_file_name_lookup F
+GLIBC_2.39 hurd_file_name_lookup_retry F
+GLIBC_2.39 hurd_file_name_path_lookup F
+GLIBC_2.39 hurd_file_name_split F
+GLIBC_2.39 hurd_preempt_signals F
+GLIBC_2.39 hurd_safe_copyin F
+GLIBC_2.39 hurd_safe_copyout F
+GLIBC_2.39 hurd_safe_memmove F
+GLIBC_2.39 hurd_safe_memset F
+GLIBC_2.39 hurd_sig_post F
+GLIBC_2.39 hurd_thread_cancel F
+GLIBC_2.39 hurd_thread_self F
+GLIBC_2.39 hurd_unpreempt_signals F
+GLIBC_2.39 iconv F
+GLIBC_2.39 iconv_close F
+GLIBC_2.39 iconv_open F
+GLIBC_2.39 if_freenameindex F
+GLIBC_2.39 if_indextoname F
+GLIBC_2.39 if_nameindex F
+GLIBC_2.39 if_nametoindex F
+GLIBC_2.39 imaxabs F
+GLIBC_2.39 imaxdiv F
+GLIBC_2.39 in6addr_any D 0x10
+GLIBC_2.39 in6addr_loopback D 0x10
+GLIBC_2.39 index F
+GLIBC_2.39 inet6_opt_append F
+GLIBC_2.39 inet6_opt_find F
+GLIBC_2.39 inet6_opt_finish F
+GLIBC_2.39 inet6_opt_get_val F
+GLIBC_2.39 inet6_opt_init F
+GLIBC_2.39 inet6_opt_next F
+GLIBC_2.39 inet6_opt_set_val F
+GLIBC_2.39 inet6_option_alloc F
+GLIBC_2.39 inet6_option_append F
+GLIBC_2.39 inet6_option_find F
+GLIBC_2.39 inet6_option_init F
+GLIBC_2.39 inet6_option_next F
+GLIBC_2.39 inet6_option_space F
+GLIBC_2.39 inet6_rth_add F
+GLIBC_2.39 inet6_rth_getaddr F
+GLIBC_2.39 inet6_rth_init F
+GLIBC_2.39 inet6_rth_reverse F
+GLIBC_2.39 inet6_rth_segments F
+GLIBC_2.39 inet6_rth_space F
+GLIBC_2.39 inet_addr F
+GLIBC_2.39 inet_aton F
+GLIBC_2.39 inet_lnaof F
+GLIBC_2.39 inet_makeaddr F
+GLIBC_2.39 inet_netof F
+GLIBC_2.39 inet_network F
+GLIBC_2.39 inet_nsap_addr F
+GLIBC_2.39 inet_nsap_ntoa F
+GLIBC_2.39 inet_ntoa F
+GLIBC_2.39 inet_ntop F
+GLIBC_2.39 inet_pton F
+GLIBC_2.39 initgroups F
+GLIBC_2.39 initstate F
+GLIBC_2.39 initstate_r F
+GLIBC_2.39 innetgr F
+GLIBC_2.39 insque F
+GLIBC_2.39 ioctl F
+GLIBC_2.39 iruserok F
+GLIBC_2.39 iruserok_af F
+GLIBC_2.39 isalnum F
+GLIBC_2.39 isalnum_l F
+GLIBC_2.39 isalpha F
+GLIBC_2.39 isalpha_l F
+GLIBC_2.39 isascii F
+GLIBC_2.39 isatty F
+GLIBC_2.39 isblank F
+GLIBC_2.39 isblank_l F
+GLIBC_2.39 iscntrl F
+GLIBC_2.39 iscntrl_l F
+GLIBC_2.39 isctype F
+GLIBC_2.39 isdigit F
+GLIBC_2.39 isdigit_l F
+GLIBC_2.39 isfdtype F
+GLIBC_2.39 isgraph F
+GLIBC_2.39 isgraph_l F
+GLIBC_2.39 isinf F
+GLIBC_2.39 isinff F
+GLIBC_2.39 isinfl F
+GLIBC_2.39 islower F
+GLIBC_2.39 islower_l F
+GLIBC_2.39 isnan F
+GLIBC_2.39 isnanf F
+GLIBC_2.39 isnanl F
+GLIBC_2.39 isprint F
+GLIBC_2.39 isprint_l F
+GLIBC_2.39 ispunct F
+GLIBC_2.39 ispunct_l F
+GLIBC_2.39 isspace F
+GLIBC_2.39 isspace_l F
+GLIBC_2.39 isupper F
+GLIBC_2.39 isupper_l F
+GLIBC_2.39 iswalnum F
+GLIBC_2.39 iswalnum_l F
+GLIBC_2.39 iswalpha F
+GLIBC_2.39 iswalpha_l F
+GLIBC_2.39 iswblank F
+GLIBC_2.39 iswblank_l F
+GLIBC_2.39 iswcntrl F
+GLIBC_2.39 iswcntrl_l F
+GLIBC_2.39 iswctype F
+GLIBC_2.39 iswctype_l F
+GLIBC_2.39 iswdigit F
+GLIBC_2.39 iswdigit_l F
+GLIBC_2.39 iswgraph F
+GLIBC_2.39 iswgraph_l F
+GLIBC_2.39 iswlower F
+GLIBC_2.39 iswlower_l F
+GLIBC_2.39 iswprint F
+GLIBC_2.39 iswprint_l F
+GLIBC_2.39 iswpunct F
+GLIBC_2.39 iswpunct_l F
+GLIBC_2.39 iswspace F
+GLIBC_2.39 iswspace_l F
+GLIBC_2.39 iswupper F
+GLIBC_2.39 iswupper_l F
+GLIBC_2.39 iswxdigit F
+GLIBC_2.39 iswxdigit_l F
+GLIBC_2.39 isxdigit F
+GLIBC_2.39 isxdigit_l F
+GLIBC_2.39 jrand48 F
+GLIBC_2.39 jrand48_r F
+GLIBC_2.39 kill F
+GLIBC_2.39 killpg F
+GLIBC_2.39 l64a F
+GLIBC_2.39 labs F
+GLIBC_2.39 lchmod F
+GLIBC_2.39 lchown F
+GLIBC_2.39 lckpwdf F
+GLIBC_2.39 lcong48 F
+GLIBC_2.39 lcong48_r F
+GLIBC_2.39 ldexp F
+GLIBC_2.39 ldexpf F
+GLIBC_2.39 ldexpl F
+GLIBC_2.39 ldiv F
+GLIBC_2.39 lfind F
+GLIBC_2.39 lgetxattr F
+GLIBC_2.39 link F
+GLIBC_2.39 linkat F
+GLIBC_2.39 listen F
+GLIBC_2.39 listxattr F
+GLIBC_2.39 llabs F
+GLIBC_2.39 lldiv F
+GLIBC_2.39 llistxattr F
+GLIBC_2.39 localeconv F
+GLIBC_2.39 localtime F
+GLIBC_2.39 localtime_r F
+GLIBC_2.39 lockf F
+GLIBC_2.39 lockf64 F
+GLIBC_2.39 login F
+GLIBC_2.39 login_tty F
+GLIBC_2.39 logout F
+GLIBC_2.39 logwtmp F
+GLIBC_2.39 longjmp F
+GLIBC_2.39 lrand48 F
+GLIBC_2.39 lrand48_r F
+GLIBC_2.39 lremovexattr F
+GLIBC_2.39 lsearch F
+GLIBC_2.39 lseek F
+GLIBC_2.39 lseek64 F
+GLIBC_2.39 lsetxattr F
+GLIBC_2.39 lstat F
+GLIBC_2.39 lstat64 F
+GLIBC_2.39 lutimes F
+GLIBC_2.39 mach_error F
+GLIBC_2.39 mach_error_string F
+GLIBC_2.39 mach_error_type F
+GLIBC_2.39 mach_host_self F
+GLIBC_2.39 mach_msg F
+GLIBC_2.39 mach_msg_destroy F
+GLIBC_2.39 mach_msg_receive F
+GLIBC_2.39 mach_msg_send F
+GLIBC_2.39 mach_msg_server F
+GLIBC_2.39 mach_msg_server_timeout F
+GLIBC_2.39 mach_open_devstream F
+GLIBC_2.39 mach_port_allocate F
+GLIBC_2.39 mach_port_allocate_name F
+GLIBC_2.39 mach_port_deallocate F
+GLIBC_2.39 mach_port_insert_right F
+GLIBC_2.39 mach_print F
+GLIBC_2.39 mach_reply_port F
+GLIBC_2.39 mach_setup_thread F
+GLIBC_2.39 mach_setup_tls F
+GLIBC_2.39 mach_task_self F
+GLIBC_2.39 mach_thread_self F
+GLIBC_2.39 madvise F
+GLIBC_2.39 makecontext F
+GLIBC_2.39 mallinfo F
+GLIBC_2.39 mallinfo2 F
+GLIBC_2.39 malloc F
+GLIBC_2.39 malloc_info F
+GLIBC_2.39 malloc_stats F
+GLIBC_2.39 malloc_trim F
+GLIBC_2.39 malloc_usable_size F
+GLIBC_2.39 mallopt F
+GLIBC_2.39 mblen F
+GLIBC_2.39 mbrlen F
+GLIBC_2.39 mbrtoc16 F
+GLIBC_2.39 mbrtoc32 F
+GLIBC_2.39 mbrtoc8 F
+GLIBC_2.39 mbrtowc F
+GLIBC_2.39 mbsinit F
+GLIBC_2.39 mbsnrtowcs F
+GLIBC_2.39 mbsrtowcs F
+GLIBC_2.39 mbstowcs F
+GLIBC_2.39 mbtowc F
+GLIBC_2.39 mcheck F
+GLIBC_2.39 mcheck_check_all F
+GLIBC_2.39 mcheck_pedantic F
+GLIBC_2.39 memalign F
+GLIBC_2.39 memccpy F
+GLIBC_2.39 memchr F
+GLIBC_2.39 memcmp F
+GLIBC_2.39 memcpy F
+GLIBC_2.39 memfrob F
+GLIBC_2.39 memmem F
+GLIBC_2.39 memmove F
+GLIBC_2.39 mempcpy F
+GLIBC_2.39 memrchr F
+GLIBC_2.39 memset F
+GLIBC_2.39 mig_allocate F
+GLIBC_2.39 mig_dealloc_reply_port F
+GLIBC_2.39 mig_deallocate F
+GLIBC_2.39 mig_get_reply_port F
+GLIBC_2.39 mig_init F
+GLIBC_2.39 mig_put_reply_port F
+GLIBC_2.39 mig_strncpy F
+GLIBC_2.39 mincore F
+GLIBC_2.39 mkdir F
+GLIBC_2.39 mkdirat F
+GLIBC_2.39 mkdtemp F
+GLIBC_2.39 mkfifo F
+GLIBC_2.39 mkfifoat F
+GLIBC_2.39 mknod F
+GLIBC_2.39 mknodat F
+GLIBC_2.39 mkostemp F
+GLIBC_2.39 mkostemp64 F
+GLIBC_2.39 mkostemps F
+GLIBC_2.39 mkostemps64 F
+GLIBC_2.39 mkstemp F
+GLIBC_2.39 mkstemp64 F
+GLIBC_2.39 mkstemps F
+GLIBC_2.39 mkstemps64 F
+GLIBC_2.39 mktemp F
+GLIBC_2.39 mktime F
+GLIBC_2.39 mlock F
+GLIBC_2.39 mlockall F
+GLIBC_2.39 mmap F
+GLIBC_2.39 mmap64 F
+GLIBC_2.39 modf F
+GLIBC_2.39 modff F
+GLIBC_2.39 modfl F
+GLIBC_2.39 moncontrol F
+GLIBC_2.39 monstartup F
+GLIBC_2.39 mprobe F
+GLIBC_2.39 mprotect F
+GLIBC_2.39 mrand48 F
+GLIBC_2.39 mrand48_r F
+GLIBC_2.39 mremap F
+GLIBC_2.39 msgctl F
+GLIBC_2.39 msgget F
+GLIBC_2.39 msgrcv F
+GLIBC_2.39 msgsnd F
+GLIBC_2.39 msync F
+GLIBC_2.39 mtrace F
+GLIBC_2.39 munlock F
+GLIBC_2.39 munlockall F
+GLIBC_2.39 munmap F
+GLIBC_2.39 muntrace F
+GLIBC_2.39 nanosleep F
+GLIBC_2.39 newlocale F
+GLIBC_2.39 nftw F
+GLIBC_2.39 nftw64 F
+GLIBC_2.39 ngettext F
+GLIBC_2.39 nice F
+GLIBC_2.39 nl_langinfo F
+GLIBC_2.39 nl_langinfo_l F
+GLIBC_2.39 nrand48 F
+GLIBC_2.39 nrand48_r F
+GLIBC_2.39 ns_name_compress F
+GLIBC_2.39 ns_name_ntop F
+GLIBC_2.39 ns_name_pack F
+GLIBC_2.39 ns_name_pton F
+GLIBC_2.39 ns_name_skip F
+GLIBC_2.39 ns_name_uncompress F
+GLIBC_2.39 ns_name_unpack F
+GLIBC_2.39 ntohl F
+GLIBC_2.39 ntohs F
+GLIBC_2.39 obstack_alloc_failed_handler D 0x8
+GLIBC_2.39 obstack_exit_failure D 0x4
+GLIBC_2.39 obstack_free F
+GLIBC_2.39 obstack_printf F
+GLIBC_2.39 obstack_vprintf F
+GLIBC_2.39 on_exit F
+GLIBC_2.39 open F
+GLIBC_2.39 open64 F
+GLIBC_2.39 open_memstream F
+GLIBC_2.39 open_wmemstream F
+GLIBC_2.39 openat F
+GLIBC_2.39 openat64 F
+GLIBC_2.39 opendir F
+GLIBC_2.39 openlog F
+GLIBC_2.39 openport F
+GLIBC_2.39 openpty F
+GLIBC_2.39 optarg D 0x8
+GLIBC_2.39 opterr D 0x4
+GLIBC_2.39 optind D 0x4
+GLIBC_2.39 optopt D 0x4
+GLIBC_2.39 parse_printf_format F
+GLIBC_2.39 pathconf F
+GLIBC_2.39 pause F
+GLIBC_2.39 pclose F
+GLIBC_2.39 perror F
+GLIBC_2.39 pid2task F
+GLIBC_2.39 pipe F
+GLIBC_2.39 pipe2 F
+GLIBC_2.39 poll F
+GLIBC_2.39 popen F
+GLIBC_2.39 posix_fadvise F
+GLIBC_2.39 posix_fadvise64 F
+GLIBC_2.39 posix_fallocate F
+GLIBC_2.39 posix_fallocate64 F
+GLIBC_2.39 posix_madvise F
+GLIBC_2.39 posix_memalign F
+GLIBC_2.39 posix_openpt F
+GLIBC_2.39 posix_spawn F
+GLIBC_2.39 posix_spawn_file_actions_addchdir_np F
+GLIBC_2.39 posix_spawn_file_actions_addclose F
+GLIBC_2.39 posix_spawn_file_actions_addclosefrom_np F
+GLIBC_2.39 posix_spawn_file_actions_adddup2 F
+GLIBC_2.39 posix_spawn_file_actions_addfchdir_np F
+GLIBC_2.39 posix_spawn_file_actions_addopen F
+GLIBC_2.39 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.39 posix_spawn_file_actions_destroy F
+GLIBC_2.39 posix_spawn_file_actions_init F
+GLIBC_2.39 posix_spawnattr_destroy F
+GLIBC_2.39 posix_spawnattr_getflags F
+GLIBC_2.39 posix_spawnattr_getpgroup F
+GLIBC_2.39 posix_spawnattr_getschedparam F
+GLIBC_2.39 posix_spawnattr_getschedpolicy F
+GLIBC_2.39 posix_spawnattr_getsigdefault F
+GLIBC_2.39 posix_spawnattr_getsigmask F
+GLIBC_2.39 posix_spawnattr_init F
+GLIBC_2.39 posix_spawnattr_setflags F
+GLIBC_2.39 posix_spawnattr_setpgroup F
+GLIBC_2.39 posix_spawnattr_setschedparam F
+GLIBC_2.39 posix_spawnattr_setschedpolicy F
+GLIBC_2.39 posix_spawnattr_setsigdefault F
+GLIBC_2.39 posix_spawnattr_setsigmask F
+GLIBC_2.39 posix_spawnp F
+GLIBC_2.39 ppoll F
+GLIBC_2.39 pread F
+GLIBC_2.39 pread64 F
+GLIBC_2.39 preadv F
+GLIBC_2.39 preadv2 F
+GLIBC_2.39 preadv64 F
+GLIBC_2.39 preadv64v2 F
+GLIBC_2.39 printf F
+GLIBC_2.39 printf_size F
+GLIBC_2.39 printf_size_info F
+GLIBC_2.39 profil F
+GLIBC_2.39 program_invocation_name D 0x8
+GLIBC_2.39 program_invocation_short_name D 0x8
+GLIBC_2.39 pselect F
+GLIBC_2.39 psiginfo F
+GLIBC_2.39 psignal F
+GLIBC_2.39 pthread_attr_destroy F
+GLIBC_2.39 pthread_attr_getdetachstate F
+GLIBC_2.39 pthread_attr_getinheritsched F
+GLIBC_2.39 pthread_attr_getschedparam F
+GLIBC_2.39 pthread_attr_getschedpolicy F
+GLIBC_2.39 pthread_attr_getscope F
+GLIBC_2.39 pthread_attr_init F
+GLIBC_2.39 pthread_attr_setdetachstate F
+GLIBC_2.39 pthread_attr_setinheritsched F
+GLIBC_2.39 pthread_attr_setschedparam F
+GLIBC_2.39 pthread_attr_setschedpolicy F
+GLIBC_2.39 pthread_attr_setscope F
+GLIBC_2.39 pthread_cond_broadcast F
+GLIBC_2.39 pthread_cond_destroy F
+GLIBC_2.39 pthread_cond_init F
+GLIBC_2.39 pthread_cond_signal F
+GLIBC_2.39 pthread_cond_timedwait F
+GLIBC_2.39 pthread_cond_wait F
+GLIBC_2.39 pthread_condattr_destroy F
+GLIBC_2.39 pthread_condattr_init F
+GLIBC_2.39 pthread_equal F
+GLIBC_2.39 pthread_exit F
+GLIBC_2.39 pthread_getschedparam F
+GLIBC_2.39 pthread_mutex_destroy F
+GLIBC_2.39 pthread_mutex_init F
+GLIBC_2.39 pthread_mutex_lock F
+GLIBC_2.39 pthread_mutex_unlock F
+GLIBC_2.39 pthread_self F
+GLIBC_2.39 pthread_setcancelstate F
+GLIBC_2.39 pthread_setcanceltype F
+GLIBC_2.39 pthread_setschedparam F
+GLIBC_2.39 ptrace F
+GLIBC_2.39 ptsname F
+GLIBC_2.39 ptsname_r F
+GLIBC_2.39 putc F
+GLIBC_2.39 putc_unlocked F
+GLIBC_2.39 putchar F
+GLIBC_2.39 putchar_unlocked F
+GLIBC_2.39 putenv F
+GLIBC_2.39 putgrent F
+GLIBC_2.39 putpwent F
+GLIBC_2.39 puts F
+GLIBC_2.39 putsgent F
+GLIBC_2.39 putspent F
+GLIBC_2.39 pututline F
+GLIBC_2.39 pututxline F
+GLIBC_2.39 putw F
+GLIBC_2.39 putwc F
+GLIBC_2.39 putwc_unlocked F
+GLIBC_2.39 putwchar F
+GLIBC_2.39 putwchar_unlocked F
+GLIBC_2.39 pvalloc F
+GLIBC_2.39 pwrite F
+GLIBC_2.39 pwrite64 F
+GLIBC_2.39 pwritev F
+GLIBC_2.39 pwritev2 F
+GLIBC_2.39 pwritev64 F
+GLIBC_2.39 pwritev64v2 F
+GLIBC_2.39 qecvt F
+GLIBC_2.39 qecvt_r F
+GLIBC_2.39 qfcvt F
+GLIBC_2.39 qfcvt_r F
+GLIBC_2.39 qgcvt F
+GLIBC_2.39 qsort F
+GLIBC_2.39 qsort_r F
+GLIBC_2.39 quick_exit F
+GLIBC_2.39 raise F
+GLIBC_2.39 rand F
+GLIBC_2.39 rand_r F
+GLIBC_2.39 random F
+GLIBC_2.39 random_r F
+GLIBC_2.39 rawmemchr F
+GLIBC_2.39 rcmd F
+GLIBC_2.39 rcmd_af F
+GLIBC_2.39 re_comp F
+GLIBC_2.39 re_compile_fastmap F
+GLIBC_2.39 re_compile_pattern F
+GLIBC_2.39 re_exec F
+GLIBC_2.39 re_match F
+GLIBC_2.39 re_match_2 F
+GLIBC_2.39 re_search F
+GLIBC_2.39 re_search_2 F
+GLIBC_2.39 re_set_registers F
+GLIBC_2.39 re_set_syntax F
+GLIBC_2.39 re_syntax_options D 0x8
+GLIBC_2.39 read F
+GLIBC_2.39 readdir F
+GLIBC_2.39 readdir64 F
+GLIBC_2.39 readdir64_r F
+GLIBC_2.39 readdir_r F
+GLIBC_2.39 readlink F
+GLIBC_2.39 readlinkat F
+GLIBC_2.39 readv F
+GLIBC_2.39 realloc F
+GLIBC_2.39 reallocarray F
+GLIBC_2.39 realpath F
+GLIBC_2.39 reboot F
+GLIBC_2.39 recv F
+GLIBC_2.39 recvfrom F
+GLIBC_2.39 recvmmsg F
+GLIBC_2.39 recvmsg F
+GLIBC_2.39 regcomp F
+GLIBC_2.39 regerror F
+GLIBC_2.39 regexec F
+GLIBC_2.39 regfree F
+GLIBC_2.39 register_printf_function F
+GLIBC_2.39 register_printf_modifier F
+GLIBC_2.39 register_printf_specifier F
+GLIBC_2.39 register_printf_type F
+GLIBC_2.39 remap_file_pages F
+GLIBC_2.39 remove F
+GLIBC_2.39 removexattr F
+GLIBC_2.39 remque F
+GLIBC_2.39 rename F
+GLIBC_2.39 renameat F
+GLIBC_2.39 renameat2 F
+GLIBC_2.39 res_dnok F
+GLIBC_2.39 res_hnok F
+GLIBC_2.39 res_mailok F
+GLIBC_2.39 res_mkquery F
+GLIBC_2.39 res_nmkquery F
+GLIBC_2.39 res_nquery F
+GLIBC_2.39 res_nquerydomain F
+GLIBC_2.39 res_nsearch F
+GLIBC_2.39 res_nsend F
+GLIBC_2.39 res_ownok F
+GLIBC_2.39 res_query F
+GLIBC_2.39 res_querydomain F
+GLIBC_2.39 res_search F
+GLIBC_2.39 res_send F
+GLIBC_2.39 revoke F
+GLIBC_2.39 rewind F
+GLIBC_2.39 rewinddir F
+GLIBC_2.39 rexec F
+GLIBC_2.39 rexec_af F
+GLIBC_2.39 rexecoptions D 0x4
+GLIBC_2.39 rindex F
+GLIBC_2.39 rmdir F
+GLIBC_2.39 rpmatch F
+GLIBC_2.39 rresvport F
+GLIBC_2.39 rresvport_af F
+GLIBC_2.39 ruserok F
+GLIBC_2.39 ruserok_af F
+GLIBC_2.39 ruserpass F
+GLIBC_2.39 sbrk F
+GLIBC_2.39 scalbn F
+GLIBC_2.39 scalbnf F
+GLIBC_2.39 scalbnl F
+GLIBC_2.39 scandir F
+GLIBC_2.39 scandir64 F
+GLIBC_2.39 scandirat F
+GLIBC_2.39 scandirat64 F
+GLIBC_2.39 scanf F
+GLIBC_2.39 sched_get_priority_max F
+GLIBC_2.39 sched_get_priority_min F
+GLIBC_2.39 sched_getaffinity F
+GLIBC_2.39 sched_getparam F
+GLIBC_2.39 sched_getscheduler F
+GLIBC_2.39 sched_rr_get_interval F
+GLIBC_2.39 sched_setaffinity F
+GLIBC_2.39 sched_setparam F
+GLIBC_2.39 sched_setscheduler F
+GLIBC_2.39 sched_yield F
+GLIBC_2.39 secure_getenv F
+GLIBC_2.39 seed48 F
+GLIBC_2.39 seed48_r F
+GLIBC_2.39 seekdir F
+GLIBC_2.39 select F
+GLIBC_2.39 semctl F
+GLIBC_2.39 semget F
+GLIBC_2.39 semop F
+GLIBC_2.39 semtimedop F
+GLIBC_2.39 send F
+GLIBC_2.39 sendfile F
+GLIBC_2.39 sendfile64 F
+GLIBC_2.39 sendmmsg F
+GLIBC_2.39 sendmsg F
+GLIBC_2.39 sendto F
+GLIBC_2.39 setaliasent F
+GLIBC_2.39 setauth F
+GLIBC_2.39 setbuf F
+GLIBC_2.39 setbuffer F
+GLIBC_2.39 setcontext F
+GLIBC_2.39 setcrdir F
+GLIBC_2.39 setcttyid F
+GLIBC_2.39 setcwdir F
+GLIBC_2.39 setdomainname F
+GLIBC_2.39 setegid F
+GLIBC_2.39 setenv F
+GLIBC_2.39 seteuid F
+GLIBC_2.39 seteuids F
+GLIBC_2.39 setfsent F
+GLIBC_2.39 setgid F
+GLIBC_2.39 setgrent F
+GLIBC_2.39 setgroups F
+GLIBC_2.39 sethostent F
+GLIBC_2.39 sethostid F
+GLIBC_2.39 sethostname F
+GLIBC_2.39 setipv4sourcefilter F
+GLIBC_2.39 setitimer F
+GLIBC_2.39 setjmp F
+GLIBC_2.39 setlinebuf F
+GLIBC_2.39 setlocale F
+GLIBC_2.39 setlogin F
+GLIBC_2.39 setlogmask F
+GLIBC_2.39 setmntent F
+GLIBC_2.39 setnetent F
+GLIBC_2.39 setnetgrent F
+GLIBC_2.39 setpgid F
+GLIBC_2.39 setpgrp F
+GLIBC_2.39 setpriority F
+GLIBC_2.39 setproc F
+GLIBC_2.39 setprotoent F
+GLIBC_2.39 setpwent F
+GLIBC_2.39 setregid F
+GLIBC_2.39 setresgid F
+GLIBC_2.39 setresuid F
+GLIBC_2.39 setreuid F
+GLIBC_2.39 setrlimit F
+GLIBC_2.39 setrlimit64 F
+GLIBC_2.39 setrpcent F
+GLIBC_2.39 setservent F
+GLIBC_2.39 setsgent F
+GLIBC_2.39 setsid F
+GLIBC_2.39 setsockopt F
+GLIBC_2.39 setsourcefilter F
+GLIBC_2.39 setspent F
+GLIBC_2.39 setstate F
+GLIBC_2.39 setstate_r F
+GLIBC_2.39 settimeofday F
+GLIBC_2.39 setttyent F
+GLIBC_2.39 setuid F
+GLIBC_2.39 setusershell F
+GLIBC_2.39 setutent F
+GLIBC_2.39 setutxent F
+GLIBC_2.39 setvbuf F
+GLIBC_2.39 setxattr F
+GLIBC_2.39 sgetsgent F
+GLIBC_2.39 sgetsgent_r F
+GLIBC_2.39 sgetspent F
+GLIBC_2.39 sgetspent_r F
+GLIBC_2.39 shm_open F
+GLIBC_2.39 shm_unlink F
+GLIBC_2.39 shmat F
+GLIBC_2.39 shmctl F
+GLIBC_2.39 shmdt F
+GLIBC_2.39 shmget F
+GLIBC_2.39 shutdown F
+GLIBC_2.39 sigabbrev_np F
+GLIBC_2.39 sigaction F
+GLIBC_2.39 sigaddset F
+GLIBC_2.39 sigaltstack F
+GLIBC_2.39 sigandset F
+GLIBC_2.39 sigblock F
+GLIBC_2.39 sigdelset F
+GLIBC_2.39 sigdescr_np F
+GLIBC_2.39 sigemptyset F
+GLIBC_2.39 sigfillset F
+GLIBC_2.39 siggetmask F
+GLIBC_2.39 sighold F
+GLIBC_2.39 sigignore F
+GLIBC_2.39 siginterrupt F
+GLIBC_2.39 sigisemptyset F
+GLIBC_2.39 sigismember F
+GLIBC_2.39 siglongjmp F
+GLIBC_2.39 signal F
+GLIBC_2.39 sigorset F
+GLIBC_2.39 sigpause F
+GLIBC_2.39 sigpending F
+GLIBC_2.39 sigprocmask F
+GLIBC_2.39 sigqueue F
+GLIBC_2.39 sigrelse F
+GLIBC_2.39 sigreturn F
+GLIBC_2.39 sigset F
+GLIBC_2.39 sigsetmask F
+GLIBC_2.39 sigstack F
+GLIBC_2.39 sigsuspend F
+GLIBC_2.39 sigtimedwait F
+GLIBC_2.39 sigwait F
+GLIBC_2.39 sigwaitinfo F
+GLIBC_2.39 sleep F
+GLIBC_2.39 snprintf F
+GLIBC_2.39 sockatmark F
+GLIBC_2.39 socket F
+GLIBC_2.39 socketpair F
+GLIBC_2.39 sprintf F
+GLIBC_2.39 sprofil F
+GLIBC_2.39 srand F
+GLIBC_2.39 srand48 F
+GLIBC_2.39 srand48_r F
+GLIBC_2.39 srandom F
+GLIBC_2.39 srandom_r F
+GLIBC_2.39 sscanf F
+GLIBC_2.39 ssignal F
+GLIBC_2.39 stat F
+GLIBC_2.39 stat64 F
+GLIBC_2.39 statfs F
+GLIBC_2.39 statfs64 F
+GLIBC_2.39 statvfs F
+GLIBC_2.39 statvfs64 F
+GLIBC_2.39 statx F
+GLIBC_2.39 stderr D 0x8
+GLIBC_2.39 stdin D 0x8
+GLIBC_2.39 stdout D 0x8
+GLIBC_2.39 stpcpy F
+GLIBC_2.39 stpncpy F
+GLIBC_2.39 strcasecmp F
+GLIBC_2.39 strcasecmp_l F
+GLIBC_2.39 strcasestr F
+GLIBC_2.39 strcat F
+GLIBC_2.39 strchr F
+GLIBC_2.39 strchrnul F
+GLIBC_2.39 strcmp F
+GLIBC_2.39 strcoll F
+GLIBC_2.39 strcoll_l F
+GLIBC_2.39 strcpy F
+GLIBC_2.39 strcspn F
+GLIBC_2.39 strdup F
+GLIBC_2.39 strerror F
+GLIBC_2.39 strerror_l F
+GLIBC_2.39 strerror_r F
+GLIBC_2.39 strerrordesc_np F
+GLIBC_2.39 strerrorname_np F
+GLIBC_2.39 strfmon F
+GLIBC_2.39 strfmon_l F
+GLIBC_2.39 strfromd F
+GLIBC_2.39 strfromf F
+GLIBC_2.39 strfromf128 F
+GLIBC_2.39 strfromf32 F
+GLIBC_2.39 strfromf32x F
+GLIBC_2.39 strfromf64 F
+GLIBC_2.39 strfromf64x F
+GLIBC_2.39 strfroml F
+GLIBC_2.39 strfry F
+GLIBC_2.39 strftime F
+GLIBC_2.39 strftime_l F
+GLIBC_2.39 strlcat F
+GLIBC_2.39 strlcpy F
+GLIBC_2.39 strlen F
+GLIBC_2.39 strncasecmp F
+GLIBC_2.39 strncasecmp_l F
+GLIBC_2.39 strncat F
+GLIBC_2.39 strncmp F
+GLIBC_2.39 strncpy F
+GLIBC_2.39 strndup F
+GLIBC_2.39 strnlen F
+GLIBC_2.39 strpbrk F
+GLIBC_2.39 strptime F
+GLIBC_2.39 strptime_l F
+GLIBC_2.39 strrchr F
+GLIBC_2.39 strsep F
+GLIBC_2.39 strsignal F
+GLIBC_2.39 strspn F
+GLIBC_2.39 strstr F
+GLIBC_2.39 strtod F
+GLIBC_2.39 strtod_l F
+GLIBC_2.39 strtof F
+GLIBC_2.39 strtof128 F
+GLIBC_2.39 strtof128_l F
+GLIBC_2.39 strtof32 F
+GLIBC_2.39 strtof32_l F
+GLIBC_2.39 strtof32x F
+GLIBC_2.39 strtof32x_l F
+GLIBC_2.39 strtof64 F
+GLIBC_2.39 strtof64_l F
+GLIBC_2.39 strtof64x F
+GLIBC_2.39 strtof64x_l F
+GLIBC_2.39 strtof_l F
+GLIBC_2.39 strtoimax F
+GLIBC_2.39 strtok F
+GLIBC_2.39 strtok_r F
+GLIBC_2.39 strtol F
+GLIBC_2.39 strtol_l F
+GLIBC_2.39 strtold F
+GLIBC_2.39 strtold_l F
+GLIBC_2.39 strtoll F
+GLIBC_2.39 strtoll_l F
+GLIBC_2.39 strtoq F
+GLIBC_2.39 strtoul F
+GLIBC_2.39 strtoul_l F
+GLIBC_2.39 strtoull F
+GLIBC_2.39 strtoull_l F
+GLIBC_2.39 strtoumax F
+GLIBC_2.39 strtouq F
+GLIBC_2.39 strverscmp F
+GLIBC_2.39 strxfrm F
+GLIBC_2.39 strxfrm_l F
+GLIBC_2.39 stty F
+GLIBC_2.39 swab F
+GLIBC_2.39 swapcontext F
+GLIBC_2.39 swprintf F
+GLIBC_2.39 swscanf F
+GLIBC_2.39 swtch F
+GLIBC_2.39 swtch_pri F
+GLIBC_2.39 symlink F
+GLIBC_2.39 symlinkat F
+GLIBC_2.39 sync F
+GLIBC_2.39 syncfs F
+GLIBC_2.39 syscall F
+GLIBC_2.39 sysconf F
+GLIBC_2.39 syslog F
+GLIBC_2.39 system F
+GLIBC_2.39 sysv_signal F
+GLIBC_2.39 task2pid F
+GLIBC_2.39 task_create F
+GLIBC_2.39 task_set_special_port F
+GLIBC_2.39 task_suspend F
+GLIBC_2.39 task_terminate F
+GLIBC_2.39 tcdrain F
+GLIBC_2.39 tcflow F
+GLIBC_2.39 tcflush F
+GLIBC_2.39 tcgetattr F
+GLIBC_2.39 tcgetpgrp F
+GLIBC_2.39 tcgetsid F
+GLIBC_2.39 tcsendbreak F
+GLIBC_2.39 tcsetattr F
+GLIBC_2.39 tcsetpgrp F
+GLIBC_2.39 tdelete F
+GLIBC_2.39 tdestroy F
+GLIBC_2.39 telldir F
+GLIBC_2.39 tempnam F
+GLIBC_2.39 textdomain F
+GLIBC_2.39 tfind F
+GLIBC_2.39 thrd_current F
+GLIBC_2.39 thrd_equal F
+GLIBC_2.39 thrd_sleep F
+GLIBC_2.39 thrd_yield F
+GLIBC_2.39 thread_depress_abort F
+GLIBC_2.39 thread_switch F
+GLIBC_2.39 time F
+GLIBC_2.39 timegm F
+GLIBC_2.39 timelocal F
+GLIBC_2.39 times F
+GLIBC_2.39 timespec_get F
+GLIBC_2.39 timespec_getres F
+GLIBC_2.39 timezone D 0x8
+GLIBC_2.39 tmpfile F
+GLIBC_2.39 tmpfile64 F
+GLIBC_2.39 tmpnam F
+GLIBC_2.39 tmpnam_r F
+GLIBC_2.39 toascii F
+GLIBC_2.39 tolower F
+GLIBC_2.39 tolower_l F
+GLIBC_2.39 toupper F
+GLIBC_2.39 toupper_l F
+GLIBC_2.39 towctrans F
+GLIBC_2.39 towctrans_l F
+GLIBC_2.39 towlower F
+GLIBC_2.39 towlower_l F
+GLIBC_2.39 towupper F
+GLIBC_2.39 towupper_l F
+GLIBC_2.39 truncate F
+GLIBC_2.39 truncate64 F
+GLIBC_2.39 tsearch F
+GLIBC_2.39 ttyname F
+GLIBC_2.39 ttyname_r F
+GLIBC_2.39 ttyslot F
+GLIBC_2.39 twalk F
+GLIBC_2.39 twalk_r F
+GLIBC_2.39 tzname D 0x10
+GLIBC_2.39 tzset F
+GLIBC_2.39 ualarm F
+GLIBC_2.39 ulckpwdf F
+GLIBC_2.39 ulimit F
+GLIBC_2.39 umask F
+GLIBC_2.39 uname F
+GLIBC_2.39 ungetc F
+GLIBC_2.39 ungetwc F
+GLIBC_2.39 unlink F
+GLIBC_2.39 unlinkat F
+GLIBC_2.39 unlockpt F
+GLIBC_2.39 unsetenv F
+GLIBC_2.39 updwtmp F
+GLIBC_2.39 updwtmpx F
+GLIBC_2.39 uselocale F
+GLIBC_2.39 usleep F
+GLIBC_2.39 utime F
+GLIBC_2.39 utimensat F
+GLIBC_2.39 utimes F
+GLIBC_2.39 utmpname F
+GLIBC_2.39 utmpxname F
+GLIBC_2.39 valloc F
+GLIBC_2.39 vasprintf F
+GLIBC_2.39 vdprintf F
+GLIBC_2.39 verr F
+GLIBC_2.39 verrx F
+GLIBC_2.39 versionsort F
+GLIBC_2.39 versionsort64 F
+GLIBC_2.39 vfork F
+GLIBC_2.39 vfprintf F
+GLIBC_2.39 vfscanf F
+GLIBC_2.39 vfwprintf F
+GLIBC_2.39 vfwscanf F
+GLIBC_2.39 vhangup F
+GLIBC_2.39 vlimit F
+GLIBC_2.39 vm_allocate F
+GLIBC_2.39 vm_deallocate F
+GLIBC_2.39 vm_map F
+GLIBC_2.39 vm_page_size D 0x8
+GLIBC_2.39 vpprintf F
+GLIBC_2.39 vprintf F
+GLIBC_2.39 vscanf F
+GLIBC_2.39 vsnprintf F
+GLIBC_2.39 vsprintf F
+GLIBC_2.39 vsscanf F
+GLIBC_2.39 vswprintf F
+GLIBC_2.39 vswscanf F
+GLIBC_2.39 vsyslog F
+GLIBC_2.39 vwarn F
+GLIBC_2.39 vwarnx F
+GLIBC_2.39 vwprintf F
+GLIBC_2.39 vwscanf F
+GLIBC_2.39 wait F
+GLIBC_2.39 wait3 F
+GLIBC_2.39 wait4 F
+GLIBC_2.39 waitid F
+GLIBC_2.39 waitpid F
+GLIBC_2.39 warn F
+GLIBC_2.39 warnx F
+GLIBC_2.39 wcpcpy F
+GLIBC_2.39 wcpncpy F
+GLIBC_2.39 wcrtomb F
+GLIBC_2.39 wcscasecmp F
+GLIBC_2.39 wcscasecmp_l F
+GLIBC_2.39 wcscat F
+GLIBC_2.39 wcschr F
+GLIBC_2.39 wcschrnul F
+GLIBC_2.39 wcscmp F
+GLIBC_2.39 wcscoll F
+GLIBC_2.39 wcscoll_l F
+GLIBC_2.39 wcscpy F
+GLIBC_2.39 wcscspn F
+GLIBC_2.39 wcsdup F
+GLIBC_2.39 wcsftime F
+GLIBC_2.39 wcsftime_l F
+GLIBC_2.39 wcslcat F
+GLIBC_2.39 wcslcpy F
+GLIBC_2.39 wcslen F
+GLIBC_2.39 wcsncasecmp F
+GLIBC_2.39 wcsncasecmp_l F
+GLIBC_2.39 wcsncat F
+GLIBC_2.39 wcsncmp F
+GLIBC_2.39 wcsncpy F
+GLIBC_2.39 wcsnlen F
+GLIBC_2.39 wcsnrtombs F
+GLIBC_2.39 wcspbrk F
+GLIBC_2.39 wcsrchr F
+GLIBC_2.39 wcsrtombs F
+GLIBC_2.39 wcsspn F
+GLIBC_2.39 wcsstr F
+GLIBC_2.39 wcstod F
+GLIBC_2.39 wcstod_l F
+GLIBC_2.39 wcstof F
+GLIBC_2.39 wcstof128 F
+GLIBC_2.39 wcstof128_l F
+GLIBC_2.39 wcstof32 F
+GLIBC_2.39 wcstof32_l F
+GLIBC_2.39 wcstof32x F
+GLIBC_2.39 wcstof32x_l F
+GLIBC_2.39 wcstof64 F
+GLIBC_2.39 wcstof64_l F
+GLIBC_2.39 wcstof64x F
+GLIBC_2.39 wcstof64x_l F
+GLIBC_2.39 wcstof_l F
+GLIBC_2.39 wcstoimax F
+GLIBC_2.39 wcstok F
+GLIBC_2.39 wcstol F
+GLIBC_2.39 wcstol_l F
+GLIBC_2.39 wcstold F
+GLIBC_2.39 wcstold_l F
+GLIBC_2.39 wcstoll F
+GLIBC_2.39 wcstoll_l F
+GLIBC_2.39 wcstombs F
+GLIBC_2.39 wcstoq F
+GLIBC_2.39 wcstoul F
+GLIBC_2.39 wcstoul_l F
+GLIBC_2.39 wcstoull F
+GLIBC_2.39 wcstoull_l F
+GLIBC_2.39 wcstoumax F
+GLIBC_2.39 wcstouq F
+GLIBC_2.39 wcswcs F
+GLIBC_2.39 wcswidth F
+GLIBC_2.39 wcsxfrm F
+GLIBC_2.39 wcsxfrm_l F
+GLIBC_2.39 wctob F
+GLIBC_2.39 wctomb F
+GLIBC_2.39 wctrans F
+GLIBC_2.39 wctrans_l F
+GLIBC_2.39 wctype F
+GLIBC_2.39 wctype_l F
+GLIBC_2.39 wcwidth F
+GLIBC_2.39 wmemchr F
+GLIBC_2.39 wmemcmp F
+GLIBC_2.39 wmemcpy F
+GLIBC_2.39 wmemmove F
+GLIBC_2.39 wmempcpy F
+GLIBC_2.39 wmemset F
+GLIBC_2.39 wordexp F
+GLIBC_2.39 wordfree F
+GLIBC_2.39 wprintf F
+GLIBC_2.39 write F
+GLIBC_2.39 writev F
+GLIBC_2.39 wscanf F
+HURD_CTHREADS_0.3 __cthread_getspecific F
+HURD_CTHREADS_0.3 __cthread_keycreate F
+HURD_CTHREADS_0.3 __cthread_setspecific F
+HURD_CTHREADS_0.3 __mutex_init F
+HURD_CTHREADS_0.3 __mutex_lock F
+HURD_CTHREADS_0.3 __mutex_lock_solid F
+HURD_CTHREADS_0.3 __mutex_trylock F
+HURD_CTHREADS_0.3 __mutex_unlock F
+HURD_CTHREADS_0.3 __mutex_unlock_solid F
+HURD_CTHREADS_0.3 __spin_lock F
+HURD_CTHREADS_0.3 __spin_lock_init F
+HURD_CTHREADS_0.3 __spin_lock_solid F
+HURD_CTHREADS_0.3 __spin_try_lock F
+HURD_CTHREADS_0.3 __spin_unlock F
diff --git a/sysdeps/mach/hurd/aarch64/libc_malloc_debug.abilist b/sysdeps/mach/hurd/aarch64/libc_malloc_debug.abilist
new file mode 100644
index 00000000..743ff399
--- /dev/null
+++ b/sysdeps/mach/hurd/aarch64/libc_malloc_debug.abilist
@@ -0,0 +1,26 @@
+GLIBC_2.39 __free_hook D 0x8
+GLIBC_2.39 __malloc_hook D 0x8
+GLIBC_2.39 __memalign_hook D 0x8
+GLIBC_2.39 __realloc_hook D 0x8
+GLIBC_2.39 aligned_alloc F
+GLIBC_2.39 calloc F
+GLIBC_2.39 free F
+GLIBC_2.39 mallinfo F
+GLIBC_2.39 mallinfo2 F
+GLIBC_2.39 malloc F
+GLIBC_2.39 malloc_info F
+GLIBC_2.39 malloc_stats F
+GLIBC_2.39 malloc_trim F
+GLIBC_2.39 malloc_usable_size F
+GLIBC_2.39 mallopt F
+GLIBC_2.39 mcheck F
+GLIBC_2.39 mcheck_check_all F
+GLIBC_2.39 mcheck_pedantic F
+GLIBC_2.39 memalign F
+GLIBC_2.39 mprobe F
+GLIBC_2.39 mtrace F
+GLIBC_2.39 muntrace F
+GLIBC_2.39 posix_memalign F
+GLIBC_2.39 pvalloc F
+GLIBC_2.39 realloc F
+GLIBC_2.39 valloc F
diff --git a/sysdeps/mach/hurd/aarch64/libdl.abilist b/sysdeps/mach/hurd/aarch64/libdl.abilist
new file mode 100644
index 00000000..e69de29b
diff --git a/sysdeps/mach/hurd/aarch64/libm.abilist b/sysdeps/mach/hurd/aarch64/libm.abilist
new file mode 100644
index 00000000..121482d2
--- /dev/null
+++ b/sysdeps/mach/hurd/aarch64/libm.abilist
@@ -0,0 +1,1030 @@
+GLIBC_2.39 __clog10 F
+GLIBC_2.39 __clog10f F
+GLIBC_2.39 __clog10l F
+GLIBC_2.39 __finite F
+GLIBC_2.39 __finitef F
+GLIBC_2.39 __finitel F
+GLIBC_2.39 __fpclassify F
+GLIBC_2.39 __fpclassifyf F
+GLIBC_2.39 __fpclassifyl F
+GLIBC_2.39 __iseqsig F
+GLIBC_2.39 __iseqsigf F
+GLIBC_2.39 __iseqsigl F
+GLIBC_2.39 __issignaling F
+GLIBC_2.39 __issignalingf F
+GLIBC_2.39 __issignalingl F
+GLIBC_2.39 __signbit F
+GLIBC_2.39 __signbitf F
+GLIBC_2.39 __signbitl F
+GLIBC_2.39 __signgam D 0x4
+GLIBC_2.39 acos F
+GLIBC_2.39 acosf F
+GLIBC_2.39 acosf128 F
+GLIBC_2.39 acosf32 F
+GLIBC_2.39 acosf32x F
+GLIBC_2.39 acosf64 F
+GLIBC_2.39 acosf64x F
+GLIBC_2.39 acosh F
+GLIBC_2.39 acoshf F
+GLIBC_2.39 acoshf128 F
+GLIBC_2.39 acoshf32 F
+GLIBC_2.39 acoshf32x F
+GLIBC_2.39 acoshf64 F
+GLIBC_2.39 acoshf64x F
+GLIBC_2.39 acoshl F
+GLIBC_2.39 acosl F
+GLIBC_2.39 asin F
+GLIBC_2.39 asinf F
+GLIBC_2.39 asinf128 F
+GLIBC_2.39 asinf32 F
+GLIBC_2.39 asinf32x F
+GLIBC_2.39 asinf64 F
+GLIBC_2.39 asinf64x F
+GLIBC_2.39 asinh F
+GLIBC_2.39 asinhf F
+GLIBC_2.39 asinhf128 F
+GLIBC_2.39 asinhf32 F
+GLIBC_2.39 asinhf32x F
+GLIBC_2.39 asinhf64 F
+GLIBC_2.39 asinhf64x F
+GLIBC_2.39 asinhl F
+GLIBC_2.39 asinl F
+GLIBC_2.39 atan F
+GLIBC_2.39 atan2 F
+GLIBC_2.39 atan2f F
+GLIBC_2.39 atan2f128 F
+GLIBC_2.39 atan2f32 F
+GLIBC_2.39 atan2f32x F
+GLIBC_2.39 atan2f64 F
+GLIBC_2.39 atan2f64x F
+GLIBC_2.39 atan2l F
+GLIBC_2.39 atanf F
+GLIBC_2.39 atanf128 F
+GLIBC_2.39 atanf32 F
+GLIBC_2.39 atanf32x F
+GLIBC_2.39 atanf64 F
+GLIBC_2.39 atanf64x F
+GLIBC_2.39 atanh F
+GLIBC_2.39 atanhf F
+GLIBC_2.39 atanhf128 F
+GLIBC_2.39 atanhf32 F
+GLIBC_2.39 atanhf32x F
+GLIBC_2.39 atanhf64 F
+GLIBC_2.39 atanhf64x F
+GLIBC_2.39 atanhl F
+GLIBC_2.39 atanl F
+GLIBC_2.39 cabs F
+GLIBC_2.39 cabsf F
+GLIBC_2.39 cabsf128 F
+GLIBC_2.39 cabsf32 F
+GLIBC_2.39 cabsf32x F
+GLIBC_2.39 cabsf64 F
+GLIBC_2.39 cabsf64x F
+GLIBC_2.39 cabsl F
+GLIBC_2.39 cacos F
+GLIBC_2.39 cacosf F
+GLIBC_2.39 cacosf128 F
+GLIBC_2.39 cacosf32 F
+GLIBC_2.39 cacosf32x F
+GLIBC_2.39 cacosf64 F
+GLIBC_2.39 cacosf64x F
+GLIBC_2.39 cacosh F
+GLIBC_2.39 cacoshf F
+GLIBC_2.39 cacoshf128 F
+GLIBC_2.39 cacoshf32 F
+GLIBC_2.39 cacoshf32x F
+GLIBC_2.39 cacoshf64 F
+GLIBC_2.39 cacoshf64x F
+GLIBC_2.39 cacoshl F
+GLIBC_2.39 cacosl F
+GLIBC_2.39 canonicalize F
+GLIBC_2.39 canonicalizef F
+GLIBC_2.39 canonicalizef128 F
+GLIBC_2.39 canonicalizef32 F
+GLIBC_2.39 canonicalizef32x F
+GLIBC_2.39 canonicalizef64 F
+GLIBC_2.39 canonicalizef64x F
+GLIBC_2.39 canonicalizel F
+GLIBC_2.39 carg F
+GLIBC_2.39 cargf F
+GLIBC_2.39 cargf128 F
+GLIBC_2.39 cargf32 F
+GLIBC_2.39 cargf32x F
+GLIBC_2.39 cargf64 F
+GLIBC_2.39 cargf64x F
+GLIBC_2.39 cargl F
+GLIBC_2.39 casin F
+GLIBC_2.39 casinf F
+GLIBC_2.39 casinf128 F
+GLIBC_2.39 casinf32 F
+GLIBC_2.39 casinf32x F
+GLIBC_2.39 casinf64 F
+GLIBC_2.39 casinf64x F
+GLIBC_2.39 casinh F
+GLIBC_2.39 casinhf F
+GLIBC_2.39 casinhf128 F
+GLIBC_2.39 casinhf32 F
+GLIBC_2.39 casinhf32x F
+GLIBC_2.39 casinhf64 F
+GLIBC_2.39 casinhf64x F
+GLIBC_2.39 casinhl F
+GLIBC_2.39 casinl F
+GLIBC_2.39 catan F
+GLIBC_2.39 catanf F
+GLIBC_2.39 catanf128 F
+GLIBC_2.39 catanf32 F
+GLIBC_2.39 catanf32x F
+GLIBC_2.39 catanf64 F
+GLIBC_2.39 catanf64x F
+GLIBC_2.39 catanh F
+GLIBC_2.39 catanhf F
+GLIBC_2.39 catanhf128 F
+GLIBC_2.39 catanhf32 F
+GLIBC_2.39 catanhf32x F
+GLIBC_2.39 catanhf64 F
+GLIBC_2.39 catanhf64x F
+GLIBC_2.39 catanhl F
+GLIBC_2.39 catanl F
+GLIBC_2.39 cbrt F
+GLIBC_2.39 cbrtf F
+GLIBC_2.39 cbrtf128 F
+GLIBC_2.39 cbrtf32 F
+GLIBC_2.39 cbrtf32x F
+GLIBC_2.39 cbrtf64 F
+GLIBC_2.39 cbrtf64x F
+GLIBC_2.39 cbrtl F
+GLIBC_2.39 ccos F
+GLIBC_2.39 ccosf F
+GLIBC_2.39 ccosf128 F
+GLIBC_2.39 ccosf32 F
+GLIBC_2.39 ccosf32x F
+GLIBC_2.39 ccosf64 F
+GLIBC_2.39 ccosf64x F
+GLIBC_2.39 ccosh F
+GLIBC_2.39 ccoshf F
+GLIBC_2.39 ccoshf128 F
+GLIBC_2.39 ccoshf32 F
+GLIBC_2.39 ccoshf32x F
+GLIBC_2.39 ccoshf64 F
+GLIBC_2.39 ccoshf64x F
+GLIBC_2.39 ccoshl F
+GLIBC_2.39 ccosl F
+GLIBC_2.39 ceil F
+GLIBC_2.39 ceilf F
+GLIBC_2.39 ceilf128 F
+GLIBC_2.39 ceilf32 F
+GLIBC_2.39 ceilf32x F
+GLIBC_2.39 ceilf64 F
+GLIBC_2.39 ceilf64x F
+GLIBC_2.39 ceill F
+GLIBC_2.39 cexp F
+GLIBC_2.39 cexpf F
+GLIBC_2.39 cexpf128 F
+GLIBC_2.39 cexpf32 F
+GLIBC_2.39 cexpf32x F
+GLIBC_2.39 cexpf64 F
+GLIBC_2.39 cexpf64x F
+GLIBC_2.39 cexpl F
+GLIBC_2.39 cimag F
+GLIBC_2.39 cimagf F
+GLIBC_2.39 cimagf128 F
+GLIBC_2.39 cimagf32 F
+GLIBC_2.39 cimagf32x F
+GLIBC_2.39 cimagf64 F
+GLIBC_2.39 cimagf64x F
+GLIBC_2.39 cimagl F
+GLIBC_2.39 clog F
+GLIBC_2.39 clog10 F
+GLIBC_2.39 clog10f F
+GLIBC_2.39 clog10f128 F
+GLIBC_2.39 clog10f32 F
+GLIBC_2.39 clog10f32x F
+GLIBC_2.39 clog10f64 F
+GLIBC_2.39 clog10f64x F
+GLIBC_2.39 clog10l F
+GLIBC_2.39 clogf F
+GLIBC_2.39 clogf128 F
+GLIBC_2.39 clogf32 F
+GLIBC_2.39 clogf32x F
+GLIBC_2.39 clogf64 F
+GLIBC_2.39 clogf64x F
+GLIBC_2.39 clogl F
+GLIBC_2.39 conj F
+GLIBC_2.39 conjf F
+GLIBC_2.39 conjf128 F
+GLIBC_2.39 conjf32 F
+GLIBC_2.39 conjf32x F
+GLIBC_2.39 conjf64 F
+GLIBC_2.39 conjf64x F
+GLIBC_2.39 conjl F
+GLIBC_2.39 copysign F
+GLIBC_2.39 copysignf F
+GLIBC_2.39 copysignf128 F
+GLIBC_2.39 copysignf32 F
+GLIBC_2.39 copysignf32x F
+GLIBC_2.39 copysignf64 F
+GLIBC_2.39 copysignf64x F
+GLIBC_2.39 copysignl F
+GLIBC_2.39 cos F
+GLIBC_2.39 cosf F
+GLIBC_2.39 cosf128 F
+GLIBC_2.39 cosf32 F
+GLIBC_2.39 cosf32x F
+GLIBC_2.39 cosf64 F
+GLIBC_2.39 cosf64x F
+GLIBC_2.39 cosh F
+GLIBC_2.39 coshf F
+GLIBC_2.39 coshf128 F
+GLIBC_2.39 coshf32 F
+GLIBC_2.39 coshf32x F
+GLIBC_2.39 coshf64 F
+GLIBC_2.39 coshf64x F
+GLIBC_2.39 coshl F
+GLIBC_2.39 cosl F
+GLIBC_2.39 cpow F
+GLIBC_2.39 cpowf F
+GLIBC_2.39 cpowf128 F
+GLIBC_2.39 cpowf32 F
+GLIBC_2.39 cpowf32x F
+GLIBC_2.39 cpowf64 F
+GLIBC_2.39 cpowf64x F
+GLIBC_2.39 cpowl F
+GLIBC_2.39 cproj F
+GLIBC_2.39 cprojf F
+GLIBC_2.39 cprojf128 F
+GLIBC_2.39 cprojf32 F
+GLIBC_2.39 cprojf32x F
+GLIBC_2.39 cprojf64 F
+GLIBC_2.39 cprojf64x F
+GLIBC_2.39 cprojl F
+GLIBC_2.39 creal F
+GLIBC_2.39 crealf F
+GLIBC_2.39 crealf128 F
+GLIBC_2.39 crealf32 F
+GLIBC_2.39 crealf32x F
+GLIBC_2.39 crealf64 F
+GLIBC_2.39 crealf64x F
+GLIBC_2.39 creall F
+GLIBC_2.39 csin F
+GLIBC_2.39 csinf F
+GLIBC_2.39 csinf128 F
+GLIBC_2.39 csinf32 F
+GLIBC_2.39 csinf32x F
+GLIBC_2.39 csinf64 F
+GLIBC_2.39 csinf64x F
+GLIBC_2.39 csinh F
+GLIBC_2.39 csinhf F
+GLIBC_2.39 csinhf128 F
+GLIBC_2.39 csinhf32 F
+GLIBC_2.39 csinhf32x F
+GLIBC_2.39 csinhf64 F
+GLIBC_2.39 csinhf64x F
+GLIBC_2.39 csinhl F
+GLIBC_2.39 csinl F
+GLIBC_2.39 csqrt F
+GLIBC_2.39 csqrtf F
+GLIBC_2.39 csqrtf128 F
+GLIBC_2.39 csqrtf32 F
+GLIBC_2.39 csqrtf32x F
+GLIBC_2.39 csqrtf64 F
+GLIBC_2.39 csqrtf64x F
+GLIBC_2.39 csqrtl F
+GLIBC_2.39 ctan F
+GLIBC_2.39 ctanf F
+GLIBC_2.39 ctanf128 F
+GLIBC_2.39 ctanf32 F
+GLIBC_2.39 ctanf32x F
+GLIBC_2.39 ctanf64 F
+GLIBC_2.39 ctanf64x F
+GLIBC_2.39 ctanh F
+GLIBC_2.39 ctanhf F
+GLIBC_2.39 ctanhf128 F
+GLIBC_2.39 ctanhf32 F
+GLIBC_2.39 ctanhf32x F
+GLIBC_2.39 ctanhf64 F
+GLIBC_2.39 ctanhf64x F
+GLIBC_2.39 ctanhl F
+GLIBC_2.39 ctanl F
+GLIBC_2.39 daddl F
+GLIBC_2.39 ddivl F
+GLIBC_2.39 dfmal F
+GLIBC_2.39 dmull F
+GLIBC_2.39 drem F
+GLIBC_2.39 dremf F
+GLIBC_2.39 dreml F
+GLIBC_2.39 dsqrtl F
+GLIBC_2.39 dsubl F
+GLIBC_2.39 erf F
+GLIBC_2.39 erfc F
+GLIBC_2.39 erfcf F
+GLIBC_2.39 erfcf128 F
+GLIBC_2.39 erfcf32 F
+GLIBC_2.39 erfcf32x F
+GLIBC_2.39 erfcf64 F
+GLIBC_2.39 erfcf64x F
+GLIBC_2.39 erfcl F
+GLIBC_2.39 erff F
+GLIBC_2.39 erff128 F
+GLIBC_2.39 erff32 F
+GLIBC_2.39 erff32x F
+GLIBC_2.39 erff64 F
+GLIBC_2.39 erff64x F
+GLIBC_2.39 erfl F
+GLIBC_2.39 exp F
+GLIBC_2.39 exp10 F
+GLIBC_2.39 exp10f F
+GLIBC_2.39 exp10f128 F
+GLIBC_2.39 exp10f32 F
+GLIBC_2.39 exp10f32x F
+GLIBC_2.39 exp10f64 F
+GLIBC_2.39 exp10f64x F
+GLIBC_2.39 exp10l F
+GLIBC_2.39 exp2 F
+GLIBC_2.39 exp2f F
+GLIBC_2.39 exp2f128 F
+GLIBC_2.39 exp2f32 F
+GLIBC_2.39 exp2f32x F
+GLIBC_2.39 exp2f64 F
+GLIBC_2.39 exp2f64x F
+GLIBC_2.39 exp2l F
+GLIBC_2.39 expf F
+GLIBC_2.39 expf128 F
+GLIBC_2.39 expf32 F
+GLIBC_2.39 expf32x F
+GLIBC_2.39 expf64 F
+GLIBC_2.39 expf64x F
+GLIBC_2.39 expl F
+GLIBC_2.39 expm1 F
+GLIBC_2.39 expm1f F
+GLIBC_2.39 expm1f128 F
+GLIBC_2.39 expm1f32 F
+GLIBC_2.39 expm1f32x F
+GLIBC_2.39 expm1f64 F
+GLIBC_2.39 expm1f64x F
+GLIBC_2.39 expm1l F
+GLIBC_2.39 f32addf128 F
+GLIBC_2.39 f32addf32x F
+GLIBC_2.39 f32addf64 F
+GLIBC_2.39 f32addf64x F
+GLIBC_2.39 f32divf128 F
+GLIBC_2.39 f32divf32x F
+GLIBC_2.39 f32divf64 F
+GLIBC_2.39 f32divf64x F
+GLIBC_2.39 f32fmaf128 F
+GLIBC_2.39 f32fmaf32x F
+GLIBC_2.39 f32fmaf64 F
+GLIBC_2.39 f32fmaf64x F
+GLIBC_2.39 f32mulf128 F
+GLIBC_2.39 f32mulf32x F
+GLIBC_2.39 f32mulf64 F
+GLIBC_2.39 f32mulf64x F
+GLIBC_2.39 f32sqrtf128 F
+GLIBC_2.39 f32sqrtf32x F
+GLIBC_2.39 f32sqrtf64 F
+GLIBC_2.39 f32sqrtf64x F
+GLIBC_2.39 f32subf128 F
+GLIBC_2.39 f32subf32x F
+GLIBC_2.39 f32subf64 F
+GLIBC_2.39 f32subf64x F
+GLIBC_2.39 f32xaddf128 F
+GLIBC_2.39 f32xaddf64 F
+GLIBC_2.39 f32xaddf64x F
+GLIBC_2.39 f32xdivf128 F
+GLIBC_2.39 f32xdivf64 F
+GLIBC_2.39 f32xdivf64x F
+GLIBC_2.39 f32xfmaf128 F
+GLIBC_2.39 f32xfmaf64 F
+GLIBC_2.39 f32xfmaf64x F
+GLIBC_2.39 f32xmulf128 F
+GLIBC_2.39 f32xmulf64 F
+GLIBC_2.39 f32xmulf64x F
+GLIBC_2.39 f32xsqrtf128 F
+GLIBC_2.39 f32xsqrtf64 F
+GLIBC_2.39 f32xsqrtf64x F
+GLIBC_2.39 f32xsubf128 F
+GLIBC_2.39 f32xsubf64 F
+GLIBC_2.39 f32xsubf64x F
+GLIBC_2.39 f64addf128 F
+GLIBC_2.39 f64addf64x F
+GLIBC_2.39 f64divf128 F
+GLIBC_2.39 f64divf64x F
+GLIBC_2.39 f64fmaf128 F
+GLIBC_2.39 f64fmaf64x F
+GLIBC_2.39 f64mulf128 F
+GLIBC_2.39 f64mulf64x F
+GLIBC_2.39 f64sqrtf128 F
+GLIBC_2.39 f64sqrtf64x F
+GLIBC_2.39 f64subf128 F
+GLIBC_2.39 f64subf64x F
+GLIBC_2.39 f64xaddf128 F
+GLIBC_2.39 f64xdivf128 F
+GLIBC_2.39 f64xfmaf128 F
+GLIBC_2.39 f64xmulf128 F
+GLIBC_2.39 f64xsqrtf128 F
+GLIBC_2.39 f64xsubf128 F
+GLIBC_2.39 fabs F
+GLIBC_2.39 fabsf F
+GLIBC_2.39 fabsf128 F
+GLIBC_2.39 fabsf32 F
+GLIBC_2.39 fabsf32x F
+GLIBC_2.39 fabsf64 F
+GLIBC_2.39 fabsf64x F
+GLIBC_2.39 fabsl F
+GLIBC_2.39 fadd F
+GLIBC_2.39 faddl F
+GLIBC_2.39 fdim F
+GLIBC_2.39 fdimf F
+GLIBC_2.39 fdimf128 F
+GLIBC_2.39 fdimf32 F
+GLIBC_2.39 fdimf32x F
+GLIBC_2.39 fdimf64 F
+GLIBC_2.39 fdimf64x F
+GLIBC_2.39 fdiml F
+GLIBC_2.39 fdiv F
+GLIBC_2.39 fdivl F
+GLIBC_2.39 feclearexcept F
+GLIBC_2.39 fedisableexcept F
+GLIBC_2.39 feenableexcept F
+GLIBC_2.39 fegetenv F
+GLIBC_2.39 fegetexcept F
+GLIBC_2.39 fegetexceptflag F
+GLIBC_2.39 fegetmode F
+GLIBC_2.39 fegetround F
+GLIBC_2.39 feholdexcept F
+GLIBC_2.39 feraiseexcept F
+GLIBC_2.39 fesetenv F
+GLIBC_2.39 fesetexcept F
+GLIBC_2.39 fesetexceptflag F
+GLIBC_2.39 fesetmode F
+GLIBC_2.39 fesetround F
+GLIBC_2.39 fetestexcept F
+GLIBC_2.39 fetestexceptflag F
+GLIBC_2.39 feupdateenv F
+GLIBC_2.39 ffma F
+GLIBC_2.39 ffmal F
+GLIBC_2.39 finite F
+GLIBC_2.39 finitef F
+GLIBC_2.39 finitel F
+GLIBC_2.39 floor F
+GLIBC_2.39 floorf F
+GLIBC_2.39 floorf128 F
+GLIBC_2.39 floorf32 F
+GLIBC_2.39 floorf32x F
+GLIBC_2.39 floorf64 F
+GLIBC_2.39 floorf64x F
+GLIBC_2.39 floorl F
+GLIBC_2.39 fma F
+GLIBC_2.39 fmaf F
+GLIBC_2.39 fmaf128 F
+GLIBC_2.39 fmaf32 F
+GLIBC_2.39 fmaf32x F
+GLIBC_2.39 fmaf64 F
+GLIBC_2.39 fmaf64x F
+GLIBC_2.39 fmal F
+GLIBC_2.39 fmax F
+GLIBC_2.39 fmaxf F
+GLIBC_2.39 fmaxf128 F
+GLIBC_2.39 fmaxf32 F
+GLIBC_2.39 fmaxf32x F
+GLIBC_2.39 fmaxf64 F
+GLIBC_2.39 fmaxf64x F
+GLIBC_2.39 fmaximum F
+GLIBC_2.39 fmaximum_mag F
+GLIBC_2.39 fmaximum_mag_num F
+GLIBC_2.39 fmaximum_mag_numf F
+GLIBC_2.39 fmaximum_mag_numf128 F
+GLIBC_2.39 fmaximum_mag_numf32 F
+GLIBC_2.39 fmaximum_mag_numf32x F
+GLIBC_2.39 fmaximum_mag_numf64 F
+GLIBC_2.39 fmaximum_mag_numf64x F
+GLIBC_2.39 fmaximum_mag_numl F
+GLIBC_2.39 fmaximum_magf F
+GLIBC_2.39 fmaximum_magf128 F
+GLIBC_2.39 fmaximum_magf32 F
+GLIBC_2.39 fmaximum_magf32x F
+GLIBC_2.39 fmaximum_magf64 F
+GLIBC_2.39 fmaximum_magf64x F
+GLIBC_2.39 fmaximum_magl F
+GLIBC_2.39 fmaximum_num F
+GLIBC_2.39 fmaximum_numf F
+GLIBC_2.39 fmaximum_numf128 F
+GLIBC_2.39 fmaximum_numf32 F
+GLIBC_2.39 fmaximum_numf32x F
+GLIBC_2.39 fmaximum_numf64 F
+GLIBC_2.39 fmaximum_numf64x F
+GLIBC_2.39 fmaximum_numl F
+GLIBC_2.39 fmaximumf F
+GLIBC_2.39 fmaximumf128 F
+GLIBC_2.39 fmaximumf32 F
+GLIBC_2.39 fmaximumf32x F
+GLIBC_2.39 fmaximumf64 F
+GLIBC_2.39 fmaximumf64x F
+GLIBC_2.39 fmaximuml F
+GLIBC_2.39 fmaxl F
+GLIBC_2.39 fmaxmag F
+GLIBC_2.39 fmaxmagf F
+GLIBC_2.39 fmaxmagf128 F
+GLIBC_2.39 fmaxmagf32 F
+GLIBC_2.39 fmaxmagf32x F
+GLIBC_2.39 fmaxmagf64 F
+GLIBC_2.39 fmaxmagf64x F
+GLIBC_2.39 fmaxmagl F
+GLIBC_2.39 fmin F
+GLIBC_2.39 fminf F
+GLIBC_2.39 fminf128 F
+GLIBC_2.39 fminf32 F
+GLIBC_2.39 fminf32x F
+GLIBC_2.39 fminf64 F
+GLIBC_2.39 fminf64x F
+GLIBC_2.39 fminimum F
+GLIBC_2.39 fminimum_mag F
+GLIBC_2.39 fminimum_mag_num F
+GLIBC_2.39 fminimum_mag_numf F
+GLIBC_2.39 fminimum_mag_numf128 F
+GLIBC_2.39 fminimum_mag_numf32 F
+GLIBC_2.39 fminimum_mag_numf32x F
+GLIBC_2.39 fminimum_mag_numf64 F
+GLIBC_2.39 fminimum_mag_numf64x F
+GLIBC_2.39 fminimum_mag_numl F
+GLIBC_2.39 fminimum_magf F
+GLIBC_2.39 fminimum_magf128 F
+GLIBC_2.39 fminimum_magf32 F
+GLIBC_2.39 fminimum_magf32x F
+GLIBC_2.39 fminimum_magf64 F
+GLIBC_2.39 fminimum_magf64x F
+GLIBC_2.39 fminimum_magl F
+GLIBC_2.39 fminimum_num F
+GLIBC_2.39 fminimum_numf F
+GLIBC_2.39 fminimum_numf128 F
+GLIBC_2.39 fminimum_numf32 F
+GLIBC_2.39 fminimum_numf32x F
+GLIBC_2.39 fminimum_numf64 F
+GLIBC_2.39 fminimum_numf64x F
+GLIBC_2.39 fminimum_numl F
+GLIBC_2.39 fminimumf F
+GLIBC_2.39 fminimumf128 F
+GLIBC_2.39 fminimumf32 F
+GLIBC_2.39 fminimumf32x F
+GLIBC_2.39 fminimumf64 F
+GLIBC_2.39 fminimumf64x F
+GLIBC_2.39 fminimuml F
+GLIBC_2.39 fminl F
+GLIBC_2.39 fminmag F
+GLIBC_2.39 fminmagf F
+GLIBC_2.39 fminmagf128 F
+GLIBC_2.39 fminmagf32 F
+GLIBC_2.39 fminmagf32x F
+GLIBC_2.39 fminmagf64 F
+GLIBC_2.39 fminmagf64x F
+GLIBC_2.39 fminmagl F
+GLIBC_2.39 fmod F
+GLIBC_2.39 fmodf F
+GLIBC_2.39 fmodf128 F
+GLIBC_2.39 fmodf32 F
+GLIBC_2.39 fmodf32x F
+GLIBC_2.39 fmodf64 F
+GLIBC_2.39 fmodf64x F
+GLIBC_2.39 fmodl F
+GLIBC_2.39 fmul F
+GLIBC_2.39 fmull F
+GLIBC_2.39 frexp F
+GLIBC_2.39 frexpf F
+GLIBC_2.39 frexpf128 F
+GLIBC_2.39 frexpf32 F
+GLIBC_2.39 frexpf32x F
+GLIBC_2.39 frexpf64 F
+GLIBC_2.39 frexpf64x F
+GLIBC_2.39 frexpl F
+GLIBC_2.39 fromfp F
+GLIBC_2.39 fromfpf F
+GLIBC_2.39 fromfpf128 F
+GLIBC_2.39 fromfpf32 F
+GLIBC_2.39 fromfpf32x F
+GLIBC_2.39 fromfpf64 F
+GLIBC_2.39 fromfpf64x F
+GLIBC_2.39 fromfpl F
+GLIBC_2.39 fromfpx F
+GLIBC_2.39 fromfpxf F
+GLIBC_2.39 fromfpxf128 F
+GLIBC_2.39 fromfpxf32 F
+GLIBC_2.39 fromfpxf32x F
+GLIBC_2.39 fromfpxf64 F
+GLIBC_2.39 fromfpxf64x F
+GLIBC_2.39 fromfpxl F
+GLIBC_2.39 fsqrt F
+GLIBC_2.39 fsqrtl F
+GLIBC_2.39 fsub F
+GLIBC_2.39 fsubl F
+GLIBC_2.39 gamma F
+GLIBC_2.39 gammaf F
+GLIBC_2.39 gammal F
+GLIBC_2.39 getpayload F
+GLIBC_2.39 getpayloadf F
+GLIBC_2.39 getpayloadf128 F
+GLIBC_2.39 getpayloadf32 F
+GLIBC_2.39 getpayloadf32x F
+GLIBC_2.39 getpayloadf64 F
+GLIBC_2.39 getpayloadf64x F
+GLIBC_2.39 getpayloadl F
+GLIBC_2.39 hypot F
+GLIBC_2.39 hypotf F
+GLIBC_2.39 hypotf128 F
+GLIBC_2.39 hypotf32 F
+GLIBC_2.39 hypotf32x F
+GLIBC_2.39 hypotf64 F
+GLIBC_2.39 hypotf64x F
+GLIBC_2.39 hypotl F
+GLIBC_2.39 ilogb F
+GLIBC_2.39 ilogbf F
+GLIBC_2.39 ilogbf128 F
+GLIBC_2.39 ilogbf32 F
+GLIBC_2.39 ilogbf32x F
+GLIBC_2.39 ilogbf64 F
+GLIBC_2.39 ilogbf64x F
+GLIBC_2.39 ilogbl F
+GLIBC_2.39 j0 F
+GLIBC_2.39 j0f F
+GLIBC_2.39 j0f128 F
+GLIBC_2.39 j0f32 F
+GLIBC_2.39 j0f32x F
+GLIBC_2.39 j0f64 F
+GLIBC_2.39 j0f64x F
+GLIBC_2.39 j0l F
+GLIBC_2.39 j1 F
+GLIBC_2.39 j1f F
+GLIBC_2.39 j1f128 F
+GLIBC_2.39 j1f32 F
+GLIBC_2.39 j1f32x F
+GLIBC_2.39 j1f64 F
+GLIBC_2.39 j1f64x F
+GLIBC_2.39 j1l F
+GLIBC_2.39 jn F
+GLIBC_2.39 jnf F
+GLIBC_2.39 jnf128 F
+GLIBC_2.39 jnf32 F
+GLIBC_2.39 jnf32x F
+GLIBC_2.39 jnf64 F
+GLIBC_2.39 jnf64x F
+GLIBC_2.39 jnl F
+GLIBC_2.39 ldexp F
+GLIBC_2.39 ldexpf F
+GLIBC_2.39 ldexpf128 F
+GLIBC_2.39 ldexpf32 F
+GLIBC_2.39 ldexpf32x F
+GLIBC_2.39 ldexpf64 F
+GLIBC_2.39 ldexpf64x F
+GLIBC_2.39 ldexpl F
+GLIBC_2.39 lgamma F
+GLIBC_2.39 lgamma_r F
+GLIBC_2.39 lgammaf F
+GLIBC_2.39 lgammaf128 F
+GLIBC_2.39 lgammaf128_r F
+GLIBC_2.39 lgammaf32 F
+GLIBC_2.39 lgammaf32_r F
+GLIBC_2.39 lgammaf32x F
+GLIBC_2.39 lgammaf32x_r F
+GLIBC_2.39 lgammaf64 F
+GLIBC_2.39 lgammaf64_r F
+GLIBC_2.39 lgammaf64x F
+GLIBC_2.39 lgammaf64x_r F
+GLIBC_2.39 lgammaf_r F
+GLIBC_2.39 lgammal F
+GLIBC_2.39 lgammal_r F
+GLIBC_2.39 llogb F
+GLIBC_2.39 llogbf F
+GLIBC_2.39 llogbf128 F
+GLIBC_2.39 llogbf32 F
+GLIBC_2.39 llogbf32x F
+GLIBC_2.39 llogbf64 F
+GLIBC_2.39 llogbf64x F
+GLIBC_2.39 llogbl F
+GLIBC_2.39 llrint F
+GLIBC_2.39 llrintf F
+GLIBC_2.39 llrintf128 F
+GLIBC_2.39 llrintf32 F
+GLIBC_2.39 llrintf32x F
+GLIBC_2.39 llrintf64 F
+GLIBC_2.39 llrintf64x F
+GLIBC_2.39 llrintl F
+GLIBC_2.39 llround F
+GLIBC_2.39 llroundf F
+GLIBC_2.39 llroundf128 F
+GLIBC_2.39 llroundf32 F
+GLIBC_2.39 llroundf32x F
+GLIBC_2.39 llroundf64 F
+GLIBC_2.39 llroundf64x F
+GLIBC_2.39 llroundl F
+GLIBC_2.39 log F
+GLIBC_2.39 log10 F
+GLIBC_2.39 log10f F
+GLIBC_2.39 log10f128 F
+GLIBC_2.39 log10f32 F
+GLIBC_2.39 log10f32x F
+GLIBC_2.39 log10f64 F
+GLIBC_2.39 log10f64x F
+GLIBC_2.39 log10l F
+GLIBC_2.39 log1p F
+GLIBC_2.39 log1pf F
+GLIBC_2.39 log1pf128 F
+GLIBC_2.39 log1pf32 F
+GLIBC_2.39 log1pf32x F
+GLIBC_2.39 log1pf64 F
+GLIBC_2.39 log1pf64x F
+GLIBC_2.39 log1pl F
+GLIBC_2.39 log2 F
+GLIBC_2.39 log2f F
+GLIBC_2.39 log2f128 F
+GLIBC_2.39 log2f32 F
+GLIBC_2.39 log2f32x F
+GLIBC_2.39 log2f64 F
+GLIBC_2.39 log2f64x F
+GLIBC_2.39 log2l F
+GLIBC_2.39 logb F
+GLIBC_2.39 logbf F
+GLIBC_2.39 logbf128 F
+GLIBC_2.39 logbf32 F
+GLIBC_2.39 logbf32x F
+GLIBC_2.39 logbf64 F
+GLIBC_2.39 logbf64x F
+GLIBC_2.39 logbl F
+GLIBC_2.39 logf F
+GLIBC_2.39 logf128 F
+GLIBC_2.39 logf32 F
+GLIBC_2.39 logf32x F
+GLIBC_2.39 logf64 F
+GLIBC_2.39 logf64x F
+GLIBC_2.39 logl F
+GLIBC_2.39 lrint F
+GLIBC_2.39 lrintf F
+GLIBC_2.39 lrintf128 F
+GLIBC_2.39 lrintf32 F
+GLIBC_2.39 lrintf32x F
+GLIBC_2.39 lrintf64 F
+GLIBC_2.39 lrintf64x F
+GLIBC_2.39 lrintl F
+GLIBC_2.39 lround F
+GLIBC_2.39 lroundf F
+GLIBC_2.39 lroundf128 F
+GLIBC_2.39 lroundf32 F
+GLIBC_2.39 lroundf32x F
+GLIBC_2.39 lroundf64 F
+GLIBC_2.39 lroundf64x F
+GLIBC_2.39 lroundl F
+GLIBC_2.39 modf F
+GLIBC_2.39 modff F
+GLIBC_2.39 modff128 F
+GLIBC_2.39 modff32 F
+GLIBC_2.39 modff32x F
+GLIBC_2.39 modff64 F
+GLIBC_2.39 modff64x F
+GLIBC_2.39 modfl F
+GLIBC_2.39 nan F
+GLIBC_2.39 nanf F
+GLIBC_2.39 nanf128 F
+GLIBC_2.39 nanf32 F
+GLIBC_2.39 nanf32x F
+GLIBC_2.39 nanf64 F
+GLIBC_2.39 nanf64x F
+GLIBC_2.39 nanl F
+GLIBC_2.39 nearbyint F
+GLIBC_2.39 nearbyintf F
+GLIBC_2.39 nearbyintf128 F
+GLIBC_2.39 nearbyintf32 F
+GLIBC_2.39 nearbyintf32x F
+GLIBC_2.39 nearbyintf64 F
+GLIBC_2.39 nearbyintf64x F
+GLIBC_2.39 nearbyintl F
+GLIBC_2.39 nextafter F
+GLIBC_2.39 nextafterf F
+GLIBC_2.39 nextafterf128 F
+GLIBC_2.39 nextafterf32 F
+GLIBC_2.39 nextafterf32x F
+GLIBC_2.39 nextafterf64 F
+GLIBC_2.39 nextafterf64x F
+GLIBC_2.39 nextafterl F
+GLIBC_2.39 nextdown F
+GLIBC_2.39 nextdownf F
+GLIBC_2.39 nextdownf128 F
+GLIBC_2.39 nextdownf32 F
+GLIBC_2.39 nextdownf32x F
+GLIBC_2.39 nextdownf64 F
+GLIBC_2.39 nextdownf64x F
+GLIBC_2.39 nextdownl F
+GLIBC_2.39 nexttoward F
+GLIBC_2.39 nexttowardf F
+GLIBC_2.39 nexttowardl F
+GLIBC_2.39 nextup F
+GLIBC_2.39 nextupf F
+GLIBC_2.39 nextupf128 F
+GLIBC_2.39 nextupf32 F
+GLIBC_2.39 nextupf32x F
+GLIBC_2.39 nextupf64 F
+GLIBC_2.39 nextupf64x F
+GLIBC_2.39 nextupl F
+GLIBC_2.39 pow F
+GLIBC_2.39 powf F
+GLIBC_2.39 powf128 F
+GLIBC_2.39 powf32 F
+GLIBC_2.39 powf32x F
+GLIBC_2.39 powf64 F
+GLIBC_2.39 powf64x F
+GLIBC_2.39 powl F
+GLIBC_2.39 remainder F
+GLIBC_2.39 remainderf F
+GLIBC_2.39 remainderf128 F
+GLIBC_2.39 remainderf32 F
+GLIBC_2.39 remainderf32x F
+GLIBC_2.39 remainderf64 F
+GLIBC_2.39 remainderf64x F
+GLIBC_2.39 remainderl F
+GLIBC_2.39 remquo F
+GLIBC_2.39 remquof F
+GLIBC_2.39 remquof128 F
+GLIBC_2.39 remquof32 F
+GLIBC_2.39 remquof32x F
+GLIBC_2.39 remquof64 F
+GLIBC_2.39 remquof64x F
+GLIBC_2.39 remquol F
+GLIBC_2.39 rint F
+GLIBC_2.39 rintf F
+GLIBC_2.39 rintf128 F
+GLIBC_2.39 rintf32 F
+GLIBC_2.39 rintf32x F
+GLIBC_2.39 rintf64 F
+GLIBC_2.39 rintf64x F
+GLIBC_2.39 rintl F
+GLIBC_2.39 round F
+GLIBC_2.39 roundeven F
+GLIBC_2.39 roundevenf F
+GLIBC_2.39 roundevenf128 F
+GLIBC_2.39 roundevenf32 F
+GLIBC_2.39 roundevenf32x F
+GLIBC_2.39 roundevenf64 F
+GLIBC_2.39 roundevenf64x F
+GLIBC_2.39 roundevenl F
+GLIBC_2.39 roundf F
+GLIBC_2.39 roundf128 F
+GLIBC_2.39 roundf32 F
+GLIBC_2.39 roundf32x F
+GLIBC_2.39 roundf64 F
+GLIBC_2.39 roundf64x F
+GLIBC_2.39 roundl F
+GLIBC_2.39 scalb F
+GLIBC_2.39 scalbf F
+GLIBC_2.39 scalbl F
+GLIBC_2.39 scalbln F
+GLIBC_2.39 scalblnf F
+GLIBC_2.39 scalblnf128 F
+GLIBC_2.39 scalblnf32 F
+GLIBC_2.39 scalblnf32x F
+GLIBC_2.39 scalblnf64 F
+GLIBC_2.39 scalblnf64x F
+GLIBC_2.39 scalblnl F
+GLIBC_2.39 scalbn F
+GLIBC_2.39 scalbnf F
+GLIBC_2.39 scalbnf128 F
+GLIBC_2.39 scalbnf32 F
+GLIBC_2.39 scalbnf32x F
+GLIBC_2.39 scalbnf64 F
+GLIBC_2.39 scalbnf64x F
+GLIBC_2.39 scalbnl F
+GLIBC_2.39 setpayload F
+GLIBC_2.39 setpayloadf F
+GLIBC_2.39 setpayloadf128 F
+GLIBC_2.39 setpayloadf32 F
+GLIBC_2.39 setpayloadf32x F
+GLIBC_2.39 setpayloadf64 F
+GLIBC_2.39 setpayloadf64x F
+GLIBC_2.39 setpayloadl F
+GLIBC_2.39 setpayloadsig F
+GLIBC_2.39 setpayloadsigf F
+GLIBC_2.39 setpayloadsigf128 F
+GLIBC_2.39 setpayloadsigf32 F
+GLIBC_2.39 setpayloadsigf32x F
+GLIBC_2.39 setpayloadsigf64 F
+GLIBC_2.39 setpayloadsigf64x F
+GLIBC_2.39 setpayloadsigl F
+GLIBC_2.39 signgam D 0x4
+GLIBC_2.39 significand F
+GLIBC_2.39 significandf F
+GLIBC_2.39 significandl F
+GLIBC_2.39 sin F
+GLIBC_2.39 sincos F
+GLIBC_2.39 sincosf F
+GLIBC_2.39 sincosf128 F
+GLIBC_2.39 sincosf32 F
+GLIBC_2.39 sincosf32x F
+GLIBC_2.39 sincosf64 F
+GLIBC_2.39 sincosf64x F
+GLIBC_2.39 sincosl F
+GLIBC_2.39 sinf F
+GLIBC_2.39 sinf128 F
+GLIBC_2.39 sinf32 F
+GLIBC_2.39 sinf32x F
+GLIBC_2.39 sinf64 F
+GLIBC_2.39 sinf64x F
+GLIBC_2.39 sinh F
+GLIBC_2.39 sinhf F
+GLIBC_2.39 sinhf128 F
+GLIBC_2.39 sinhf32 F
+GLIBC_2.39 sinhf32x F
+GLIBC_2.39 sinhf64 F
+GLIBC_2.39 sinhf64x F
+GLIBC_2.39 sinhl F
+GLIBC_2.39 sinl F
+GLIBC_2.39 sqrt F
+GLIBC_2.39 sqrtf F
+GLIBC_2.39 sqrtf128 F
+GLIBC_2.39 sqrtf32 F
+GLIBC_2.39 sqrtf32x F
+GLIBC_2.39 sqrtf64 F
+GLIBC_2.39 sqrtf64x F
+GLIBC_2.39 sqrtl F
+GLIBC_2.39 tan F
+GLIBC_2.39 tanf F
+GLIBC_2.39 tanf128 F
+GLIBC_2.39 tanf32 F
+GLIBC_2.39 tanf32x F
+GLIBC_2.39 tanf64 F
+GLIBC_2.39 tanf64x F
+GLIBC_2.39 tanh F
+GLIBC_2.39 tanhf F
+GLIBC_2.39 tanhf128 F
+GLIBC_2.39 tanhf32 F
+GLIBC_2.39 tanhf32x F
+GLIBC_2.39 tanhf64 F
+GLIBC_2.39 tanhf64x F
+GLIBC_2.39 tanhl F
+GLIBC_2.39 tanl F
+GLIBC_2.39 tgamma F
+GLIBC_2.39 tgammaf F
+GLIBC_2.39 tgammaf128 F
+GLIBC_2.39 tgammaf32 F
+GLIBC_2.39 tgammaf32x F
+GLIBC_2.39 tgammaf64 F
+GLIBC_2.39 tgammaf64x F
+GLIBC_2.39 tgammal F
+GLIBC_2.39 totalorder F
+GLIBC_2.39 totalorderf F
+GLIBC_2.39 totalorderf128 F
+GLIBC_2.39 totalorderf32 F
+GLIBC_2.39 totalorderf32x F
+GLIBC_2.39 totalorderf64 F
+GLIBC_2.39 totalorderf64x F
+GLIBC_2.39 totalorderl F
+GLIBC_2.39 totalordermag F
+GLIBC_2.39 totalordermagf F
+GLIBC_2.39 totalordermagf128 F
+GLIBC_2.39 totalordermagf32 F
+GLIBC_2.39 totalordermagf32x F
+GLIBC_2.39 totalordermagf64 F
+GLIBC_2.39 totalordermagf64x F
+GLIBC_2.39 totalordermagl F
+GLIBC_2.39 trunc F
+GLIBC_2.39 truncf F
+GLIBC_2.39 truncf128 F
+GLIBC_2.39 truncf32 F
+GLIBC_2.39 truncf32x F
+GLIBC_2.39 truncf64 F
+GLIBC_2.39 truncf64x F
+GLIBC_2.39 truncl F
+GLIBC_2.39 ufromfp F
+GLIBC_2.39 ufromfpf F
+GLIBC_2.39 ufromfpf128 F
+GLIBC_2.39 ufromfpf32 F
+GLIBC_2.39 ufromfpf32x F
+GLIBC_2.39 ufromfpf64 F
+GLIBC_2.39 ufromfpf64x F
+GLIBC_2.39 ufromfpl F
+GLIBC_2.39 ufromfpx F
+GLIBC_2.39 ufromfpxf F
+GLIBC_2.39 ufromfpxf128 F
+GLIBC_2.39 ufromfpxf32 F
+GLIBC_2.39 ufromfpxf32x F
+GLIBC_2.39 ufromfpxf64 F
+GLIBC_2.39 ufromfpxf64x F
+GLIBC_2.39 ufromfpxl F
+GLIBC_2.39 y0 F
+GLIBC_2.39 y0f F
+GLIBC_2.39 y0f128 F
+GLIBC_2.39 y0f32 F
+GLIBC_2.39 y0f32x F
+GLIBC_2.39 y0f64 F
+GLIBC_2.39 y0f64x F
+GLIBC_2.39 y0l F
+GLIBC_2.39 y1 F
+GLIBC_2.39 y1f F
+GLIBC_2.39 y1f128 F
+GLIBC_2.39 y1f32 F
+GLIBC_2.39 y1f32x F
+GLIBC_2.39 y1f64 F
+GLIBC_2.39 y1f64x F
+GLIBC_2.39 y1l F
+GLIBC_2.39 yn F
+GLIBC_2.39 ynf F
+GLIBC_2.39 ynf128 F
+GLIBC_2.39 ynf32 F
+GLIBC_2.39 ynf32x F
+GLIBC_2.39 ynf64 F
+GLIBC_2.39 ynf64x F
+GLIBC_2.39 ynl F
diff --git a/sysdeps/mach/hurd/aarch64/libmvec.abilist b/sysdeps/mach/hurd/aarch64/libmvec.abilist
new file mode 100644
index 00000000..29e63598
--- /dev/null
+++ b/sysdeps/mach/hurd/aarch64/libmvec.abilist
@@ -0,0 +1,75 @@
+GLIBC_2.39 _ZGVnN2v_acos F
+GLIBC_2.39 _ZGVnN2v_acosf F
+GLIBC_2.39 _ZGVnN2v_asin F
+GLIBC_2.39 _ZGVnN2v_asinf F
+GLIBC_2.39 _ZGVnN2v_atan F
+GLIBC_2.39 _ZGVnN2v_atanf F
+GLIBC_2.39 _ZGVnN2v_cos F
+GLIBC_2.39 _ZGVnN2v_cosf F
+GLIBC_2.39 _ZGVnN2v_exp F
+GLIBC_2.39 _ZGVnN2v_exp10 F
+GLIBC_2.39 _ZGVnN2v_exp10f F
+GLIBC_2.39 _ZGVnN2v_exp2 F
+GLIBC_2.39 _ZGVnN2v_exp2f F
+GLIBC_2.39 _ZGVnN2v_expf F
+GLIBC_2.39 _ZGVnN2v_expm1 F
+GLIBC_2.39 _ZGVnN2v_expm1f F
+GLIBC_2.39 _ZGVnN2v_log F
+GLIBC_2.39 _ZGVnN2v_log10 F
+GLIBC_2.39 _ZGVnN2v_log10f F
+GLIBC_2.39 _ZGVnN2v_log1p F
+GLIBC_2.39 _ZGVnN2v_log1pf F
+GLIBC_2.39 _ZGVnN2v_log2 F
+GLIBC_2.39 _ZGVnN2v_log2f F
+GLIBC_2.39 _ZGVnN2v_logf F
+GLIBC_2.39 _ZGVnN2v_sin F
+GLIBC_2.39 _ZGVnN2v_sinf F
+GLIBC_2.39 _ZGVnN2v_tan F
+GLIBC_2.39 _ZGVnN2v_tanf F
+GLIBC_2.39 _ZGVnN2vv_atan2 F
+GLIBC_2.39 _ZGVnN2vv_atan2f F
+GLIBC_2.39 _ZGVnN4v_acosf F
+GLIBC_2.39 _ZGVnN4v_asinf F
+GLIBC_2.39 _ZGVnN4v_atanf F
+GLIBC_2.39 _ZGVnN4v_cosf F
+GLIBC_2.39 _ZGVnN4v_exp10f F
+GLIBC_2.39 _ZGVnN4v_exp2f F
+GLIBC_2.39 _ZGVnN4v_expf F
+GLIBC_2.39 _ZGVnN4v_expm1f F
+GLIBC_2.39 _ZGVnN4v_log10f F
+GLIBC_2.39 _ZGVnN4v_log1pf F
+GLIBC_2.39 _ZGVnN4v_log2f F
+GLIBC_2.39 _ZGVnN4v_logf F
+GLIBC_2.39 _ZGVnN4v_sinf F
+GLIBC_2.39 _ZGVnN4v_tanf F
+GLIBC_2.39 _ZGVnN4vv_atan2f F
+GLIBC_2.39 _ZGVsMxv_acos F
+GLIBC_2.39 _ZGVsMxv_acosf F
+GLIBC_2.39 _ZGVsMxv_asin F
+GLIBC_2.39 _ZGVsMxv_asinf F
+GLIBC_2.39 _ZGVsMxv_atan F
+GLIBC_2.39 _ZGVsMxv_atanf F
+GLIBC_2.39 _ZGVsMxv_cos F
+GLIBC_2.39 _ZGVsMxv_cosf F
+GLIBC_2.39 _ZGVsMxv_exp F
+GLIBC_2.39 _ZGVsMxv_exp10 F
+GLIBC_2.39 _ZGVsMxv_exp10f F
+GLIBC_2.39 _ZGVsMxv_exp2 F
+GLIBC_2.39 _ZGVsMxv_exp2f F
+GLIBC_2.39 _ZGVsMxv_expf F
+GLIBC_2.39 _ZGVsMxv_expm1 F
+GLIBC_2.39 _ZGVsMxv_expm1f F
+GLIBC_2.39 _ZGVsMxv_log F
+GLIBC_2.39 _ZGVsMxv_log10 F
+GLIBC_2.39 _ZGVsMxv_log10f F
+GLIBC_2.39 _ZGVsMxv_log1p F
+GLIBC_2.39 _ZGVsMxv_log1pf F
+GLIBC_2.39 _ZGVsMxv_log2 F
+GLIBC_2.39 _ZGVsMxv_log2f F
+GLIBC_2.39 _ZGVsMxv_logf F
+GLIBC_2.39 _ZGVsMxv_sin F
+GLIBC_2.39 _ZGVsMxv_sinf F
+GLIBC_2.39 _ZGVsMxv_tan F
+GLIBC_2.39 _ZGVsMxv_tanf F
+GLIBC_2.39 _ZGVsMxvv_atan2 F
+GLIBC_2.39 _ZGVsMxvv_atan2f F
diff --git a/sysdeps/mach/hurd/aarch64/libpthread.abilist b/sysdeps/mach/hurd/aarch64/libpthread.abilist
new file mode 100644
index 00000000..ac8713bd
--- /dev/null
+++ b/sysdeps/mach/hurd/aarch64/libpthread.abilist
@@ -0,0 +1,165 @@
+GLIBC_2.39 _IO_flockfile F
+GLIBC_2.39 _IO_ftrylockfile F
+GLIBC_2.39 _IO_funlockfile F
+GLIBC_2.39 __errno_location F
+GLIBC_2.39 __h_errno_location F
+GLIBC_2.39 __mutex_lock_solid F
+GLIBC_2.39 __mutex_unlock_solid F
+GLIBC_2.39 __pthread_get_cleanup_stack F
+GLIBC_2.39 __pthread_key_create F
+GLIBC_2.39 __pthread_kill F
+GLIBC_2.39 __pthread_mutex_transfer_np F
+GLIBC_2.39 __pthread_spin_destroy F
+GLIBC_2.39 __pthread_spin_init F
+GLIBC_2.39 __pthread_spin_lock F
+GLIBC_2.39 __pthread_spin_trylock F
+GLIBC_2.39 __pthread_spin_unlock F
+GLIBC_2.39 _cthreads_flockfile F
+GLIBC_2.39 _cthreads_ftrylockfile F
+GLIBC_2.39 _cthreads_funlockfile F
+GLIBC_2.39 _pthread_spin_lock F
+GLIBC_2.39 call_once F
+GLIBC_2.39 cnd_broadcast F
+GLIBC_2.39 cnd_destroy F
+GLIBC_2.39 cnd_init F
+GLIBC_2.39 cnd_signal F
+GLIBC_2.39 cnd_timedwait F
+GLIBC_2.39 cnd_wait F
+GLIBC_2.39 cthread_detach F
+GLIBC_2.39 cthread_fork F
+GLIBC_2.39 cthread_getspecific F
+GLIBC_2.39 cthread_keycreate F
+GLIBC_2.39 cthread_setspecific F
+GLIBC_2.39 flockfile F
+GLIBC_2.39 ftrylockfile F
+GLIBC_2.39 funlockfile F
+GLIBC_2.39 mtx_destroy F
+GLIBC_2.39 mtx_init F
+GLIBC_2.39 mtx_lock F
+GLIBC_2.39 mtx_timedlock F
+GLIBC_2.39 mtx_trylock F
+GLIBC_2.39 mtx_unlock F
+GLIBC_2.39 pthread_attr_destroy F
+GLIBC_2.39 pthread_attr_getguardsize F
+GLIBC_2.39 pthread_attr_getscope F
+GLIBC_2.39 pthread_attr_getstack F
+GLIBC_2.39 pthread_attr_getstackaddr F
+GLIBC_2.39 pthread_attr_getstacksize F
+GLIBC_2.39 pthread_attr_init F
+GLIBC_2.39 pthread_attr_setguardsize F
+GLIBC_2.39 pthread_attr_setschedparam F
+GLIBC_2.39 pthread_attr_setscope F
+GLIBC_2.39 pthread_attr_setstack F
+GLIBC_2.39 pthread_attr_setstackaddr F
+GLIBC_2.39 pthread_attr_setstacksize F
+GLIBC_2.39 pthread_barrier_destroy F
+GLIBC_2.39 pthread_barrier_init F
+GLIBC_2.39 pthread_barrier_wait F
+GLIBC_2.39 pthread_barrierattr_destroy F
+GLIBC_2.39 pthread_barrierattr_getpshared F
+GLIBC_2.39 pthread_barrierattr_init F
+GLIBC_2.39 pthread_barrierattr_setpshared F
+GLIBC_2.39 pthread_cancel F
+GLIBC_2.39 pthread_clockjoin_np F
+GLIBC_2.39 pthread_cond_broadcast F
+GLIBC_2.39 pthread_cond_clockwait F
+GLIBC_2.39 pthread_cond_destroy F
+GLIBC_2.39 pthread_cond_init F
+GLIBC_2.39 pthread_cond_signal F
+GLIBC_2.39 pthread_cond_timedwait F
+GLIBC_2.39 pthread_cond_wait F
+GLIBC_2.39 pthread_condattr_destroy F
+GLIBC_2.39 pthread_condattr_getclock F
+GLIBC_2.39 pthread_condattr_getpshared F
+GLIBC_2.39 pthread_condattr_init F
+GLIBC_2.39 pthread_condattr_setclock F
+GLIBC_2.39 pthread_condattr_setpshared F
+GLIBC_2.39 pthread_create F
+GLIBC_2.39 pthread_detach F
+GLIBC_2.39 pthread_exit F
+GLIBC_2.39 pthread_getattr_np F
+GLIBC_2.39 pthread_getconcurrency F
+GLIBC_2.39 pthread_getcpuclockid F
+GLIBC_2.39 pthread_getspecific F
+GLIBC_2.39 pthread_hurd_cond_timedwait_np F
+GLIBC_2.39 pthread_hurd_cond_wait_np F
+GLIBC_2.39 pthread_join F
+GLIBC_2.39 pthread_key_create F
+GLIBC_2.39 pthread_key_delete F
+GLIBC_2.39 pthread_kill F
+GLIBC_2.39 pthread_mutex_clocklock F
+GLIBC_2.39 pthread_mutex_consistent F
+GLIBC_2.39 pthread_mutex_consistent_np F
+GLIBC_2.39 pthread_mutex_destroy F
+GLIBC_2.39 pthread_mutex_getprioceiling F
+GLIBC_2.39 pthread_mutex_init F
+GLIBC_2.39 pthread_mutex_lock F
+GLIBC_2.39 pthread_mutex_setprioceiling F
+GLIBC_2.39 pthread_mutex_timedlock F
+GLIBC_2.39 pthread_mutex_transfer_np F
+GLIBC_2.39 pthread_mutex_trylock F
+GLIBC_2.39 pthread_mutex_unlock F
+GLIBC_2.39 pthread_mutexattr_destroy F
+GLIBC_2.39 pthread_mutexattr_getprioceiling F
+GLIBC_2.39 pthread_mutexattr_getprotocol F
+GLIBC_2.39 pthread_mutexattr_getpshared F
+GLIBC_2.39 pthread_mutexattr_getrobust F
+GLIBC_2.39 pthread_mutexattr_getrobust_np F
+GLIBC_2.39 pthread_mutexattr_gettype F
+GLIBC_2.39 pthread_mutexattr_init F
+GLIBC_2.39 pthread_mutexattr_setprioceiling F
+GLIBC_2.39 pthread_mutexattr_setprotocol F
+GLIBC_2.39 pthread_mutexattr_setpshared F
+GLIBC_2.39 pthread_mutexattr_setrobust F
+GLIBC_2.39 pthread_mutexattr_setrobust_np F
+GLIBC_2.39 pthread_mutexattr_settype F
+GLIBC_2.39 pthread_once F
+GLIBC_2.39 pthread_rwlock_clockrdlock F
+GLIBC_2.39 pthread_rwlock_clockwrlock F
+GLIBC_2.39 pthread_rwlock_destroy F
+GLIBC_2.39 pthread_rwlock_init F
+GLIBC_2.39 pthread_rwlock_rdlock F
+GLIBC_2.39 pthread_rwlock_timedrdlock F
+GLIBC_2.39 pthread_rwlock_timedwrlock F
+GLIBC_2.39 pthread_rwlock_tryrdlock F
+GLIBC_2.39 pthread_rwlock_trywrlock F
+GLIBC_2.39 pthread_rwlock_unlock F
+GLIBC_2.39 pthread_rwlock_wrlock F
+GLIBC_2.39 pthread_rwlockattr_destroy F
+GLIBC_2.39 pthread_rwlockattr_getpshared F
+GLIBC_2.39 pthread_rwlockattr_init F
+GLIBC_2.39 pthread_rwlockattr_setpshared F
+GLIBC_2.39 pthread_setcancelstate F
+GLIBC_2.39 pthread_setcanceltype F
+GLIBC_2.39 pthread_setconcurrency F
+GLIBC_2.39 pthread_setschedprio F
+GLIBC_2.39 pthread_setspecific F
+GLIBC_2.39 pthread_sigmask F
+GLIBC_2.39 pthread_spin_destroy F
+GLIBC_2.39 pthread_spin_init F
+GLIBC_2.39 pthread_spin_lock F
+GLIBC_2.39 pthread_spin_trylock F
+GLIBC_2.39 pthread_spin_unlock F
+GLIBC_2.39 pthread_testcancel F
+GLIBC_2.39 pthread_timedjoin_np F
+GLIBC_2.39 pthread_tryjoin_np F
+GLIBC_2.39 pthread_yield F
+GLIBC_2.39 sem_clockwait F
+GLIBC_2.39 sem_close F
+GLIBC_2.39 sem_destroy F
+GLIBC_2.39 sem_getvalue F
+GLIBC_2.39 sem_init F
+GLIBC_2.39 sem_open F
+GLIBC_2.39 sem_post F
+GLIBC_2.39 sem_timedwait F
+GLIBC_2.39 sem_trywait F
+GLIBC_2.39 sem_unlink F
+GLIBC_2.39 sem_wait F
+GLIBC_2.39 thrd_create F
+GLIBC_2.39 thrd_detach F
+GLIBC_2.39 thrd_exit F
+GLIBC_2.39 thrd_join F
+GLIBC_2.39 tss_create F
+GLIBC_2.39 tss_delete F
+GLIBC_2.39 tss_get F
+GLIBC_2.39 tss_set F
diff --git a/sysdeps/mach/hurd/aarch64/libresolv.abilist b/sysdeps/mach/hurd/aarch64/libresolv.abilist
new file mode 100644
index 00000000..a3938eb8
--- /dev/null
+++ b/sysdeps/mach/hurd/aarch64/libresolv.abilist
@@ -0,0 +1,55 @@
+GLIBC_2.39 __b64_ntop F
+GLIBC_2.39 __b64_pton F
+GLIBC_2.39 __dn_count_labels F
+GLIBC_2.39 __fp_nquery F
+GLIBC_2.39 __fp_query F
+GLIBC_2.39 __fp_resstat F
+GLIBC_2.39 __hostalias F
+GLIBC_2.39 __loc_aton F
+GLIBC_2.39 __loc_ntoa F
+GLIBC_2.39 __p_cdname F
+GLIBC_2.39 __p_cdnname F
+GLIBC_2.39 __p_class F
+GLIBC_2.39 __p_class_syms D 0xa8
+GLIBC_2.39 __p_fqname F
+GLIBC_2.39 __p_fqnname F
+GLIBC_2.39 __p_option F
+GLIBC_2.39 __p_query F
+GLIBC_2.39 __p_rcode F
+GLIBC_2.39 __p_time F
+GLIBC_2.39 __p_type F
+GLIBC_2.39 __p_type_syms D 0x450
+GLIBC_2.39 __putlong F
+GLIBC_2.39 __putshort F
+GLIBC_2.39 __res_close F
+GLIBC_2.39 __res_hostalias F
+GLIBC_2.39 __res_isourserver F
+GLIBC_2.39 __res_nameinquery F
+GLIBC_2.39 __res_queriesmatch F
+GLIBC_2.39 __sym_ntop F
+GLIBC_2.39 __sym_ntos F
+GLIBC_2.39 __sym_ston F
+GLIBC_2.39 _getlong F
+GLIBC_2.39 _getshort F
+GLIBC_2.39 inet_net_ntop F
+GLIBC_2.39 inet_net_pton F
+GLIBC_2.39 inet_neta F
+GLIBC_2.39 ns_datetosecs F
+GLIBC_2.39 ns_format_ttl F
+GLIBC_2.39 ns_get16 F
+GLIBC_2.39 ns_get32 F
+GLIBC_2.39 ns_initparse F
+GLIBC_2.39 ns_makecanon F
+GLIBC_2.39 ns_msg_getflag F
+GLIBC_2.39 ns_name_ntol F
+GLIBC_2.39 ns_name_rollback F
+GLIBC_2.39 ns_parse_ttl F
+GLIBC_2.39 ns_parserr F
+GLIBC_2.39 ns_put16 F
+GLIBC_2.39 ns_put32 F
+GLIBC_2.39 ns_samedomain F
+GLIBC_2.39 ns_samename F
+GLIBC_2.39 ns_skiprr F
+GLIBC_2.39 ns_sprintrr F
+GLIBC_2.39 ns_sprintrrf F
+GLIBC_2.39 ns_subdomain F
diff --git a/sysdeps/mach/hurd/aarch64/librt.abilist b/sysdeps/mach/hurd/aarch64/librt.abilist
new file mode 100644
index 00000000..a698fec1
--- /dev/null
+++ b/sysdeps/mach/hurd/aarch64/librt.abilist
@@ -0,0 +1,33 @@
+GLIBC_2.39 __mq_open_2 F
+GLIBC_2.39 aio_cancel F
+GLIBC_2.39 aio_cancel64 F
+GLIBC_2.39 aio_error F
+GLIBC_2.39 aio_error64 F
+GLIBC_2.39 aio_fsync F
+GLIBC_2.39 aio_fsync64 F
+GLIBC_2.39 aio_init F
+GLIBC_2.39 aio_read F
+GLIBC_2.39 aio_read64 F
+GLIBC_2.39 aio_return F
+GLIBC_2.39 aio_return64 F
+GLIBC_2.39 aio_suspend F
+GLIBC_2.39 aio_suspend64 F
+GLIBC_2.39 aio_write F
+GLIBC_2.39 aio_write64 F
+GLIBC_2.39 lio_listio F
+GLIBC_2.39 lio_listio64 F
+GLIBC_2.39 mq_close F
+GLIBC_2.39 mq_getattr F
+GLIBC_2.39 mq_notify F
+GLIBC_2.39 mq_open F
+GLIBC_2.39 mq_receive F
+GLIBC_2.39 mq_send F
+GLIBC_2.39 mq_setattr F
+GLIBC_2.39 mq_timedreceive F
+GLIBC_2.39 mq_timedsend F
+GLIBC_2.39 mq_unlink F
+GLIBC_2.39 timer_create F
+GLIBC_2.39 timer_delete F
+GLIBC_2.39 timer_getoverrun F
+GLIBC_2.39 timer_gettime F
+GLIBC_2.39 timer_settime F
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 50+ messages in thread

* Re: [RFC PATCH 00/23] aarch64-gnu port
  2024-01-03 17:14 [RFC PATCH 00/23] aarch64-gnu port Sergey Bugaev
                   ` (22 preceding siblings ...)
  2024-01-03 17:14 ` [RFC PATCH 23/23] hurd: Add expected aarch64-gnu abistlists Sergey Bugaev
@ 2024-01-03 17:30 ` Joseph Myers
  2024-01-03 17:57   ` Sergey Bugaev
  2024-03-11 16:10   ` Florian Weimer
  2024-03-11 13:47 ` H.J. Lu
  2024-03-11 14:14 ` Maxim Kuvyrkov
  25 siblings, 2 replies; 50+ messages in thread
From: Joseph Myers @ 2024-01-03 17:30 UTC (permalink / raw)
  To: Sergey Bugaev
  Cc: libc-alpha, bug-hurd, Adhemerval Zanella Netto, Helmut Grohne

On Wed, 3 Jan 2024, Sergey Bugaev wrote:

> To build this, you need an aarch64-gnu toolchain (binutils, GCC, MIG),
> and GNU Mach headers for AArch64. I have posted the patches for
> binutils, GCC, and GNU Mach to the bug-hurd mailing list; no patches
> are required to build aarch64-gnu-mig.

> There is no AArch64 port of GNU Mach yet; I'm trying to get the ball
> rolling by making this port of glibc. I have only added some AArch64

I think the same principle applies for ports to new (architecture, Hurd) 
pairs as for new (architecture, Linux) pairs: the relevant code needs to 
be in upstream mainline of all components on which glibc build-depends 
before the port can go into glibc (and thus before the symbol versions for 
the port can be determined) - and at the point where it's ready to go in, 
a corresponding build-many-glibcs.py entry should be added as part of the 
patch series.  Parts of <https://sourceware.org/glibc/wiki/NewPorts> may 
be applicable, though that's more oriented to the case where the 
architecture support itself is entirely new.

You can of course do refactors of existing files not specific to 
aarch64-gnu, in preparation for the port, before then, to reduce the size 
of the eventual patch series proposing adding the port to glibc.

-- 
Joseph S. Myers
jsm@polyomino.org.uk

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [RFC PATCH 00/23] aarch64-gnu port
  2024-01-03 17:30 ` [RFC PATCH 00/23] aarch64-gnu port Joseph Myers
@ 2024-01-03 17:57   ` Sergey Bugaev
  2024-03-11 16:10   ` Florian Weimer
  1 sibling, 0 replies; 50+ messages in thread
From: Sergey Bugaev @ 2024-01-03 17:57 UTC (permalink / raw)
  To: Joseph Myers
  Cc: libc-alpha, bug-hurd, Adhemerval Zanella Netto, Helmut Grohne

On Wed, Jan 3, 2024 at 8:30 PM Joseph Myers <jsm@polyomino.org.uk> wrote:
> I think the same principle applies for ports to new (architecture, Hurd)
> pairs as for new (architecture, Linux) pairs: the relevant code needs to
> be in upstream mainline of all components on which glibc build-depends
> before the port can go into glibc (and thus before the symbol versions for
> the port can be determined) - and at the point where it's ready to go in,
> a corresponding build-many-glibcs.py entry should be added as part of the
> patch series.  Parts of <https://sourceware.org/glibc/wiki/NewPorts> may
> be applicable, though that's more oriented to the case where the
> architecture support itself is entirely new.
>
> You can of course do refactors of existing files not specific to
> aarch64-gnu, in preparation for the port, before then, to reduce the size
> of the eventual patch series proposing adding the port to glibc.

Certainly; and I should've been more clear about this: I don't expect
this to get merged until there's a gnumach port. And the port
development, and the feedback I'm hoping to get, will likely require
changes/tweaks to the Mach headers/APIs (as I've said, my versions
I've developed this against are more like preliminary sketches than
final APIs set in stone) and the corresponding changes to this port,
so I don't expect it to be merged until that all is settled.

Some generic improvements could be merged now as you're saying, but
other than that, I'm posting these patches both to gather feedback
from both Hurd and glibc communities, and to enable others to build
it, experiment with it, and build more stuff on top of it (for
example, can we get all of the Hurd building?). Symbol versions, I
have set to 2.39, but seeing how the 2.39 release is already in
progress, we'll likely need to bump this.

Sergey

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 01/23] hurd: Add some missing includes
  2024-01-03 17:14 ` [PATCH 01/23] hurd: Add some missing includes Sergey Bugaev
@ 2024-01-03 20:43   ` Samuel Thibault
  2024-01-03 21:08     ` Sergey Bugaev
  2024-01-03 21:00   ` Samuel Thibault
  1 sibling, 1 reply; 50+ messages in thread
From: Samuel Thibault @ 2024-01-03 20:43 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Sergey Bugaev, le mer. 03 janv. 2024 20:14:34 +0300, a ecrit:
> diff --git a/sysdeps/hurd/include/hurd.h b/sysdeps/hurd/include/hurd.h
> index 568092d6..189fd44e 100644
> --- a/sysdeps/hurd/include/hurd.h
> +++ b/sysdeps/hurd/include/hurd.h
> @@ -1,4 +1,5 @@
>  #ifndef	_HURD_H
> +#include <tls.h>
>  #include_next <hurd.h>
>  
>  void _hurd_libc_proc_init (char **argv);
> diff --git a/sysdeps/hurd/include/hurd/signal.h b/sysdeps/hurd/include/hurd/signal.h
> index 1dc8a1f3..9b1bf3df 100644
> --- a/sysdeps/hurd/include/hurd/signal.h
> +++ b/sysdeps/hurd/include/hurd/signal.h
> @@ -6,6 +6,7 @@ extern struct hurd_sigstate *_hurd_self_sigstate (void) __attribute__ ((__const_
>  libc_hidden_proto (_hurd_self_sigstate)
>  #endif
>  
> +#include <tls.h>
>  #include_next <hurd/signal.h>
>  
>  #ifndef _ISOMAC

Why?

These are breaking hurd/check-installed-headers-c

Samuel

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 01/23] hurd: Add some missing includes
  2024-01-03 17:14 ` [PATCH 01/23] hurd: Add some missing includes Sergey Bugaev
  2024-01-03 20:43   ` Samuel Thibault
@ 2024-01-03 21:00   ` Samuel Thibault
  1 sibling, 0 replies; 50+ messages in thread
From: Samuel Thibault @ 2024-01-03 21:00 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied the rest, thanks!

Sergey Bugaev, le mer. 03 janv. 2024 20:14:34 +0300, a ecrit:
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  hurd/hurdsig.c                     | 2 +-
>  mach/lowlevellock.h                | 1 +
>  sysdeps/hurd/include/hurd.h        | 1 +
>  sysdeps/hurd/include/hurd/signal.h | 1 +
>  sysdeps/mach/hurd/mig-reply.c      | 1 +
>  5 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/hurd/hurdsig.c b/hurd/hurdsig.c
> index 3deb94f9..fe788193 100644
> --- a/hurd/hurdsig.c
> +++ b/hurd/hurdsig.c
> @@ -15,6 +15,7 @@
>     License along with the GNU C Library; if not, see
>     <https://www.gnu.org/licenses/>.  */
>  
> +#include <assert.h>
>  #include <stdio.h>
>  #include <stdlib.h>
>  #include <string.h>
> @@ -260,7 +261,6 @@ _hurd_sigstate_actions (struct hurd_sigstate *ss)
>  #include <hurd/msg_server.h>
>  #include <hurd/msg_reply.h>	/* For __msg_sig_post_reply.  */
>  #include <hurd/interrupt.h>
> -#include <assert.h>
>  #include <unistd.h>
>  
>  
> diff --git a/mach/lowlevellock.h b/mach/lowlevellock.h
> index 129a7bd9..c5bb0879 100644
> --- a/mach/lowlevellock.h
> +++ b/mach/lowlevellock.h
> @@ -19,6 +19,7 @@
>  #ifndef _MACH_LOWLEVELLOCK_H
>  #define _MACH_LOWLEVELLOCK_H   1
>  
> +#include <mach.h>
>  #include <mach/gnumach.h>
>  #include <atomic.h>
>  
> diff --git a/sysdeps/hurd/include/hurd.h b/sysdeps/hurd/include/hurd.h
> index 568092d6..189fd44e 100644
> --- a/sysdeps/hurd/include/hurd.h
> +++ b/sysdeps/hurd/include/hurd.h
> @@ -1,4 +1,5 @@
>  #ifndef	_HURD_H
> +#include <tls.h>
>  #include_next <hurd.h>
>  
>  void _hurd_libc_proc_init (char **argv);
> diff --git a/sysdeps/hurd/include/hurd/signal.h b/sysdeps/hurd/include/hurd/signal.h
> index 1dc8a1f3..9b1bf3df 100644
> --- a/sysdeps/hurd/include/hurd/signal.h
> +++ b/sysdeps/hurd/include/hurd/signal.h
> @@ -6,6 +6,7 @@ extern struct hurd_sigstate *_hurd_self_sigstate (void) __attribute__ ((__const_
>  libc_hidden_proto (_hurd_self_sigstate)
>  #endif
>  
> +#include <tls.h>
>  #include_next <hurd/signal.h>
>  
>  #ifndef _ISOMAC
> diff --git a/sysdeps/mach/hurd/mig-reply.c b/sysdeps/mach/hurd/mig-reply.c
> index 57bcd808..85c3af13 100644
> --- a/sysdeps/mach/hurd/mig-reply.c
> +++ b/sysdeps/mach/hurd/mig-reply.c
> @@ -15,6 +15,7 @@
>     License along with the GNU C Library; if not, see
>     <https://www.gnu.org/licenses/>.  */
>  
> +#include <assert.h>
>  #include <mach.h>
>  #include <mach/mig_support.h>
>  #include <tls.h>
> -- 
> 2.43.0
> 
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 02/23] hurd: Declare _hurd_intr_rpc_msg* with protected visibility
  2024-01-03 17:14 ` [PATCH 02/23] hurd: Declare _hurd_intr_rpc_msg* with protected visibility Sergey Bugaev
@ 2024-01-03 21:00   ` Samuel Thibault
  0 siblings, 0 replies; 50+ messages in thread
From: Samuel Thibault @ 2024-01-03 21:00 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le mer. 03 janv. 2024 20:14:35 +0300, a ecrit:
> These symbols are internal and never exported; make sure the compiler
> realizes that when compiling hurdsig.c and does not try to emit GOT
> reads.
> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  hurd/hurdsig.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/hurd/hurdsig.c b/hurd/hurdsig.c
> index fe788193..882a0347 100644
> --- a/hurd/hurdsig.c
> +++ b/hurd/hurdsig.c
> @@ -416,9 +416,9 @@ _hurdsig_abort_rpcs (struct hurd_sigstate *ss, int signo, int sigthread,
>  		     struct machine_thread_all_state *state, int *state_change,
>  		     void (*reply) (void))
>  {
> -  extern const void _hurd_intr_rpc_msg_about_to;
> -  extern const void _hurd_intr_rpc_msg_setup_done;
> -  extern const void _hurd_intr_rpc_msg_in_trap;
> +  extern const void _hurd_intr_rpc_msg_about_to attribute_hidden;
> +  extern const void _hurd_intr_rpc_msg_setup_done attribute_hidden;
> +  extern const void _hurd_intr_rpc_msg_in_trap attribute_hidden;
>    mach_port_t rcv_port = MACH_PORT_NULL;
>    mach_port_t intr_port;
>  
> -- 
> 2.43.0
> 
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 04/23] mach: Drop some unnecessary vm_param.h includes
  2024-01-03 17:14 ` [PATCH 04/23] mach: Drop some unnecessary vm_param.h includes Sergey Bugaev
@ 2024-01-03 21:00   ` Samuel Thibault
  0 siblings, 0 replies; 50+ messages in thread
From: Samuel Thibault @ 2024-01-03 21:00 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le mer. 03 janv. 2024 20:14:37 +0300, a ecrit:
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
> 
> We should try to include vm_param.h less; this statically asserts that
> these files are not possibly using the PAGE_SIZE definition.
> 
> dl-sysdep.c used VM_MAX_ADDRESS for the "loser kludge for vm_map kernel
> bug"; that bug has been fixed and the kludge removed. setup-thread.c has
> been including vm_param.h from the start; I can't see any reason for it.
> 
>  mach/setup-thread.c           | 1 -
>  sysdeps/mach/hurd/dl-sysdep.c | 1 -
>  2 files changed, 2 deletions(-)
> 
> diff --git a/mach/setup-thread.c b/mach/setup-thread.c
> index 72bf1083..1e7f9953 100644
> --- a/mach/setup-thread.c
> +++ b/mach/setup-thread.c
> @@ -19,7 +19,6 @@
>  #include <mach/setup-thread.h>
>  #include <thread_state.h>
>  #include <string.h>
> -#include <mach/machine/vm_param.h>
>  #include <ldsodefs.h>
>  #include "sysdep.h"		/* Defines stack direction.  */
>  
> diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c
> index d3933bfe..43129a1e 100644
> --- a/sysdeps/mach/hurd/dl-sysdep.c
> +++ b/sysdeps/mach/hurd/dl-sysdep.c
> @@ -32,7 +32,6 @@
>  #include <sysdep.h>
>  #include <argz.h>
>  #include <mach/mig_support.h>
> -#include <mach/machine/vm_param.h>
>  #include "hurdstartup.h"
>  #include <hurd/lookup.h>
>  #include <hurd/auth.h>
> -- 
> 2.43.0
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 06/23] mach: Drop SNARF_ARGS macro
  2024-01-03 17:14 ` [PATCH 06/23] mach: Drop SNARF_ARGS macro Sergey Bugaev
@ 2024-01-03 21:00   ` Samuel Thibault
  0 siblings, 0 replies; 50+ messages in thread
From: Samuel Thibault @ 2024-01-03 21:00 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le mer. 03 janv. 2024 20:14:39 +0300, a ecrit:
> We're obtaining arguments from the stack differently, see init-first.c.
> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  sysdeps/mach/sysdep.h     |  7 -------
>  sysdeps/mach/x86/sysdep.h | 14 --------------
>  2 files changed, 21 deletions(-)
> 
> diff --git a/sysdeps/mach/sysdep.h b/sysdeps/mach/sysdep.h
> index 8eeac45b..3e0553d8 100644
> --- a/sysdeps/mach/sysdep.h
> +++ b/sysdeps/mach/sysdep.h
> @@ -56,13 +56,6 @@
>  /* This is not used on all machines.  */
>  #endif
>  
> -/* Set variables ARGC, ARGV, and ENVP for the arguments
> -   left on the stack by the microkernel.  */
> -#ifndef SNARF_ARGS
> -#define SNARF_ARGS(argc, argv, envp)
> -#error SNARF_ARGS not defined by sysdeps/mach/MACHINE/sysdep.h
> -#endif
> -
>  /* LOSE can be defined as the `halt' instruction or something
>     similar which will cause the process to die in a characteristic
>     way suggesting a bug.  */
> diff --git a/sysdeps/mach/x86/sysdep.h b/sysdeps/mach/x86/sysdep.h
> index ed9f7f46..63be5638 100644
> --- a/sysdeps/mach/x86/sysdep.h
> +++ b/sysdeps/mach/x86/sysdep.h
> @@ -25,20 +25,6 @@
>  
>  #define LOSE asm volatile ("hlt")
>  
> -#define SNARF_ARGS(entry_sp, argc, argv, envp)				      \
> -  do									      \
> -    {									      \
> -      char **p;								      \
> -      argc = (int) *entry_sp;						      \
> -      argv = (char **) (entry_sp + 1);					      \
> -      p = argv;								      \
> -      while (*p++ != NULL)						      \
> -	;								      \
> -      if (p >= (char **) argv[0])					      \
> -	--p;								      \
> -      envp = p;							      \
> -    } while (0)
> -
>  #define STACK_GROWTH_DOWN
>  
>  /* Get the machine-independent Mach definitions.  */
> -- 
> 2.43.0
> 
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 01/23] hurd: Add some missing includes
  2024-01-03 20:43   ` Samuel Thibault
@ 2024-01-03 21:08     ` Sergey Bugaev
  2024-01-03 21:24       ` Sergey Bugaev
  0 siblings, 1 reply; 50+ messages in thread
From: Sergey Bugaev @ 2024-01-03 21:08 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: libc-alpha, bug-hurd

On Wed, Jan 3, 2024 at 11:43 PM Samuel Thibault <samuel.thibault@gnu.org> wrote:
> Sergey Bugaev, le mer. 03 janv. 2024 20:14:34 +0300, a ecrit:
> > diff --git a/sysdeps/hurd/include/hurd.h b/sysdeps/hurd/include/hurd.h
> > index 568092d6..189fd44e 100644
> > --- a/sysdeps/hurd/include/hurd.h
> > +++ b/sysdeps/hurd/include/hurd.h
> > @@ -1,4 +1,5 @@
> >  #ifndef      _HURD_H
> > +#include <tls.h>
> >  #include_next <hurd.h>
> >
> >  void _hurd_libc_proc_init (char **argv);
> > diff --git a/sysdeps/hurd/include/hurd/signal.h b/sysdeps/hurd/include/hurd/signal.h
> > index 1dc8a1f3..9b1bf3df 100644
> > --- a/sysdeps/hurd/include/hurd/signal.h
> > +++ b/sysdeps/hurd/include/hurd/signal.h
> > @@ -6,6 +6,7 @@ extern struct hurd_sigstate *_hurd_self_sigstate (void) __attribute__ ((__const_
> >  libc_hidden_proto (_hurd_self_sigstate)
> >  #endif
> >
> > +#include <tls.h>
> >  #include_next <hurd/signal.h>
> >
> >  #ifndef _ISOMAC
>
> Why?

Because hurd/hurd/signal.h is using tls.h macros (THREAD_GETMEM /
THREAD_SETMEM / THREAD_SELF), guarded under "defined _LIBC", and
sysdeps/hurd/include/hurd/signal.h being the internal version of that
header seemed to be the appropriate place to add the missing #include
<tls.h>. Otherwise, I get this:

In file included from ../sysdeps/hurd/include/hurd/signal.h:9,
                 from siginfo.c:18:
../hurd/hurd/signal.h: In function ‘_hurd_self_sigstate’:
../hurd/hurd/signal.h:169:30: error: implicit declaration of function
‘THREAD_GETMEM’ [-Wimplicit-function-declaration]
  169 |   struct hurd_sigstate *ss = THREAD_GETMEM (THREAD_SELF,
_hurd_sigstate);

and so on. This must have happened to work on both x86 architectures
due to some other header implicitly pulling <tls.h> in, but we should
not rely on that.

Perhaps a better solution would be to move the inline versions of
_hurd_self_sigstate and _hurd_critical_section_lock/unlock to the
internal header. Is there any reason why they have to be in the public
one?

> These are breaking hurd/check-installed-headers-c

Indeed, thanks for pointing that out. But the error I seem to get:

:: hurd.h
::::
In file included from ../sysdeps/unix/i386/sysdep.h:18,
                 from ../sysdeps/mach/x86/sysdep.h:47,
                 from ../sysdeps/mach/hurd/tls.h:27,
                 from ../sysdeps/mach/hurd/i386/tls.h:24,
                 from ../sysdeps/hurd/include/hurd.h:2,
                 from /tmp/cih_test_z99fCI.c:10:
../sysdeps/unix/sysdep.h:111:5: error: "IS_IN" is not defined,
evaluates to 0 [-Werror=undef]
  111 | #if IS_IN (rtld)
      |     ^~~~~
../sysdeps/unix/sysdep.h:111:11: error: missing binary operator before token "("
  111 | #if IS_IN (rtld)
      |           ^
../sysdeps/mach/hurd/i386/tls.h:123:32: error: missing binary operator
before token "("
  123 | #if !defined (SHARED) || IS_IN (rtld)
      |                                ^
../sysdeps/mach/hurd/i386/tls.h: In function ‘_hurd_tls_fork’:
../sysdeps/mach/hurd/i386/tls.h:379:3: error: unknown type name ‘error_t’
  379 |   error_t err;
      |   ^~~~~~~

...makes no sense. This is testing installed headers, isn't it? — then
how come sysdeps/hurd/include/hurd.h is what gets found for <hurd.h>?
I'm rather sure the installed <hurd.h> is a different file. So it
would look like the test setup is broken, and this patch just exposes
that.

Sergey

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 01/23] hurd: Add some missing includes
  2024-01-03 21:08     ` Sergey Bugaev
@ 2024-01-03 21:24       ` Sergey Bugaev
  2024-01-03 21:35         ` Samuel Thibault
  0 siblings, 1 reply; 50+ messages in thread
From: Sergey Bugaev @ 2024-01-03 21:24 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: libc-alpha, bug-hurd

On Thu, Jan 4, 2024 at 12:08 AM Sergey Bugaev <bugaevc@gmail.com> wrote:
> This is testing installed headers, isn't it? — then
> how come sysdeps/hurd/include/hurd.h is what gets found for <hurd.h>?
> I'm rather sure the installed <hurd.h> is a different file. So it
> would look like the test setup is broken, and this patch just exposes
> that.

Should the include <tls.h> be guarded by ifndef _ISOMAC perhaps? And
if we indeed move the inline functions to the internal hurd.h, they'd
also be guarded by ifndef _ISOMAC?

But really, why doesn't the test filter out the internal include directories?

Sergey

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [PATCH 01/23] hurd: Add some missing includes
  2024-01-03 21:24       ` Sergey Bugaev
@ 2024-01-03 21:35         ` Samuel Thibault
  0 siblings, 0 replies; 50+ messages in thread
From: Samuel Thibault @ 2024-01-03 21:35 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Sergey Bugaev, le jeu. 04 janv. 2024 00:24:30 +0300, a ecrit:
> On Thu, Jan 4, 2024 at 12:08 AM Sergey Bugaev <bugaevc@gmail.com> wrote:
> > This is testing installed headers, isn't it? — then
> > how come sysdeps/hurd/include/hurd.h is what gets found for <hurd.h>?
> > I'm rather sure the installed <hurd.h> is a different file. So it
> > would look like the test setup is broken, and this patch just exposes
> > that.
> 
> Should the include <tls.h> be guarded by ifndef _ISOMAC perhaps? And
> if we indeed move the inline functions to the internal hurd.h, they'd
> also be guarded by ifndef _ISOMAC?

Yes.

> But really, why doesn't the test filter out the internal include directories?

I'll leave that to the people who would know examples of needing
internal definitions.

Samuel

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [RFC PATCH 07/23] hurd: Pass the data pointer to _hurd_stack_setup explicitly
  2024-01-03 17:14 ` [RFC PATCH 07/23] hurd: Pass the data pointer to _hurd_stack_setup explicitly Sergey Bugaev
@ 2024-01-04 22:47   ` Samuel Thibault
  0 siblings, 0 replies; 50+ messages in thread
From: Samuel Thibault @ 2024-01-04 22:47 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le mer. 03 janv. 2024 20:14:40 +0300, a ecrit:
> Instead of relying on the stack frame layout to figure out where the stack
> pointer was prior to the _hurd_stack_setup () call, just pass the pointer
> as an argument explicitly. This is less brittle and much more portable.
> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  sysdeps/mach/hurd/i386/static-start.S   |  3 +++
>  sysdeps/mach/hurd/x86/init-first.c      | 16 +++++++---------
>  sysdeps/mach/hurd/x86_64/static-start.S |  1 +
>  3 files changed, 11 insertions(+), 9 deletions(-)
> 
> diff --git a/sysdeps/mach/hurd/i386/static-start.S b/sysdeps/mach/hurd/i386/static-start.S
> index d83505b2..3ffcb47d 100644
> --- a/sysdeps/mach/hurd/i386/static-start.S
> +++ b/sysdeps/mach/hurd/i386/static-start.S
> @@ -19,7 +19,10 @@
>  	.text
>  	.globl _start
>  _start:
> +	pushl %esp
>  	call _hurd_stack_setup
> +	/* No need to "addl %4, %esp", since _hurd_stack_setup
> +	 * returns with an already adjusted stack pointer.  */
>  	xorl %edx, %edx
>  	jmp _start1
>  
> diff --git a/sysdeps/mach/hurd/x86/init-first.c b/sysdeps/mach/hurd/x86/init-first.c
> index bb051418..6f71d71b 100644
> --- a/sysdeps/mach/hurd/x86/init-first.c
> +++ b/sysdeps/mach/hurd/x86/init-first.c
> @@ -197,7 +197,7 @@ strong_alias (posixland_init, __libc_init_first);
>     which should not exist at all.  */
>  void
>  inhibit_stack_protector
> -_hurd_stack_setup (void)
> +_hurd_stack_setup (void **argptr)
>  {
>    /* This is the very first C code that runs in a statically linked
>       executable -- calling this function is the first thing that _start in
> @@ -206,14 +206,12 @@ _hurd_stack_setup (void)
>  
>       _start1 expects the arguments, environment, and a Hurd data block to be
>       located at the top of the stack.  The data may already be located there,
> -     or we may need to receive it from the exec server.  */
> -  void *caller = __builtin_extract_return_addr (__builtin_return_address (0));
> -  /* If the arguments and environment are already located on the stack, this is
> -     where they are, just above our call frame.  Note that this may not be a
> -     valid pointer in case we're supposed to receive the arguments from the exec
> -     server, so we can not dereference it yet.  */
> -  void **p = (void **) __builtin_frame_address (0) + 2;
> +     or we may need to receive it from the exec server.  If the data is located
> +     on the stack (just above our call frame), argptr points to it.  Note that
> +     this may not be a valid pointer in case we're supposed to receive the
> +     arguments from the exec server, so we can not dereference it yet.  */
>  
> +  void *caller = __builtin_extract_return_addr (__builtin_return_address (0));
>    /* Init the essential things.  */
>    first_init ();
>  
> @@ -245,7 +243,7 @@ _hurd_stack_setup (void)
>       the stack pointer to the data (which is somewhere on the current stack
>       anyway).  This way, _start1 find the data on the top of the stack, just as
>       it expects to.  */
> -  _hurd_startup (p, &doinit);
> +  _hurd_startup (argptr, &doinit);
>    __builtin_unreachable ();
>  }
>  #endif
> diff --git a/sysdeps/mach/hurd/x86_64/static-start.S b/sysdeps/mach/hurd/x86_64/static-start.S
> index 9b9db937..0ec00905 100644
> --- a/sysdeps/mach/hurd/x86_64/static-start.S
> +++ b/sysdeps/mach/hurd/x86_64/static-start.S
> @@ -25,6 +25,7 @@ _start:
>  	leaq __strlen_sse2(%rip), %rax
>  	movq %rax, strlen@GOTPCREL(%rip)
>  
> +	movq %rsp, %rdi
>  	call _hurd_stack_setup
>  	xorq %rdx, %rdx
>  	jmp _start1
> -- 
> 2.43.0
> 
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [RFC PATCH 08/23] hurd: Drop x86-specific assembly from init-first.c
  2024-01-03 17:14 ` [RFC PATCH 08/23] hurd: Drop x86-specific assembly from init-first.c Sergey Bugaev
@ 2024-01-04 22:48   ` Samuel Thibault
  0 siblings, 0 replies; 50+ messages in thread
From: Samuel Thibault @ 2024-01-04 22:48 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le mer. 03 janv. 2024 20:14:41 +0300, a ecrit:
> We already have the RETURN_TO macro for this exact use case, and it's already
> used in the non-static code path. Use it here too.
> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
> 
> This was the last piece of x86 specifics in init-first.c!
> (Remember, it started as sysdeps/mach/hurd/i386/init-first.c, with lots of
> i386-specific assumptions about how arguments are passed and so on.)
> 
>  sysdeps/mach/hurd/x86/init-first.c | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/sysdeps/mach/hurd/x86/init-first.c b/sysdeps/mach/hurd/x86/init-first.c
> index 6f71d71b..211b2096 100644
> --- a/sysdeps/mach/hurd/x86/init-first.c
> +++ b/sysdeps/mach/hurd/x86/init-first.c
> @@ -218,15 +218,7 @@ _hurd_stack_setup (void **argptr)
>    void doinit (intptr_t *data)
>      {
>        init ((void **) data);
> -# ifdef __x86_64__
> -      asm volatile ("movq %0, %%rsp\n" /* Switch to new outermost stack.  */
> -                    "xorq %%rbp, %%rbp\n" /* Clear outermost frame pointer.  */
> -                    "jmp *%1" : : "r" (data), "r" (caller));
> -# else
> -      asm volatile ("movl %0, %%esp\n" /* Switch to new outermost stack.  */
> -		    "xorl %%ebp, %%ebp\n" /* Clear outermost frame pointer.  */
> -		    "jmp *%1" : : "r" (data), "r" (caller));
> -# endif
> +      RETURN_TO (data, caller, 0);
>        __builtin_unreachable ();
>      }
>  
> -- 
> 2.43.0
> 
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [RFC PATCH 09/23] hurd: Make init-first.c no longer x86-specific
  2024-01-03 17:14 ` [RFC PATCH 09/23] hurd: Make init-first.c no longer x86-specific Sergey Bugaev
@ 2024-01-04 22:48   ` Samuel Thibault
  0 siblings, 0 replies; 50+ messages in thread
From: Samuel Thibault @ 2024-01-04 22:48 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le mer. 03 janv. 2024 20:14:42 +0300, a ecrit:
> This will make it usable in other ports.
> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  sysdeps/mach/hurd/{x86 => }/init-first.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>  rename sysdeps/mach/hurd/{x86 => }/init-first.c (98%)
> 
> diff --git a/sysdeps/mach/hurd/x86/init-first.c b/sysdeps/mach/hurd/init-first.c
> similarity index 98%
> rename from sysdeps/mach/hurd/x86/init-first.c
> rename to sysdeps/mach/hurd/init-first.c
> index 211b2096..85261916 100644
> --- a/sysdeps/mach/hurd/x86/init-first.c
> +++ b/sysdeps/mach/hurd/init-first.c
> @@ -1,4 +1,4 @@
> -/* Initialization code run first thing by the ELF startup code.  For x86/Hurd.
> +/* Initialization code run first thing by the ELF startup code.  For Hurd.
>     Copyright (C) 1995-2024 Free Software Foundation, Inc.
>     This file is part of the GNU C Library.
>  
> @@ -155,7 +155,7 @@ first_init (void)
>  
>  #ifndef SHARED
>    /* In the static case, we need to set up TLS early so that the stack
> -     protection guard can be read at gs:0x14 by the gcc-generated snippets.  */
> +     protection guard can be read at from TLS by the GCC-generated snippets.  */
>    _hurd_tls_init (&__init1_tcbhead, 0);
>  #endif
>  
> -- 
> 2.43.0
> 
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [RFC PATCH 10/23] hurd: Only init early static TLS if it's used to store stack or pointer guards
  2024-01-03 17:14 ` [RFC PATCH 10/23] hurd: Only init early static TLS if it's used to store stack or pointer guards Sergey Bugaev
@ 2024-01-04 22:48   ` Samuel Thibault
  0 siblings, 0 replies; 50+ messages in thread
From: Samuel Thibault @ 2024-01-04 22:48 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le mer. 03 janv. 2024 20:14:43 +0300, a ecrit:
> This is the case on both x86 architectures, but not on AArch64.
> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  sysdeps/mach/hurd/init-first.c | 15 +++++++++++----
>  1 file changed, 11 insertions(+), 4 deletions(-)
> 
> diff --git a/sysdeps/mach/hurd/init-first.c b/sysdeps/mach/hurd/init-first.c
> index 85261916..26ccd37e 100644
> --- a/sysdeps/mach/hurd/init-first.c
> +++ b/sysdeps/mach/hurd/init-first.c
> @@ -38,7 +38,16 @@ extern int __libc_argc attribute_hidden;
>  extern char **__libc_argv attribute_hidden;
>  extern char **_dl_argv;
>  
> -#ifndef SHARED
> +#if !defined (SHARED) && (defined (THREAD_SET_STACK_GUARD) || defined (THREAD_SET_POINTER_GUARD))
> +/* In the static case, we need to set up TLS early so that the stack
> +   protection guard can be read at from TLS by the GCC-generated snippets,
> +   on architectures that store the guard in TLS and not globally.  */
> +# define USE_INIT1_TCBHEAD 1
> +#else
> +# define USE_INIT1_TCBHEAD 0
> +#endif
> +
> +#if USE_INIT1_TCBHEAD
>  static tcbhead_t __init1_tcbhead;
>  #endif
>  
> @@ -153,9 +162,7 @@ first_init (void)
>    /* Initialize data structures so we can do RPCs.  */
>    __mach_init ();
>  
> -#ifndef SHARED
> -  /* In the static case, we need to set up TLS early so that the stack
> -     protection guard can be read at from TLS by the GCC-generated snippets.  */
> +#if USE_INIT1_TCBHEAD
>    _hurd_tls_init (&__init1_tcbhead, 0);
>  #endif
>  
> -- 
> 2.43.0
> 
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [RFC PATCH 11/23] hurd: Initializy _dl_pagesize early in static builds
  2024-01-03 17:14 ` [RFC PATCH 11/23] hurd: Initializy _dl_pagesize early in static builds Sergey Bugaev
@ 2024-01-04 22:48   ` Samuel Thibault
  0 siblings, 0 replies; 50+ messages in thread
From: Samuel Thibault @ 2024-01-04 22:48 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le mer. 03 janv. 2024 20:14:44 +0300, a ecrit:
> We fetch __vm_page_size as the very first RPC that we do, inside
> __mach_init (). Propagate that to _dl_pagesize ASAP after that,
> before any other initialization.
> 
> In dynamic builds, this is already done immediately after
> __mach_init (), inside _dl_sysdep_start ().
> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  sysdeps/mach/hurd/init-first.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/sysdeps/mach/hurd/init-first.c b/sysdeps/mach/hurd/init-first.c
> index 26ccd37e..22c35747 100644
> --- a/sysdeps/mach/hurd/init-first.c
> +++ b/sysdeps/mach/hurd/init-first.c
> @@ -162,6 +162,10 @@ first_init (void)
>    /* Initialize data structures so we can do RPCs.  */
>    __mach_init ();
>  
> +#ifndef SHARED
> +  GLRO(dl_pagesize) = __vm_page_size;
> +#endif
> +
>  #if USE_INIT1_TCBHEAD
>    _hurd_tls_init (&__init1_tcbhead, 0);
>  #endif
> -- 
> 2.43.0
> 
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [RFC PATCH 12/23] aarch64: Make cpu-features definitions not Linux-specific
  2024-01-03 17:14 ` [RFC PATCH 12/23] aarch64: Make cpu-features definitions not Linux-specific Sergey Bugaev
@ 2024-01-04 22:48   ` Samuel Thibault
  0 siblings, 0 replies; 50+ messages in thread
From: Samuel Thibault @ 2024-01-04 22:48 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

Applied, thanks!

Sergey Bugaev, le mer. 03 janv. 2024 20:14:45 +0300, a ecrit:
> These describe generic AArch64 CPU features, and are not tied to a
> kernel-specific way of determining them. We can share them between
> the Linux and Hurd AArch64 ports.
> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  sysdeps/{unix/sysv/linux => }/aarch64/cpu-features.h | 0
>  sysdeps/{unix/sysv/linux => }/aarch64/libc-start.c   | 0
>  2 files changed, 0 insertions(+), 0 deletions(-)
>  rename sysdeps/{unix/sysv/linux => }/aarch64/cpu-features.h (100%)
>  rename sysdeps/{unix/sysv/linux => }/aarch64/libc-start.c (100%)
> 
> diff --git a/sysdeps/unix/sysv/linux/aarch64/cpu-features.h b/sysdeps/aarch64/cpu-features.h
> similarity index 100%
> rename from sysdeps/unix/sysv/linux/aarch64/cpu-features.h
> rename to sysdeps/aarch64/cpu-features.h
> diff --git a/sysdeps/unix/sysv/linux/aarch64/libc-start.c b/sysdeps/aarch64/libc-start.c
> similarity index 100%
> rename from sysdeps/unix/sysv/linux/aarch64/libc-start.c
> rename to sysdeps/aarch64/libc-start.c
> -- 
> 2.43.0
> 
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [RFC PATCH 00/23] aarch64-gnu port
  2024-01-03 17:14 [RFC PATCH 00/23] aarch64-gnu port Sergey Bugaev
                   ` (23 preceding siblings ...)
  2024-01-03 17:30 ` [RFC PATCH 00/23] aarch64-gnu port Joseph Myers
@ 2024-03-11 13:47 ` H.J. Lu
  2024-03-11 15:38   ` Sergey Bugaev
  2024-03-11 14:14 ` Maxim Kuvyrkov
  25 siblings, 1 reply; 50+ messages in thread
From: H.J. Lu @ 2024-03-11 13:47 UTC (permalink / raw)
  To: Sergey Bugaev
  Cc: libc-alpha, bug-hurd, Adhemerval Zanella Netto, Helmut Grohne

On Wed, Jan 3, 2024 at 9:15 AM Sergey Bugaev <bugaevc@gmail.com> wrote:
>
> Hello!
>
> This is my work on the aarch64-gnu port, aka GNU/Hurd on 64-bit ARM.
>
> To build this, you need an aarch64-gnu toolchain (binutils, GCC, MIG),
> and GNU Mach headers for AArch64. I have posted the patches for
> binutils, GCC, and GNU Mach to the bug-hurd mailing list; no patches
> are required to build aarch64-gnu-mig.
>
> glibc fully builds and produces all the exepected libraries (including
> libmvec) and binaries. It can then be used to build other programs, in
> particular many core Hurd servers seem to build just fine.
>
> There is no AArch64 port of GNU Mach yet; I'm trying to get the ball
> rolling by making this port of glibc. I have only added some AArch64
> headers to GNU Mach, but no actual runnable code. My versions of
> <mach/aarch64/exception.h>, <mach/aarch64/thread_status.h> (and others)
> are by no means final, they are more of preliminary sketches of the API
> so I have something to port glibc against. If there are changes
> resulting from discussions and (hopefully) an eventual Mach AArch64
> port, we'll need to make corresponding changes to glibc.
>
> There not being a Mach build means that it's not currently possible to
> run or test any of this port on a real Mach. It is possible to run
> simple statically linked executables on Linux (or, I guess, other
> kernels which use ELF and similar enough ABI wrt how the arguments are
> placed on the stack) as long as you emulate the syscalls and RPCs in
> some way. I have done that, and verified that simple statically linked
> executables in the bootstrap configuration (i.e. without a Hurd exec
> server, with arguments already placed on the stack by Mach) start up
> fine.
>
> I have also done a quick i686-gnu build (to see if static-start.S or
> init-first.c changes have broken something), and a statically linked
> hello world seems to still work as expected.
>
> As usual, the disclaimer about me not knowing what I'm doing: I don't!
> I especially am not at all familiar with AArch64, even less so than with
> x86_64. I could have done something incredibly stupid; please do review!
>
> That being said, these changes seem smaller and a lot less radical than
> the x86_64 port patchset; they're mostly adding things rather than
> reworking them, so there is less of a chance to break the x86 targets.
> Evidently, we've done enough rewrokings and portability fixes (notably,
> various 64-bit fixes) during the x86_64 port to make it easier to add
> new ports. This port itself continues this trend somewhat too, with
> init-first.c now finally becoming only sysdeps/mach/hurd -specific, and
> HTL gaining support for TLS_DTV_AT_TP.
>
> As I said in the previous letter on bug-hurd, the hardware hardening
> features (BTI, MTE, PAC) are currently "not really supported", but I do
> want to support them in the future. I'm extremely interested in getting
> feedback or suggestions about these. For example: what should our API
> for controlling PAC keys look like, should we just allow userland to
> read and write all the keys? Are there, for example, any gotchas with
> BTI that we need to be aware of? Is it possible to start using PAC after
> initial start-up (once /dev/random becomes available, so PAC keys can be
> initialized) — how would we do that without crashing on e.g. ret
> pointers that have not been encrypted?
>
> Finally, a couple of words about the page size. My plan is for userland
> to not assume any static value of page size, and always query it
> dynamically, unlike on x86, even though GNU Mach will likely be compiled
> with some fixed value of page size; my understanding is this is also how
> things are done on GNU/Linux. To that end, I've tried to reduce the
> reliance on <mach/vm_param.h> and on EXEC_PAGESIZE being defined.
> Currently, Mach headers still define *something* named PAGE_SIZE
> unconditionally, causing __mach_init () to pick it up and use it instead
> of querying the page size dynamically. We should make sure this does not
> happen (i.e. <mach/vm_param.h> should not define PAGE_SIZE on AArch64),
> this is just something I haven't figured out a nice way to fix yet.
>
> Sergey
>
> P.S. I have not forgotten about my other unmerged patch series! (Most
> importantly, O_IGNORE_CTTY everywhere and the fcntl fortification.) I
> hope to find some time to hack on them, hopefully some time soon.
>
> Sergey Bugaev (23):
>   hurd: Add some missing includes
>   hurd: Declare _hurd_intr_rpc_msg* with protected visibility
>   Allow glibc to be compiled without EXEC_PAGESIZE
>   mach: Drop some unnecessary vm_param.h includes
>   hurd: Disable Prefer_MAP_32BIT_EXEC on non-x86_64 for now
>   mach: Drop SNARF_ARGS macro
>   hurd: Pass the data pointer to _hurd_stack_setup explicitly
>   hurd: Drop x86-specific assembly from init-first.c
>   hurd: Make init-first.c no longer x86-specific
>   hurd: Only init early static TLS if it's used to store stack or
>     pointer guards
>   hurd: Initializy _dl_pagesize early in static builds
>   aarch64: Make cpu-features definitions not Linux-specific
>   aarch64: Add dl-procinfo
>   aarch64: Allow building without kernel support for BTI
>   mach: Add a basic AArch64 port
>   hurd: Add a basic AArch64 port
>   hurd: Implement TLS on AArch64
>   hurd: Implement longjmp for AArch64
>   Add FPE_FLTIDO
>   hurd: Add an AArch64 signal implementation
>   htl: Implement some support for TLS_DTV_AT_TP
>   htl: Add an AArch64 implementation
>   hurd: Add expected aarch64-gnu abistlists
>
>  bits/siginfo-consts.h                         |    4 +-
>  elf/dl-support.c                              |    6 +-
>  elf/rtld.c                                    |    2 +
>  htl/pt-create.c                               |    2 +
>  hurd/hurdsig.c                                |    8 +-
>  libio/libioP.h                                |    2 +-
>  mach/Makefile                                 |    1 +
>  mach/lowlevellock.h                           |    1 +
>  mach/setup-thread.c                           |    1 -
>  .../sysv/linux => }/aarch64/cpu-features.h    |    0
>  sysdeps/aarch64/dl-bti.c                      |   10 +
>  sysdeps/aarch64/dl-procinfo.c                 |   59 +
>  sysdeps/aarch64/dl-procinfo.h                 |   38 +
>  sysdeps/aarch64/htl/Makefile                  |   20 +
>  sysdeps/aarch64/htl/bits/pthreadtypes-arch.h  |   36 +
>  sysdeps/aarch64/htl/machine-sp.h              |   29 +
>  sysdeps/aarch64/htl/pt-machdep.h              |   28 +
>  sysdeps/aarch64/htl/tcb-offsets.sym           |    5 +
>  .../sysv/linux => }/aarch64/libc-start.c      |    0
>  sysdeps/htl/dl-thread_gscope_wait.c           |   16 +-
>  sysdeps/hurd/include/hurd.h                   |    1 +
>  sysdeps/hurd/include/hurd/signal.h            |    1 +
>  sysdeps/mach/aarch64/bits/mach/param.h        |   24 +
>  sysdeps/mach/aarch64/cpu-features.c           |  109 +
>  sysdeps/mach/aarch64/sys/ucontext.h           |   73 +
>  sysdeps/mach/aarch64/sysdep.h                 |   45 +
>  sysdeps/mach/aarch64/thread_state.h           |   44 +
>  sysdeps/mach/configure                        |    1 +
>  sysdeps/mach/configure.ac                     |    1 +
>  sysdeps/mach/hurd/aarch64/Implies             |    3 +
>  sysdeps/mach/hurd/aarch64/Makefile            |   24 +
>  sysdeps/mach/hurd/aarch64/____longjmp_chk.S   |  173 ++
>  sysdeps/mach/hurd/aarch64/__longjmp.S         |  150 ++
>  sysdeps/mach/hurd/aarch64/bits/sigcontext.h   |   96 +
>  .../mach/hurd/aarch64/dl-tls-initialized.c    |   19 +
>  sysdeps/mach/hurd/aarch64/exc2signal.c        |  119 +
>  sysdeps/mach/hurd/aarch64/htl/pt-machdep.c    |   55 +
>  sysdeps/mach/hurd/aarch64/htl/pt-setup.c      |   80 +
>  sysdeps/mach/hurd/aarch64/intr-msg.h          |  123 +
>  sysdeps/mach/hurd/aarch64/ld.abilist          |   18 +
>  .../mach/hurd/aarch64/libBrokenLocale.abilist |    1 +
>  sysdeps/mach/hurd/aarch64/libanl.abilist      |    4 +
>  sysdeps/mach/hurd/aarch64/libc.abilist        | 2123 +++++++++++++++++
>  .../hurd/aarch64/libc_malloc_debug.abilist    |   26 +
>  sysdeps/mach/hurd/aarch64/libdl.abilist       |    0
>  sysdeps/mach/hurd/aarch64/libm.abilist        | 1030 ++++++++
>  sysdeps/mach/hurd/aarch64/libmvec.abilist     |   75 +
>  sysdeps/mach/hurd/aarch64/libpthread.abilist  |  165 ++
>  sysdeps/mach/hurd/aarch64/libresolv.abilist   |   55 +
>  sysdeps/mach/hurd/aarch64/librt.abilist       |   33 +
>  sysdeps/mach/hurd/aarch64/longjmp-ts.c        |   50 +
>  sysdeps/mach/hurd/aarch64/shlib-versions      |    2 +
>  sysdeps/mach/hurd/aarch64/signal-defines.sym  |   10 +
>  sysdeps/mach/hurd/aarch64/static-start.S      |   52 +
>  sysdeps/mach/hurd/aarch64/tls.h               |  206 ++
>  sysdeps/mach/hurd/aarch64/trampoline.c        |  327 +++
>  sysdeps/mach/hurd/aarch64/vm_param.h          |   24 +
>  sysdeps/mach/hurd/dl-sysdep.c                 |    3 +-
>  sysdeps/mach/hurd/htl/pt-sysdep.c             |    9 +
>  sysdeps/mach/hurd/i386/static-start.S         |    3 +
>  sysdeps/mach/hurd/{x86 => }/init-first.c      |   45 +-
>  sysdeps/mach/hurd/mig-reply.c                 |    1 +
>  sysdeps/mach/hurd/mmap.c                      |    2 +-
>  sysdeps/mach/hurd/x86_64/static-start.S       |    1 +
>  sysdeps/mach/sysdep.h                         |    7 -
>  sysdeps/mach/x86/sysdep.h                     |   14 -
>  66 files changed, 5639 insertions(+), 56 deletions(-)
>  rename sysdeps/{unix/sysv/linux => }/aarch64/cpu-features.h (100%)
>  create mode 100644 sysdeps/aarch64/dl-procinfo.c
>  create mode 100644 sysdeps/aarch64/dl-procinfo.h
>  create mode 100644 sysdeps/aarch64/htl/Makefile
>  create mode 100644 sysdeps/aarch64/htl/bits/pthreadtypes-arch.h
>  create mode 100644 sysdeps/aarch64/htl/machine-sp.h
>  create mode 100644 sysdeps/aarch64/htl/pt-machdep.h
>  create mode 100644 sysdeps/aarch64/htl/tcb-offsets.sym
>  rename sysdeps/{unix/sysv/linux => }/aarch64/libc-start.c (100%)
>  create mode 100644 sysdeps/mach/aarch64/bits/mach/param.h
>  create mode 100644 sysdeps/mach/aarch64/cpu-features.c
>  create mode 100644 sysdeps/mach/aarch64/sys/ucontext.h
>  create mode 100644 sysdeps/mach/aarch64/sysdep.h
>  create mode 100644 sysdeps/mach/aarch64/thread_state.h
>  create mode 100644 sysdeps/mach/hurd/aarch64/Implies
>  create mode 100644 sysdeps/mach/hurd/aarch64/Makefile
>  create mode 100644 sysdeps/mach/hurd/aarch64/____longjmp_chk.S
>  create mode 100644 sysdeps/mach/hurd/aarch64/__longjmp.S
>  create mode 100644 sysdeps/mach/hurd/aarch64/bits/sigcontext.h
>  create mode 100644 sysdeps/mach/hurd/aarch64/dl-tls-initialized.c
>  create mode 100644 sysdeps/mach/hurd/aarch64/exc2signal.c
>  create mode 100644 sysdeps/mach/hurd/aarch64/htl/pt-machdep.c
>  create mode 100644 sysdeps/mach/hurd/aarch64/htl/pt-setup.c
>  create mode 100644 sysdeps/mach/hurd/aarch64/intr-msg.h
>  create mode 100644 sysdeps/mach/hurd/aarch64/ld.abilist
>  create mode 100644 sysdeps/mach/hurd/aarch64/libBrokenLocale.abilist
>  create mode 100644 sysdeps/mach/hurd/aarch64/libanl.abilist
>  create mode 100644 sysdeps/mach/hurd/aarch64/libc.abilist
>  create mode 100644 sysdeps/mach/hurd/aarch64/libc_malloc_debug.abilist
>  create mode 100644 sysdeps/mach/hurd/aarch64/libdl.abilist
>  create mode 100644 sysdeps/mach/hurd/aarch64/libm.abilist
>  create mode 100644 sysdeps/mach/hurd/aarch64/libmvec.abilist
>  create mode 100644 sysdeps/mach/hurd/aarch64/libpthread.abilist
>  create mode 100644 sysdeps/mach/hurd/aarch64/libresolv.abilist
>  create mode 100644 sysdeps/mach/hurd/aarch64/librt.abilist
>  create mode 100644 sysdeps/mach/hurd/aarch64/longjmp-ts.c
>  create mode 100644 sysdeps/mach/hurd/aarch64/shlib-versions
>  create mode 100644 sysdeps/mach/hurd/aarch64/signal-defines.sym
>  create mode 100644 sysdeps/mach/hurd/aarch64/static-start.S
>  create mode 100644 sysdeps/mach/hurd/aarch64/tls.h
>  create mode 100644 sysdeps/mach/hurd/aarch64/trampoline.c
>  create mode 100644 sysdeps/mach/hurd/aarch64/vm_param.h
>  rename sysdeps/mach/hurd/{x86 => }/init-first.c (87%)
>
>

I think hurd maintainers can approve and check in all hurd specific
changes now even if they won't build.   The generic changes should
be looked at more closely so that they have no impacts on any
future Linux changes and future Linux changes won't be blocked
because of hurd.

-- 
H.J.

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [RFC PATCH 00/23] aarch64-gnu port
  2024-01-03 17:14 [RFC PATCH 00/23] aarch64-gnu port Sergey Bugaev
                   ` (24 preceding siblings ...)
  2024-03-11 13:47 ` H.J. Lu
@ 2024-03-11 14:14 ` Maxim Kuvyrkov
  25 siblings, 0 replies; 50+ messages in thread
From: Maxim Kuvyrkov @ 2024-03-11 14:14 UTC (permalink / raw)
  To: Sergey Bugaev
  Cc: libc-alpha, bug-hurd, Adhemerval Zanella Netto, Helmut Grohne

> On Jan 3, 2024, at 21:14, Sergey Bugaev <bugaevc@gmail.com> wrote:
> 
> Hello!
> 
> This is my work on the aarch64-gnu port, aka GNU/Hurd on 64-bit ARM.
> 
> To build this, you need an aarch64-gnu toolchain (binutils, GCC, MIG),
> and GNU Mach headers for AArch64. I have posted the patches for
> binutils, GCC, and GNU Mach to the bug-hurd mailing list; no patches
> are required to build aarch64-gnu-mig.
> 
> glibc fully builds and produces all the exepected libraries (including
> libmvec) and binaries. It can then be used to build other programs, in
> particular many core Hurd servers seem to build just fine.
> 
> There is no AArch64 port of GNU Mach yet; I'm trying to get the ball
> rolling by making this port of glibc. I have only added some AArch64
> headers to GNU Mach, but no actual runnable code. My versions of
> <mach/aarch64/exception.h>, <mach/aarch64/thread_status.h> (and others)
> are by no means final, they are more of preliminary sketches of the API
> so I have something to port glibc against. If there are changes
> resulting from discussions and (hopefully) an eventual Mach AArch64
> port, we'll need to make corresponding changes to glibc.
> 
> There not being a Mach build means that it's not currently possible to
> run or test any of this port on a real Mach. It is possible to run
> simple statically linked executables on Linux (or, I guess, other
> kernels which use ELF and similar enough ABI wrt how the arguments are
> placed on the stack) as long as you emulate the syscalls and RPCs in
> some way. I have done that, and verified that simple statically linked
> executables in the bootstrap configuration (i.e. without a Hurd exec
> server, with arguments already placed on the stack by Mach) start up
> fine.
> 
> I have also done a quick i686-gnu build (to see if static-start.S or
> init-first.c changes have broken something), and a statically linked
> hello world seems to still work as expected.
> 
> As usual, the disclaimer about me not knowing what I'm doing: I don't!
> I especially am not at all familiar with AArch64, even less so than with
> x86_64. I could have done something incredibly stupid; please do review!
> 
> That being said, these changes seem smaller and a lot less radical than
> the x86_64 port patchset; they're mostly adding things rather than
> reworking them, so there is less of a chance to break the x86 targets.
> Evidently, we've done enough rewrokings and portability fixes (notably,
> various 64-bit fixes) during the x86_64 port to make it easier to add
> new ports. This port itself continues this trend somewhat too, with
> init-first.c now finally becoming only sysdeps/mach/hurd -specific, and
> HTL gaining support for TLS_DTV_AT_TP.
> 
> As I said in the previous letter on bug-hurd, the hardware hardening
> features (BTI, MTE, PAC) are currently "not really supported", but I do
> want to support them in the future. I'm extremely interested in getting
> feedback or suggestions about these. For example: what should our API
> for controlling PAC keys look like, should we just allow userland to
> read and write all the keys? Are there, for example, any gotchas with
> BTI that we need to be aware of? Is it possible to start using PAC after
> initial start-up (once /dev/random becomes available, so PAC keys can be
> initialized) — how would we do that without crashing on e.g. ret
> pointers that have not been encrypted?
> 
> Finally, a couple of words about the page size. My plan is for userland
> to not assume any static value of page size, and always query it
> dynamically, unlike on x86, even though GNU Mach will likely be compiled
> with some fixed value of page size; my understanding is this is also how
> things are done on GNU/Linux. To that end, I've tried to reduce the
> reliance on <mach/vm_param.h> and on EXEC_PAGESIZE being defined.
> Currently, Mach headers still define *something* named PAGE_SIZE
> unconditionally, causing __mach_init () to pick it up and use it instead
> of querying the page size dynamically. We should make sure this does not
> happen (i.e. <mach/vm_param.h> should not define PAGE_SIZE on AArch64),
> this is just something I haven't figured out a nice way to fix yet.
> 
> Sergey
> 
> P.S. I have not forgotten about my other unmerged patch series! (Most
> importantly, O_IGNORE_CTTY everywhere and the fcntl fortification.) I
> hope to find some time to hack on them, hopefully some time soon.
> 
> Sergey Bugaev (23):
>  hurd: Add some missing includes
>  hurd: Declare _hurd_intr_rpc_msg* with protected visibility
>  Allow glibc to be compiled without EXEC_PAGESIZE
>  mach: Drop some unnecessary vm_param.h includes
>  hurd: Disable Prefer_MAP_32BIT_EXEC on non-x86_64 for now
>  mach: Drop SNARF_ARGS macro
>  hurd: Pass the data pointer to _hurd_stack_setup explicitly
>  hurd: Drop x86-specific assembly from init-first.c
>  hurd: Make init-first.c no longer x86-specific
>  hurd: Only init early static TLS if it's used to store stack or
>    pointer guards
>  hurd: Initializy _dl_pagesize early in static builds
>  aarch64: Make cpu-features definitions not Linux-specific
>  aarch64: Add dl-procinfo
>  aarch64: Allow building without kernel support for BTI
>  mach: Add a basic AArch64 port
>  hurd: Add a basic AArch64 port
>  hurd: Implement TLS on AArch64
>  hurd: Implement longjmp for AArch64
>  Add FPE_FLTIDO
>  hurd: Add an AArch64 signal implementation
>  htl: Implement some support for TLS_DTV_AT_TP
>  htl: Add an AArch64 implementation
>  hurd: Add expected aarch64-gnu abistlists

Hi Sergey,

Would you please update and re-post your patch series, so that reviewers can check that it doesn't break existing targets?  We (Linaro) had our pre-commit CI down in late December / early January, so most of your patches weren't tested, see [1].

[1] https://patchwork.sourceware.org/project/glibc/list/?series=29086

Thank you,

--
Maxim Kuvyrkov
https://www.linaro.org



^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [RFC PATCH 00/23] aarch64-gnu port
  2024-03-11 13:47 ` H.J. Lu
@ 2024-03-11 15:38   ` Sergey Bugaev
  0 siblings, 0 replies; 50+ messages in thread
From: Sergey Bugaev @ 2024-03-11 15:38 UTC (permalink / raw)
  To: H.J. Lu, Maxim Kuvyrkov; +Cc: libc-alpha, bug-hurd

On Mon, Mar 11, 2024 at 4:48 PM H.J. Lu <hjl.tools@gmail.com> wrote:
> I think hurd maintainers can approve and check in all hurd specific
> changes now even if they won't build.   The generic changes should
> be looked at more closely so that they have no impacts on any
> future Linux changes and future Linux changes won't be blocked
> because of hurd.

On Mon, Mar 11, 2024 at 5:15 PM Maxim Kuvyrkov
<maxim.kuvyrkov@linaro.org> wrote:
> Hi Sergey,
>
> Would you please update and re-post your patch series, so that reviewers can check that it doesn't break existing targets?

Hi Maxim, H.J.,

"Even if they won't build" won't stay that way for long: since the
time I posted this glibc patchset, I've been working on porting GNU
Mach to AArch64, and while that work is not yet upstream, my branch of
gnumach compiles, boots in QEMU, and passes the testsuite! (And I am
*so* excited about this!) Moreover, the simple glibc-based program
that I've used for testing in GDB (as mentioned in the cover letter)
starts up and reaches main() too! I have not rebuilt it since then,
meaning that ABI indeed matches between the kernel and this glibc
patchset.

So yes, it might be the time for me to rebase & update this patchset,
and post it again. I'll start working on that then.

By the way, while I have a somewhat better understanding of AArch64 &
ARM-based systems now, I'd still appreciate any reviews / insights /
pointers.

Sergey

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [RFC PATCH 00/23] aarch64-gnu port
  2024-01-03 17:30 ` [RFC PATCH 00/23] aarch64-gnu port Joseph Myers
  2024-01-03 17:57   ` Sergey Bugaev
@ 2024-03-11 16:10   ` Florian Weimer
  1 sibling, 0 replies; 50+ messages in thread
From: Florian Weimer @ 2024-03-11 16:10 UTC (permalink / raw)
  To: Joseph Myers
  Cc: Sergey Bugaev, libc-alpha, bug-hurd, Adhemerval Zanella Netto,
	Helmut Grohne

* Joseph Myers:

> On Wed, 3 Jan 2024, Sergey Bugaev wrote:
>
>> To build this, you need an aarch64-gnu toolchain (binutils, GCC, MIG),
>> and GNU Mach headers for AArch64. I have posted the patches for
>> binutils, GCC, and GNU Mach to the bug-hurd mailing list; no patches
>> are required to build aarch64-gnu-mig.
>
>> There is no AArch64 port of GNU Mach yet; I'm trying to get the ball
>> rolling by making this port of glibc. I have only added some AArch64
>
> I think the same principle applies for ports to new (architecture, Hurd) 
> pairs as for new (architecture, Linux) pairs: the relevant code needs to 
> be in upstream mainline of all components on which glibc build-depends 
> before the port can go into glibc (and thus before the symbol versions for 
> the port can be determined) - and at the point where it's ready to go in, 
> a corresponding build-many-glibcs.py entry should be added as part of the 
> patch series.  Parts of <https://sourceware.org/glibc/wiki/NewPorts> may 
> be applicable, though that's more oriented to the case where the 
> architecture support itself is entirely new.
>
> You can of course do refactors of existing files not specific to 
> aarch64-gnu, in preparation for the port, before then, to reduce the size 
> of the eventual patch series proposing adding the port to glibc.

I would like to stress what Joseph says here.  You don't need to
demonstrate actual usage or something like that, just follow the new
port process (upstreamed changes in the glibc build dependencies etc.).

Thanks,
Florian


^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [RFC PATCH 03/23] Allow glibc to be compiled without EXEC_PAGESIZE
  2024-01-03 17:14 ` [RFC PATCH 03/23] Allow glibc to be compiled without EXEC_PAGESIZE Sergey Bugaev
@ 2024-03-11 16:13   ` Florian Weimer
  2024-03-25 11:58     ` Florian Weimer
  0 siblings, 1 reply; 50+ messages in thread
From: Florian Weimer @ 2024-03-11 16:13 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd

* Sergey Bugaev:

> diff --git a/elf/dl-support.c b/elf/dl-support.c
> index 2f502c8b..6375dc95 100644
> --- a/elf/dl-support.c
> +++ b/elf/dl-support.c
> @@ -135,7 +135,11 @@ void *_dl_random;
>  #include <dl-procruntime.c>
>  #include <dl-procinfo.c>
>  
> -size_t _dl_pagesize = EXEC_PAGESIZE;
> +size_t _dl_pagesize
> +#ifdef EXEC_PAGESIZE
> +  = EXEC_PAGESIZE
> +#endif
> +;

I think the intent here is to initialize _dl_pagesize with a
conservative default, to avoid initialization ordering issues.
EXEC_PAGESIZE is supposed to be largest supported page size.

Thanks,
Florian


^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [RFC PATCH 03/23] Allow glibc to be compiled without EXEC_PAGESIZE
  2024-03-11 16:13   ` Florian Weimer
@ 2024-03-25 11:58     ` Florian Weimer
  2024-03-25 12:24       ` Sergey Bugaev
  0 siblings, 1 reply; 50+ messages in thread
From: Florian Weimer @ 2024-03-25 11:58 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: libc-alpha, bug-hurd, Samuel Thibault

* Florian Weimer:

> * Sergey Bugaev:
>
>> diff --git a/elf/dl-support.c b/elf/dl-support.c
>> index 2f502c8b..6375dc95 100644
>> --- a/elf/dl-support.c
>> +++ b/elf/dl-support.c
>> @@ -135,7 +135,11 @@ void *_dl_random;
>>  #include <dl-procruntime.c>
>>  #include <dl-procinfo.c>
>>  
>> -size_t _dl_pagesize = EXEC_PAGESIZE;
>> +size_t _dl_pagesize
>> +#ifdef EXEC_PAGESIZE
>> +  = EXEC_PAGESIZE
>> +#endif
>> +;
>
> I think the intent here is to initialize _dl_pagesize with a
> conservative default, to avoid initialization ordering issues.
> EXEC_PAGESIZE is supposed to be largest supported page size.

This was committed without addressing the comment above.

Thanks,
Florian


^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [RFC PATCH 03/23] Allow glibc to be compiled without EXEC_PAGESIZE
  2024-03-25 11:58     ` Florian Weimer
@ 2024-03-25 12:24       ` Sergey Bugaev
  2024-04-10 11:57         ` Florian Weimer
  2024-04-22 21:01         ` Samuel Thibault
  0 siblings, 2 replies; 50+ messages in thread
From: Sergey Bugaev @ 2024-03-25 12:24 UTC (permalink / raw)
  To: Florian Weimer, Samuel Thibault; +Cc: libc-alpha, bug-hurd

Hello,

On Mon, Mar 25, 2024 at 2:58 PM Florian Weimer <fweimer@redhat.com> wrote:
> > I think the intent here is to initialize _dl_pagesize with a
> > conservative default, to avoid initialization ordering issues.
> > EXEC_PAGESIZE is supposed to be largest supported page size.
>
> This was committed without addressing the comment above.

yes, I also didn't expect this to get pushed until we come to an agreement here.

On topic: I understand that this must have been done this way because
of potential initialization order issues (and the mail I linked also
makes this guess). The question is, is that (working around
initialization order issues) actually required, or is that a leftover
from something that's no longer relevant (or perhaps never was)?
Things seem to still work with this patch on aarch64-gnu for me, both
in SHARED and !SHARED, though I obviously didn't test every potential
codepath.

I was hoping that some broader testing, such as running the testsuite
on CI on existing ports, could answer that question comprehensively --
though now I realize that since this patch leaves the initialization
as-is when EXEC_PAGESIZE is defined (i.e. everywhere but on
aarch64-gnu), CI wouldn't catch any issues that removing it would
cause.

We could define EXEC_PAGESIZE to some conservative value on
aarch64-gnu too, if it turns out that this little workaround is really
required. But it seems cleaner to make sure we don't need to, as
Roland's email suggests, and introducing a new port that doesn't have
a fixed page size (and doesn't come with an EXEC_PAGESIZE value
already defined in kernel headers) seems to be a good opportunity to
do that. That's my reasoning here.

Sergey

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [RFC PATCH 03/23] Allow glibc to be compiled without EXEC_PAGESIZE
  2024-03-25 12:24       ` Sergey Bugaev
@ 2024-04-10 11:57         ` Florian Weimer
  2024-04-15 12:53           ` Sergey Bugaev
  2024-04-22 21:01         ` Samuel Thibault
  1 sibling, 1 reply; 50+ messages in thread
From: Florian Weimer @ 2024-04-10 11:57 UTC (permalink / raw)
  To: Sergey Bugaev; +Cc: Samuel Thibault, libc-alpha, bug-hurd

* Sergey Bugaev:

> We could define EXEC_PAGESIZE to some conservative value on
> aarch64-gnu too, if it turns out that this little workaround is really
> required. But it seems cleaner to make sure we don't need to, as
> Roland's email suggests, and introducing a new port that doesn't have
> a fixed page size (and doesn't come with an EXEC_PAGESIZE value
> already defined in kernel headers) seems to be a good opportunity to
> do that. That's my reasoning here.

But the ELF image must be laid out with certain expectations regarding
the maximum support page size.  Otherwise, something (kernel or dynamic
linker) needs to perform copies or upgrade conflicting permissions
within one page to a superset of all permissions.  I don't think we have
code for that today, and we wouldn't necessarily want to implement that,
I think.

Thanks,
Florian


^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [RFC PATCH 03/23] Allow glibc to be compiled without EXEC_PAGESIZE
  2024-04-10 11:57         ` Florian Weimer
@ 2024-04-15 12:53           ` Sergey Bugaev
  0 siblings, 0 replies; 50+ messages in thread
From: Sergey Bugaev @ 2024-04-15 12:53 UTC (permalink / raw)
  To: Florian Weimer; +Cc: libc-alpha, bug-hurd

Hello,

On Wed, Apr 10, 2024 at 2:57 PM Florian Weimer <fweimer@redhat.com> wrote:
> * Sergey Bugaev:
>
> > We could define EXEC_PAGESIZE to some conservative value on
> > aarch64-gnu too, if it turns out that this little workaround is really
> > required. But it seems cleaner to make sure we don't need to, as
> > Roland's email suggests, and introducing a new port that doesn't have
> > a fixed page size (and doesn't come with an EXEC_PAGESIZE value
> > already defined in kernel headers) seems to be a good opportunity to
> > do that. That's my reasoning here.
>
> But the ELF image must be laid out with certain expectations regarding
> the maximum support page size.  Otherwise, something (kernel or dynamic
> linker) needs to perform copies or upgrade conflicting permissions
> within one page to a superset of all permissions.  I don't think we have
> code for that today, and we wouldn't necessarily want to implement that,
> I think.

Certainly -- and I wouldn't expect the kernel or the dynamic linker to
do anything about it other than reporting an error.

I think what you're saying is you consider EXEC_PAGESIZE to indeed
describe/define this required alignment of ELF segments (as the name
suggests). If I adopt that view, then yes, having EXEC_PAGESIZE makes
sense, and it makes some sense to use it as a conservative page size
value to use while the real value is not yet available (assuming there
is a real need for that).

The way I've been viewing it -- based on the fact that neither Linux's
nor glibc's (dynamic) nor BFD's nor LLVM's (static) linkers use it for
that purpose -- is that it's just some PAGE_SIZE-like definition
that's unrelated to binary loading (despite its name -- perhaps it has
been historically related to segment alignment in some old versions of
Linux?) that has been co-opted by glibc for pre-initializing
dl_pagesize, for dubious reasons. It also seems to be a Linux- (and
x86 Hurd) specific thing; I cannot find it in the BSDs.

Which one is it?

Sergey

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [RFC PATCH 03/23] Allow glibc to be compiled without EXEC_PAGESIZE
  2024-03-25 12:24       ` Sergey Bugaev
  2024-04-10 11:57         ` Florian Weimer
@ 2024-04-22 21:01         ` Samuel Thibault
  1 sibling, 0 replies; 50+ messages in thread
From: Samuel Thibault @ 2024-04-22 21:01 UTC (permalink / raw)
  To: Sergey Bugaev, Florian Weimer; +Cc: libc-alpha, bug-hurd

Hello,

Sergey Bugaev, le lun. 25 mars 2024 15:24:14 +0300, a ecrit:
> On Mon, Mar 25, 2024 at 2:58 PM Florian Weimer <fweimer@redhat.com> wrote:
> > > I think the intent here is to initialize _dl_pagesize with a
> > > conservative default, to avoid initialization ordering issues.
> > > EXEC_PAGESIZE is supposed to be largest supported page size.
> >
> > This was committed without addressing the comment above.
> 
> yes, I also didn't expect this to get pushed until we come to an agreement here.

Sorry for this, I have reverted the change for now.

Samuel

^ permalink raw reply	[flat|nested] 50+ messages in thread

end of thread, other threads:[~2024-04-22 21:01 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-03 17:14 [RFC PATCH 00/23] aarch64-gnu port Sergey Bugaev
2024-01-03 17:14 ` [PATCH 01/23] hurd: Add some missing includes Sergey Bugaev
2024-01-03 20:43   ` Samuel Thibault
2024-01-03 21:08     ` Sergey Bugaev
2024-01-03 21:24       ` Sergey Bugaev
2024-01-03 21:35         ` Samuel Thibault
2024-01-03 21:00   ` Samuel Thibault
2024-01-03 17:14 ` [PATCH 02/23] hurd: Declare _hurd_intr_rpc_msg* with protected visibility Sergey Bugaev
2024-01-03 21:00   ` Samuel Thibault
2024-01-03 17:14 ` [RFC PATCH 03/23] Allow glibc to be compiled without EXEC_PAGESIZE Sergey Bugaev
2024-03-11 16:13   ` Florian Weimer
2024-03-25 11:58     ` Florian Weimer
2024-03-25 12:24       ` Sergey Bugaev
2024-04-10 11:57         ` Florian Weimer
2024-04-15 12:53           ` Sergey Bugaev
2024-04-22 21:01         ` Samuel Thibault
2024-01-03 17:14 ` [PATCH 04/23] mach: Drop some unnecessary vm_param.h includes Sergey Bugaev
2024-01-03 21:00   ` Samuel Thibault
2024-01-03 17:14 ` [RFC PATCH 05/23] hurd: Disable Prefer_MAP_32BIT_EXEC on non-x86_64 for now Sergey Bugaev
2024-01-03 17:14 ` [PATCH 06/23] mach: Drop SNARF_ARGS macro Sergey Bugaev
2024-01-03 21:00   ` Samuel Thibault
2024-01-03 17:14 ` [RFC PATCH 07/23] hurd: Pass the data pointer to _hurd_stack_setup explicitly Sergey Bugaev
2024-01-04 22:47   ` Samuel Thibault
2024-01-03 17:14 ` [RFC PATCH 08/23] hurd: Drop x86-specific assembly from init-first.c Sergey Bugaev
2024-01-04 22:48   ` Samuel Thibault
2024-01-03 17:14 ` [RFC PATCH 09/23] hurd: Make init-first.c no longer x86-specific Sergey Bugaev
2024-01-04 22:48   ` Samuel Thibault
2024-01-03 17:14 ` [RFC PATCH 10/23] hurd: Only init early static TLS if it's used to store stack or pointer guards Sergey Bugaev
2024-01-04 22:48   ` Samuel Thibault
2024-01-03 17:14 ` [RFC PATCH 11/23] hurd: Initializy _dl_pagesize early in static builds Sergey Bugaev
2024-01-04 22:48   ` Samuel Thibault
2024-01-03 17:14 ` [RFC PATCH 12/23] aarch64: Make cpu-features definitions not Linux-specific Sergey Bugaev
2024-01-04 22:48   ` Samuel Thibault
2024-01-03 17:14 ` [RFC PATCH 13/23] aarch64: Add dl-procinfo Sergey Bugaev
2024-01-03 17:14 ` [RFC PATCH 14/23] aarch64: Allow building without kernel support for BTI Sergey Bugaev
2024-01-03 17:14 ` [RFC PATCH 15/23] mach: Add a basic AArch64 port Sergey Bugaev
2024-01-03 17:14 ` [RFC PATCH 16/23] hurd: " Sergey Bugaev
2024-01-03 17:14 ` [RFC PATCH 17/23] hurd: Implement TLS on AArch64 Sergey Bugaev
2024-01-03 17:14 ` [RFC PATCH 18/23] hurd: Implement longjmp for AArch64 Sergey Bugaev
2024-01-03 17:14 ` [RFC PATCH 19/23] Add FPE_FLTIDO Sergey Bugaev
2024-01-03 17:14 ` [RFC PATCH 20/23] hurd: Add an AArch64 signal implementation Sergey Bugaev
2024-01-03 17:14 ` [RFC PATCH 21/23] htl: Implement some support for TLS_DTV_AT_TP Sergey Bugaev
2024-01-03 17:14 ` [RFC PATCH 22/23] htl: Add an AArch64 implementation Sergey Bugaev
2024-01-03 17:14 ` [RFC PATCH 23/23] hurd: Add expected aarch64-gnu abistlists Sergey Bugaev
2024-01-03 17:30 ` [RFC PATCH 00/23] aarch64-gnu port Joseph Myers
2024-01-03 17:57   ` Sergey Bugaev
2024-03-11 16:10   ` Florian Weimer
2024-03-11 13:47 ` H.J. Lu
2024-03-11 15:38   ` Sergey Bugaev
2024-03-11 14:14 ` Maxim Kuvyrkov

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).