commit e36aa38704e1aa23dbb6275657abd235248e4ff4 (HEAD -> gentoo/binutils-2.37, gentoo/gentoo/binutils-2.37)
Author:     Alan Modra <amodra@gmail.com>
AuthorDate: Sat Jul 24 15:34:55 2021 +0930
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Jul 24 23:02:20 2021 +0200

    Revert: PowerPC: Don't generate unused section symbols
    
    Blindly following x86 broke linux kernel builds.
    
    bfd/
            * elf32-ppc.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define as true.
            * elf64-ppc.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Likewise.
    gas/
            * testsuite/gas/ppc/power4.d: Adjust for section sym change.
            * testsuite/gas/ppc/test1elf32.d: Likewise.
            * testsuite/gas/ppc/test1elf64.d: Likewise.
    ld/
            * testsuite/ld-powerpc/tlsexe.r: Adjust for section sym change.
            * testsuite/ld-powerpc/tlsexe32.r: Likewise.
            * testsuite/ld-powerpc/tlsexe32no.r: Likewise.
            * testsuite/ld-powerpc/tlsexeno.r: Likewise.
            * testsuite/ld-powerpc/tlsexenors.r: Likewise.
            * testsuite/ld-powerpc/tlsexers.r: Likewise.
            * testsuite/ld-powerpc/tlsexetoc.r: Likewise.
            * testsuite/ld-powerpc/tlsexetocrs.r: Likewise.
            * testsuite/ld-powerpc/tlsget.d: Likewise.
            * testsuite/ld-powerpc/tlsget.wf: Likewise.
            * testsuite/ld-powerpc/tlsget2.d: Likewise.
            * testsuite/ld-powerpc/tlsget2.wf: Likewise.
            * testsuite/ld-powerpc/tlsso.r: Likewise.
            * testsuite/ld-powerpc/tlsso32.r: Likewise.
            * testsuite/ld-powerpc/tlstocso.r: Likewise.
    
    (cherry picked from commit c09c8b42021180eee9495bd50d8b35e683d3901b)
    (cherry picked from commit 9a98fad216562147a77f2b68e3cb2e79712d15f9)

 bfd/elf32-ppc.c                       |  6 ++++--
 bfd/elf64-ppc.c                       |  6 ++++--
 gas/testsuite/gas/ppc/power4.d        |  1 +
 gas/testsuite/gas/ppc/test1elf32.d    |  1 +
 gas/testsuite/gas/ppc/test1elf64.d    |  1 +
 ld/testsuite/ld-powerpc/tlsexe.r      | 13 +++++++++++++
 ld/testsuite/ld-powerpc/tlsexe32.r    | 12 ++++++++++++
 ld/testsuite/ld-powerpc/tlsexe32no.r  | 12 ++++++++++++
 ld/testsuite/ld-powerpc/tlsexeno.r    | 13 +++++++++++++
 ld/testsuite/ld-powerpc/tlsexenors.r  | 13 +++++++++++++
 ld/testsuite/ld-powerpc/tlsexers.r    | 13 +++++++++++++
 ld/testsuite/ld-powerpc/tlsexetoc.r   | 13 +++++++++++++
 ld/testsuite/ld-powerpc/tlsexetocrs.r | 13 +++++++++++++
 ld/testsuite/ld-powerpc/tlsget.d      | 23 +++++++++++------------
 ld/testsuite/ld-powerpc/tlsget.wf     |  4 ++--
 ld/testsuite/ld-powerpc/tlsget2.d     | 16 ++++++++--------
 ld/testsuite/ld-powerpc/tlsget2.wf    |  2 +-
 ld/testsuite/ld-powerpc/tlsso.r       | 12 ++++++++++++
 ld/testsuite/ld-powerpc/tlsso32.r     | 11 +++++++++++
 ld/testsuite/ld-powerpc/tlstocso.r    | 12 ++++++++++++
 20 files changed, 170 insertions(+), 27 deletions(-)

