commit fa6b6a85ad6adc244774d1d2d905ef9591e25044 (HEAD -> gentoo/binutils-2.46.1, gentoo/gentoo/binutils-2.46.1)
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Sat May 23 05:12:10 2026 +0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Wed Jun 10 21:42:26 2026 +0200

    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 <hjl.tools@gmail.com>
    (cherry picked from commit ffea43122dc5deaea75374bd2bd928d1d4182f67)
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 bfd/elf-bfd.h                              | 11 ++++++++++
 bfd/elf64-alpha.c                          | 33 ++++++++++++++++++++++--------
 ld/testsuite/ld-alpha/alpha.exp            |  7 +++++++
 ld/testsuite/ld-alpha/tlsbin-undef.d       |  2 ++
 ld/testsuite/ld-alpha/tlsbin-undef.s       | 16 +++++++++++++++
 ld/testsuite/ld-alpha/tlsbin-weak-undef1.d | 14 +++++++++++++
 ld/testsuite/ld-alpha/tlsbin-weak-undef1.s | 17 +++++++++++++++
 ld/testsuite/ld-alpha/tlsbin-weak-undef2.d | 14 +++++++++++++
 ld/testsuite/ld-alpha/tlsbin-weak-undef2.s | 17 +++++++++++++++
 ld/testsuite/ld-alpha/tlsbin-weak-undef3.d | 14 +++++++++++++
 ld/testsuite/ld-alpha/tlsbin-weak-undef3.s | 22 ++++++++++++++++++++
 ld/testsuite/ld-alpha/tlsbin-weak-undef4.d | 14 +++++++++++++
 ld/testsuite/ld-alpha/tlsbin-weak-undef4.s | 22 ++++++++++++++++++++
 ld/testsuite/ld-alpha/tlspic-undef.d       |  2 ++
 ld/testsuite/ld-alpha/tlspic-undef.s       | 16 +++++++++++++++
 ld/testsuite/ld-alpha/tlspic-weak-undef1.d | 14 +++++++++++++
 ld/testsuite/ld-alpha/tlspic-weak-undef1.s | 22 ++++++++++++++++++++
 ld/testsuite/ld-elf/pr34165.c              | 14 +++++++++++++
 ld/testsuite/ld-elf/tls.exp                | 11 ++++++++++
 19 files changed, 273 insertions(+), 9 deletions(-)

commit 8f0c3d770376baa6ca56567500b6d791ec44a48e (tag: gentoo/binutils-2.46.1-1)
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: Wed Feb 22 20:05:35 2023 +0100
Commit:     Sam James <sam@gentoo.org>
CommitDate: Tue Jun 9 00:41:49 2026 +0100

    Apply a similar libiberty fix as in 7d53105d for libopcodes and libgprofng
    
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29042
    Bug: https://bugs.gentoo.org/834720
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
    Signed-off-by: Sam James <sam@gentoo.org>

 gprofng/src/Makefile.am | 3 ++-
 gprofng/src/Makefile.in | 6 ++++--
 opcodes/configure       | 4 ++--
 opcodes/configure.ac    | 4 ++--
 4 files changed, 10 insertions(+), 7 deletions(-)

commit cbaafefa13281bb640f6934b4f71029d39f1b3d3
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: Sat Jul 24 15:20:16 2021 +0200
Commit:     Sam James <sam@gentoo.org>
CommitDate: Tue Jun 9 00:41:49 2026 +0100

    Gentoo: Give also libctf optionally a gentoo-specific soversion
    
    Signed-off-by: Sam James <sam@gentoo.org>

 libctf/Makefile.am  | 14 +++++++++++++-
 libctf/Makefile.in  |  9 ++++++++-
 libctf/configure    | 35 +++++++++++++++++++++++++++++++++--
 libctf/configure.ac | 10 ++++++++++
 4 files changed, 64 insertions(+), 4 deletions(-)

commit d99a41a7a843d99b0766be4b17804a3b01e08959
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: Tue Jul 20 21:12:38 2021 +0200
Commit:     Sam James <sam@gentoo.org>
CommitDate: Tue Jun 9 00:41:49 2026 +0100

    Gentoo: add --with-extra-soversion-suffix= option
    
    --with-extra-soversion-suffix= will allow Gentoo to
    distinct libbfd.so and libopcodes.so to have more precise
    SONAME.
    
    Today --enable-targets=all and --enable-64-bit-bfd change
    libbfd.so ABI:
    --enable-targets=all adds new symbols to the library
    --enable-64-bit-bfd modifies BFD_ARCH_SIZE default and
    changes sizes of integer parameters and fields to most
    APIs.
    
    --with-extra-soversion-suffix= will allow Gentoo to inject
    additional keys into SONAME to indicate ABI change and avoid
    hard to diagnose crashes when user reinstalls libbfd.so
    built with different flags (see https://bugs.gentoo.org/663690).
    
    Bug: https://bugs.gentoo.org/666100
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
    
    Ported to binutils 2.37 by Andreas K. Hüttel <dilfridge@gentoo.org>
    
    Signed-off-by: Sam James <sam@gentoo.org>

 bfd/Makefile.am  |  5 +++++
 bfd/Makefile.in  |  4 ++++
 bfd/configure    | 17 +++++++++++++++--
 bfd/configure.ac |  7 +++++++
 4 files changed, 31 insertions(+), 2 deletions(-)

commit 6090dd49f9f0c177584b464a71f7f7c0c0da5174
Author:     Mike Frysinger <vapier@gentoo.org>
AuthorDate: Fri Jan 7 00:15:53 2005 -0500
Commit:     Sam James <sam@gentoo.org>
CommitDate: Tue Jun 9 00:41:48 2026 +0100

    Gentoo: libiberty: install PIC version of libiberty.a
    
    This will install a PIC version of libiberty.a by overwriting the non-PIC
    version of libiberty.a while compiling.  We do this because there is no
    shared version of libiberty for random apps to link against which means if
    someone wants to use this in a shared library or PIE, they're out of luck.
    It's arguable whether people should be able to use this in a shared lib,
    but usage in PIE should be fine.  You could argue that this penalizes the
    non-PIE users, but the counter point is that people using this library in
    general are fairly low, and we'd rather have things work for all of them.
    
    (cherry picked from commit 112aff9ad3e2675556370c4281117a6df0a879d9)
    Signed-off-by: Sam James <sam@gentoo.org>

 libiberty/Makefile.in | 1 +
 1 file changed, 1 insertion(+)

commit 38093d82a3e159d0eac892fd207033d561f8de01
Author:     Sam James <sam@gentoo.org>
AuthorDate: Mon Jun 8 23:50:12 2026 +0100
Commit:     Sam James <sam@gentoo.org>
CommitDate: Mon Jun 8 23:50:12 2026 +0100

    Re-enable development on the 2.46 branch

 bfd/development.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
