[PATCH v2] alpha: Handle local weak undefined symbol value separately
H.J. Lu
hjl.tools@gmail.com
Sat May 23 03:45:45 GMT 2026
On Sat, May 23, 2026 at 7:52 AM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> 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.
>
Move elf64_alpha_local_undefweak_p to elf-bfd.h (elf_link_local_undefweak_p)
--
H.J.
---
Since local weak undefined symbol value is always 0, handle TLS
relocations against local weak undefined symbols separately.
bfd/
PR ld/34165
* elf-bfd.h (elf_link_local_undefweak_p): New function.
* elf64-alpha.c (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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v2-0001-alpha-Handle-local-weak-undefined-symbol-value-se.patch
Type: text/x-patch
Size: 10074 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20260523/d2610fb8/attachment.bin>
More information about the Binutils
mailing list