[PATCH] alpha: Handle local weak undefined symbol value separately

H.J. Lu hjl.tools@gmail.com
Fri May 22 23:52:29 GMT 2026


Since local weak undefined symbol value is always 0, handle TLS
relocations against local weak undefined symbols separately.

bfd/

PR ld/34165
* elf64-alpha.c (elf64_alpha_local_undefweak_p): New function.
(elf64_alpha_relocate_section): Handle TLS relocations against
local weak undefined symbol value separately.

ld/testsuite/

PR ld/34165
* ld-alpha/alpha.exp: Run $srcdir/$subdir/*.d.
* ld-alpha/tlsbin-undef.d: New file.
* ld-alpha/tlsbin-undef.s: Likewise.
* ld-alpha/tlsbin-weak-undef1.d: Likewise.
* ld-alpha/tlsbin-weak-undef1.s: Likewise.
* ld-alpha/tlsbin-weak-undef2.d: Likewise.
* ld-alpha/tlsbin-weak-undef2.s: Likewise.
* ld-alpha/tlspic-undef.d: Likewise.
* ld-alpha/tlspic-undef.s: Likewise.
* ld-alpha/tlspic-weak-undef1.d: Likewise.
* ld-alpha/tlspic-weak-undef1.s: Likewise.


-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-alpha-Handle-local-weak-undefined-symbol-value-separ.patch
Type: text/x-patch
Size: 9860 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20260523/07be516e/attachment-0001.bin>


More information about the Binutils mailing list