commit 38dec2a258ae51bbe1279e3332d1db465086fd81
Author:     Alan Modra <amodra@gmail.com>
AuthorDate: Thu Jul 22 21:41:15 2021 +0930
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Jul 24 23:01:39 2021 +0200

    Re: ld script expression parsing
    
    Commit 40726f16a8d7 broke references to sections within ADDR(), and
    overlays with weird section names.
    
            * ldgram.y (paren_script_name): New rule.
            (exp): Use it for ALIGNOF, SIZEOF, ADDR, and LOADADDR.  Similarly
            ensure script mode parsing for section name in SEGMENT_START.
            (overlay_section): Delete unnecessary ldlex_script call.  Backup
            on a lookahead NAME parsed in expression mode.
            * testsuite/ld-elf/overlay.s: Add more sections.
            * testsuite/ld-elf/overlay.t: Test '-' in section names.
    
    (cherry picked from commit 553dd76c7e49e3e6afb528ff865589da8f6f3e1c)
    (cherry picked from commit 6afc66a7772e69ac3888b496e12d3c8f257c693c)

 ld/ldgram.y                   | 38 +++++++++++++++++++++++---------------
 ld/testsuite/ld-elf/overlay.s |  4 ++++
 ld/testsuite/ld-elf/overlay.t |  6 +++++-
 3 files changed, 32 insertions(+), 16 deletions(-)

commit 8820fb21cd24070c5159f24b47af87f6733f75d8
Author:     Nick Clifton <nickc@redhat.com>
AuthorDate: Wed Jul 21 14:38:32 2021 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Jul 24 23:01:12 2021 +0200

    Updated Russian translation for the bfd library
    
    (cherry picked from commit 28bb1699b1853c5e6fd5d85ff9f74620fe606bfd)

 bfd/ChangeLog |    4 +
 bfd/po/ru.po  | 3896 ++++++++++++++++++++++++++++++---------------------------
 2 files changed, 2060 insertions(+), 1840 deletions(-)

commit 235448cc5c53641417e17fd39ced95a21053c8ca
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: Sat Jul 24 19:25:32 2021 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Jul 24 20:55:04 2021 +0200

    If we use a soversion suffix, then we also use the bdf version as soversion

 libctf/Makefile.am  | 3 ++-
 libctf/Makefile.in  | 3 ++-
 libctf/configure    | 8 ++++++--
 libctf/configure.ac | 2 ++
 4 files changed, 12 insertions(+), 4 deletions(-)

commit d3cd41f5c7e405a8db5e85a7be9dfc42d44ef1b8
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: Sat Jul 24 15:20:16 2021 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Jul 24 20:54:24 2021 +0200

    Give also libctf optionally a gentoo-specific soversion

 libctf/Makefile.am  | 13 ++++++++++++-
 libctf/Makefile.in  |  8 +++++++-
 libctf/configure    | 31 +++++++++++++++++++++++++++++--
 libctf/configure.ac |  8 ++++++++
 4 files changed, 56 insertions(+), 4 deletions(-)

commit 905bf3c180f4f7fd07024eb9ff7851898593f3f8 (tag: gentoo/binutils-2.37-1)
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: Tue Jul 20 21:15:24 2021 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue Jul 20 21:15:24 2021 +0200

    Gentoo: Pass --hash-style=sysv to ld in the testsuite

 binutils/testsuite/lib/binutils-common.exp |  2 +-
 ld/testsuite/lib/ld-lib.exp                | 16 ++++++++++++++--
 2 files changed, 15 insertions(+), 3 deletions(-)

