https://sourceware.org/bugzilla/show_bug.cgi?id=34165
--- Comment #10 from Sourceware Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by H.J. Lu <[email protected]>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ffea43122dc5deaea75374bd2bd928d1d4182f67 commit ffea43122dc5deaea75374bd2bd928d1d4182f67 Author: H.J. Lu <[email protected]> Date: Sat May 23 05:12:10 2026 +0800 alpha: Properly handle local weak undefined symbols Since the local undefined TLS symbol address isn't mapped to any TLS storage, it isn't usable. Set its value to 0 to avoid relocation overflow. When processing TLS relocations, elf_hash_table (info)->tls_sec can be NULL if all TLS symbols are weak, hidden and undefined. Don't assert elf_hash_table (info)->tls_sec != NULL. Always set dtp_base and tp_base to 0 if elf_hash_table (info)->tls_sec == NULL. bfd/ PR ld/34165 * * elf-bfd.h (elf_link_local_undefweak_p): New function. * elf64-alpha.c (elf64_alpha_relax_got_load): Set dtp_base and tp_base to 0 if elf_hash_table (info)->tls_sec == NULL. (elf64_alpha_relocate_section): Set the local undefined TLS symbol value to 0. Don't assert elf_hash_table (info)->tls_sec != NULL. ld/ PR ld/34165 * testsuite/ld-alpha/alpha.exp: Run $srcdir/$subdir/*.d. * testsuite/ld-alpha/tlsbin-undef.d: New file. * testsuite/ld-alpha/tlsbin-undef.s: Likewise. * testsuite/ld-alpha/tlsbin-weak-undef1.d: Likewise. * testsuite/ld-alpha/tlsbin-weak-undef1.s: Likewise. * testsuite/ld-alpha/tlsbin-weak-undef2.d: Likewise. * testsuite/ld-alpha/tlsbin-weak-undef2.s: Likewise. * testsuite/ld-alpha/tlsbin-weak-undef3.d: Likewise. * testsuite/ld-alpha/tlsbin-weak-undef3.s: Likewise. * testsuite/ld-alpha/tlsbin-weak-undef4.d: Likewise. * testsuite/ld-alpha/tlsbin-weak-undef4.s: Likewise. * testsuite/ld-alpha/tlspic-undef.d: Likewise. * testsuite/ld-alpha/tlspic-undef.s: Likewise. * testsuite/ld-alpha/tlspic-weak-undef1.d: Likewise. * testsuite/ld-alpha/tlspic-weak-undef1.s: Likewise. * testsuite/ld-elf/pr34165.c: Likewise. * testsuite/ld-elf/tls.exp: Run PR ld/34165 test. Signed-off-by: H.J. Lu <[email protected]> -- You are receiving this mail because: You are on the CC list for the bug.
