ld.so on aarch64 crashes (SIGSEGV) qemu-aarch64-static to verify attached executable Description of problem: I'm currently managing an automation to build a linux distribution from nothing. The issues is when I try to cross compile gobject-introspection for aarch64 (it is currently working on arm) because the g-ir-compile phase requires a binary verification using ld-linux-aarch64-so-1 --verify GLib-2.0 process used by ldd, that crashes qemu-aarch64-static. Original command is: ${SYSROOT}/lib/ld-linux-aarch64-so-1 --verify ${HOME}/builds/gobject-introspection_1.75.4/tmp-introspectnpyrhpje/GLib-2.0. I simplified the problem bringing out the ld.so and GLib-2.0 binary to obtain the same result. This happens with glibc 2.35 and glibc 2.36 on aarch64 built with a gcc-12.2 cross compiler (x86 -> aarch64). [GLib-2.0](/uploads/47932b18278835fb13ef0de4c34872fa/GLib-2.0) [ld-linux-aarch64.so.1](/uploads/0ee01949285bea8ccfcebdc88a1d5b33/ld-linux-aarch64.so.1) I tried to debug the SIGSEGV but it's out completely out of my capacity. Steps to reproduce: 1. Copy the 2 attached files in a directory: 2. Run: qemu-aarch64-static ./ld-linux-aarch64.so.1 --verify ./GLib-2.0 3. Result: Segmentation fault. Additional information: I attach the output of gdb after install qemu debug symbols: ``` Thread 1 "qemu-aarch64-st" received signal SIGSEGV, Segmentation fault. 0x0000000000401088 in ?? () (gdb) bt #0 0x0000000000401088 in ?? () #1 0x00000000006aa439 in g_malloc0 () #2 0x000000000061bb4b in page_find_alloc (index=index@entry=1024, alloc=alloc@entry=1) at ../accel/tcg/translate-all.c:494 #3 0x000000000061db12 in page_set_flags (start=start@entry=4194304, end=end@entry=4206592, flags=9, flags@entry=73) at ../accel/tcg/translate-all.c:2288 #4 0x0000000000629f10 in target_mmap (start=, start@entry=4194304, len=, len@entry=12288, target_prot=target_prot@entry=1, flags=2066, fd=fd@entry=3, offset=offset@entry=0) at ../linux-user/mmap.c:629 #5 0x0000000000641e1d in do_syscall1 (cpu_env=0x9e8c10, num=222, arg1=4194304, arg2=12288, arg3=1, arg4=, arg5=3, arg6=0, arg8=, arg7=) at ../linux-user/syscall.c:9961 #6 0x0000000000644c8c in do_syscall (cpu_env=cpu_env@entry=0x9e8c10, num=222, arg1=4194304, arg2=12288, arg3=1, arg4=2066, arg5=3, arg6=0, arg7=0, arg8=0) at ../linux-user/syscall.c:13203 #7 0x000000000040fca8 in cpu_loop (env=env@entry=0x9e8c10) at ../linux-user/aarch64/cpu_loop.c:93 #8 0x000000000040267f in main (argc=, argv=0x7fffffffdfc8, envp=) at ../linux-user/main.c:897 ```