$ cat l.c __thread int a_thread_local; int main(void) { a_thread_local = 3; } Note this does produce a binary as well as error. Assuming this means stuff is missing from the result: $ clang l.c -fuse-ld=ld -g /usr/bin/ld: /tmp/l-e8fd7d.o(.debug_info+0x37): R_AARCH64_ABS64 used with TLS symbol a_thread_local Works with GOLD, no error: $ clang l.c -fuse-ld=gold -g With GCC+LD this error does not occur because GCC is not outputting DW_AT_location for the TLS variable a_thread_local. Once this support is added into LD then GCC will be able to add support. See https://gcc.gnu.org/bugzilla//show_bug.cgi?id=83010 Support for DW_AT_location on TLS variables is required for good debugging in GDB. Tested on both 2.31.1 and HEAD.