Created attachment 14991 [details] patch cat > test.c <<EOF struct THD; extern __thread struct THD *current_thd; void *test() { return current_thd; } EOF gcc -ftls-model=initial-exec -shared -fPIC -o libtest.so test.c env LD_TRACE_LOADED_OBJECTS=1 LD_WARN=1 LD_BIND_NOW=1 /lib64/ld-linux-loongarch-lp64d.so.1 ./libtest.so statically linked undefined symbol: current_thd (./libtest.so) Segmentation fault This failure is particularly annoying since the above tracing command is used when building RPM packages.
Per https://sourceware.org/glibc/wiki/Contribution%20checklist, please submit the patch to the mailing list libc-alpha@sourceware.org.