This patch: diff --git a/sysdeps/x86/cacheinfo.c b/sysdeps/x86/cacheinfo.c index 311502dee3..3ddc7104f4 100644 --- a/sysdeps/x86/cacheinfo.c +++ b/sysdeps/x86/cacheinfo.c @@ -769,6 +769,8 @@ init_cacheinfo (void) unsigned int threads = 0; const struct cpu_features *cpu_features = __get_cpu_features (); + assert (cpu_features->basic.kind != arch_kind_unknown); + if (cpu_features->basic.kind == arch_kind_intel) { data = handle_intel (_SC_LEVEL1_DCACHE_SIZE, cpu_features); caused: FAIL: elf/tst-libc_dlvsym-static GLRO(dl_x86_cpu_features) in ld.so is initialized by init_cpu_features, which is invoked by DL_PLATFORM_INIT from _dl_sysdep_start. But ld.so loaded by static executable never calls _dl_sysdep_start.
A patch: https://sourceware.org/pipermail/libc-alpha/2020-July/115788.html is posted to initialize CPU info as the part of relocation.
Fixed in 2.33 by commit 0f09154c64005e78b61484ae87b5ea2028051ea0 Author: H.J. Lu <hjl.tools@gmail.com> Date: Sat Jul 4 06:35:49 2020 -0700 x86: Initialize CPU info via IFUNC relocation [BZ 26203]