commit f4ecba77ec1eb0576b8731c749336ea3889eba73
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: Sun Oct 13 05:25:28 2019 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue Jul 20 21:13:29 2021 +0200

    Gentoo: ld: enable new dtags by default for linux/gnu targets
    
    Original author: Mike Frysinger <vapier@gentoo.org>
    
    The "new" dtags options have been around for 14+ years now, so for Linux
    and GNU targets, enable them by default.
    
    2012-01-21  Mike Frysinger  <vapier@gentoo.org>
    
            * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Set
            link_info.new_dtags to TRUE for linux/gnu targets.
            * NEWS: Mention new dtags default.
    
    2013-01-22  Roland McGrath  <mcgrathr@google.com>
    
            * emultempl/elf32.em (gld${EMULATION_NAME}_before_parse): Set
            new_dtags to TRUE for *-*-nacl* targets.

 ld/emultempl/elf.em | 10 ++++++++++
 1 file changed, 10 insertions(+)

commit 235f1f862fb9bf77e2b9f62c24db0ca801c4a057
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: Tue Jul 20 21:12:38 2021 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue Jul 20 21:12:38 2021 +0200

    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 Andreas K. Hüttel <dilfridge@gentoo.org>

 bfd/Makefile.am  |  5 +++++
 bfd/Makefile.in  |  4 ++++
 bfd/configure    | 13 +++++++++++++
 bfd/configure.ac |  7 +++++++
 4 files changed, 29 insertions(+)

commit c55536c61ec7e4c2e983e15f51f56f7a7c340889
Author:     Mike Frysinger <vapier@gentoo.org>
AuthorDate: Tue Jul 5 20:24:00 2016 +0545
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue Jul 20 21:09:39 2021 +0200

    Gentoo: opcodes: link against libbfd.la for rpath deps
    
    The reason opcodes doesn't link against libbfd.la is to workaround a
    libtool bug where it uses installed -L paths ahead of DESTDIR paths.
    The downside is that the library itself lacks rpath tags to find the
    right version of libbfd.so.
    
    Since Gentoo has patched the libtool bug for a while, we don't need
    the workaround.  Use the .la file so we get the rpath tags.
    
    URL: https://bugs.gentoo.org/563934
    (cherry picked from commit 662586237b0b00ee881e79b56f6234ff36e8bfe6)

 opcodes/configure    | 2 +-
 opcodes/configure.ac | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

commit 6536761c1e2756ec39fdc33c400757be3744510c
Author:     Mike Frysinger <vapier@gentoo.org>
AuthorDate: Fri Jan 7 00:15:53 2005 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue Jul 20 21:09:30 2021 +0200

    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)

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

commit 8a82f64de912f26e840b20eec9d8a463fd0e242b
Author:     Mike Frysinger <vapier@gentoo.org>
AuthorDate: Tue Jul 20 21:08:31 2021 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue Jul 20 21:08:31 2021 +0200

    Gentoo: gold/ld: add support for poisoned system
     directories
    
    This is based on the old CodeSourcery patch written by Joseph Myers to add
    support to the link for detecting & rejecting bad -L paths when using a
    cross-compiler.  The differences here:
    * The command line flags are always available.
    * We can turn on & off the warning via the command line.
    * The configure option controls the default warning behavior.
    * Add support for gold.
    
    It is not currently upstream, nor has it been submitted at all.  There are
    no plans to do so currently either.
    
    BUG=chromium:488360
    TEST=`cbuildbot chromiumos-sdk` passes  # tests arm/amd64/mipsel/x86
    TEST=`cbuildbot panther_moblab-full whirlwind-release` pass
    TEST=`cbuildbot {x32,arm64}-generic-full` has no new failures
    TEST=x86_64-cros-linux-gnu-ld throws warnings when using -L/lib (gold & bfd)
    
    Reviewed-on: https://chromium-review.googlesource.com/272083
    (cherry picked from commit f92dbf35c00ab13cee36f6be8ae5ca46454d9000)
    
    Ported to binutils 2.37 Andreas K. Hütte <dilfridge@gentoo.org>

 gold/options.cc | 33 +++++++++++++++++++++++++++++++++
 gold/options.h  |  7 +++++++
 ld/config.in    |  3 +++
 ld/configure    | 14 ++++++++++++++
 ld/configure.ac | 10 ++++++++++
 ld/ld.h         |  7 +++++++
 ld/ld.texi      | 18 ++++++++++++++++++
 ld/ldfile.c     | 20 ++++++++++++++++++++
 ld/ldlex.h      |  3 +++
 ld/ldmain.c     |  7 +++++++
 ld/lexsup.c     | 24 ++++++++++++++++++++++++
 11 files changed, 146 insertions(+)

commit 10b4dbbf281397e2827820c715c39559c7f7a29d
Author:     Alan Modra <amodra@gmail.com>
AuthorDate: Tue Jul 20 18:46:57 2021 +0930
Commit:     Alan Modra <amodra@gmail.com>
CommitDate: Tue Jul 20 21:34:32 2021 +0930

    PR28106, build of 2.37 fails on FreeBSD and Clang
    
    https://en.cppreference.com/w/cpp/types/NULL says NULL might be
    defined as nullptr.
    https://en.cppreference.com/w/cpp/language/reinterpret_cast says
    reinterpret_cast can't be used on nullptr.
    
            PR gold/28106
            PR gold/27815
            * gc.h (gc_process_relocs): Use static_cast in Section_id constructor.
    
    (cherry picked from commit b97bd976233ee4d43c2fe18f6356e62779cbe82d)

 gold/ChangeLog | 6 ++++++
 gold/gc.h      | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

commit ad71de582ecc41b7e700680827bee8fec36a21ec
Author:     GDB Administrator <gdbadmin@sourceware.org>
AuthorDate: Tue Jul 20 00:00:56 2021 +0000
Commit:     GDB Admin <brobecker@adacore.com>
CommitDate: Tue Jul 20 00:00:56 2021 +0000

    Automatic date update in version.in

 bfd/version.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 999566402e3d7c69032bbf47e28b44fc0926fe62
Author:     Christopher Wellons <wellons@nullprogram.com>
AuthorDate: Sun Jul 18 16:57:19 2021 -0400
Commit:     Alan Modra <amodra@gmail.com>
CommitDate: Mon Jul 19 21:02:21 2021 +0930

    Change "uint" to "unsigned"
    
    This fixes a defect introduced in 25162c795. The "uint" type has not
    been explicitly defined here on mingw, causing compilation to fail.
    
    On linux we have this in /usr/include/sys/types.h
    
    /* Old compatibility names for C types.  */
    typedef unsigned long int ulong;
    typedef unsigned short int ushort;
    typedef unsigned int uint;
    
    So it's easy to see how such bugs can creep in.
    
            * rust-demangle.c (struct rust_demangler): Change type of
            "recursion" to unsigned.
            (RUST_NO_RECURSION_LIMIT): Similarly in cast.

 libiberty/ChangeLog       | 6 ++++++
 libiberty/rust-demangle.c | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

commit bebfdeb46ddfce80bca9fd23a0261501f87bc892
Author:     GDB Administrator <gdbadmin@sourceware.org>
AuthorDate: Mon Jul 19 00:00:41 2021 +0000
Commit:     GDB Admin <brobecker@adacore.com>
CommitDate: Mon Jul 19 00:00:41 2021 +0000

    Automatic date update in version.in

 bfd/version.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit e2688c418ff73c1b1251dfa08e462aac40f51ce1
Author:     Nick Clifton <nickc@redhat.com>
AuthorDate: Sun Jul 18 19:45:19 2021 +0100
Commit:     Nick Clifton <nickc@redhat.com>
CommitDate: Sun Jul 18 19:45:19 2021 +0100

    Re-enable development on the 2.37 branch

 bfd/ChangeLog      | 5 +++++
 bfd/development.sh | 2 +-
 bfd/version.m4     | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)
