commit ec3f2be62ec7116f765720f05b5519cf7e1b9c84 (HEAD -> gentoo/binutils-2.42, gentoo/gentoo/binutils-2.42)
Author:     Andrew Carlotti <andrew.carlotti@arm.com>
AuthorDate: Fri Apr 12 13:35:00 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Jun 29 00:03:56 2024 +0200

    aarch64: Enable +cssc for armv8.9-a
    
    FEAT_CSSC is mandatory in the architecture from Armv8.9.
    
    (cherry picked from commit a1e3cb45c676da0f5be0237a05e2af3542d62ace)

 gas/testsuite/gas/aarch64/cssc.d | 1 +
 include/opcode/aarch64.h         | 1 +
 2 files changed, 2 insertions(+)

commit 6e5770c1806dd5b29abbf6e3e27512a57b060108
Author:     Alan Modra <amodra@gmail.com>
AuthorDate: Mon Jun 17 15:51:13 2024 +0930
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Jun 29 00:03:28 2024 +0200

    PR31898 bug in processing DW_RLE_startx_endx
    
            PR 31898
            * dwarf.c (display_debug_rnglists_list): Correct fetch of "end"
            indexed address.  Remove excess parens.
    
    (cherry picked from commit 1b19566b18a1208f84b89029785a1e93a6544514)
    (cherry picked from commit 6c360d376628d49a1403e5566fb057a207fb5c32)

 binutils/dwarf.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

commit 6ce5e44c6d1039b5f31ede38884f52180b622338
Author:     Nick Clifton <nickc@redhat.com>
AuthorDate: Thu May 16 12:10:04 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Jun 29 00:02:09 2024 +0200

    aarch64: Remove asserts from operand qualifier decoders
    
      PR31595
    
    (cherry picked from commit bfda03eed33330bef89732c2484f40410b13a83d)

 binutils/testsuite/binutils-all/aarch64/illegal.d |  1 +
 binutils/testsuite/binutils-all/aarch64/illegal.s |  3 +
 include/opcode/aarch64.h                          |  3 +
 opcodes/aarch64-dis.c                             | 98 ++++++++++++++++++-----
 4 files changed, 87 insertions(+), 18 deletions(-)

commit ddd28247d0a8c42b75a0427d61f7b3fc56d920f3
Author:     Alan Modra <amodra@gmail.com>
AuthorDate: Mon Apr 8 08:16:20 2024 +0930
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sat Jun 29 00:01:31 2024 +0200

    Re: PR26978, Inconsistency for strong foo@v1 and weak foo@@v1
    
    Commit 726d7d1ecf opened a hole that allowed a u.i.link loop to be
    created, resulting in _bfd_generic_link_add_one_symbol never
    returning.  Fix that.  Note that the MIND case handles two types of
    redefinition.  For a new indirect symbol we'll have string non-NULL.
    For a new def, string will be NULL.  So moving the string comparison
    earlier would work.  However, we've already looked up inh in the first
    case so can dispense with name comparisons.  Either way, for a new def
    we'll get to the defweak test and possibly cycle.  Which is what we
    want here.
    
            PR 31615
            PR 26978
            * linker.c (_bfd_generic_link_add_one_symbol <MIND>): Test for
            exactly matching indirect symbols before cycling on a defweak.
    
    (cherry picked from commit 248b6326a49ed49e2f627d3bddbac514a074bac0)
    (cherry picked from commit 6224493e457e72b11818c87cdc112bdb0fee5f81)

 bfd/linker.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

commit 52783a1fcab002ec508f56bd4d0a822322f40b8a
Author:     John David Anglin <danglin@gcc.gnu.org>
AuthorDate: Mon Apr 1 23:00:52 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Apr 7 00:39:41 2024 +0200

    hppa: Implement PA 2.0 symbolic relocations for long displacements
    
    The PA 2.0 architecture introduced several new load and store
    instructions with long displacements.  These include floating
    point loads and stores for word mode, and integer and floating
    point loads and stores for double words.  Currently, ld does
    not correctly support symbolic relocations for these instructions.
    
    If these are used, ld applies the standard R_PARISC_DPREL14R
    relocation and corrupts the instruction.  This change uses
    bfd_hppa_insn2fmt to determine the correct relocation format.
    
    We need to check the computed displacement as the immediate
    value used in these instruction must be a multiple of 4 or 8
    depending on whether the access is for a word or double word.
    
    A misaligned offset can potentially occur if the symbol is not
    properly aligned or if $global$ (the global pointer) is not
    double word aligned.  $global$ is provided as a .data section
    start symbol.  The patch adjusts elf.sc and hppalinux.sh to
    align .data to a 8-byte boundary in non-shared and non-pie
    links.
    
    2024-04-01  John David Anglin  <danglin@gcc.gnu.org>
    
            PR ld/31503
    
    bfd/ChangeLog:
    
            * elf32-hppa.c (final_link_relocate): Output
    
    ld/ChangeLog:
    
            * emulparams/hppalinux.sh (DATA_SECTION_ALIGNMENT): Define.
            * scripttempl/elf.sc: Align .data section to DATA_SECTION_ALIGNMENT
            when relocating.
    
    (cherry picked from commit d125f9675372b1ae01ceb1893c06ccb27bc7bf22)

 bfd/elf32-hppa.c           | 46 +++++++++++++++++++++++++++++++++++++++++++++-
 ld/emulparams/hppalinux.sh |  1 +
 ld/scripttempl/elf.sc      |  2 +-
 3 files changed, 47 insertions(+), 2 deletions(-)

commit 050550e177b10140b1d9cbf1b388e6febdf14c81
Author:     Cui, Lili <lili.cui@intel.com>
AuthorDate: Wed Apr 3 11:10:58 2024 +0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Apr 7 00:39:09 2024 +0200

    x86/APX: Remove KEYLOCKER and SHA promotions from EVEX MAP4
    
    APX spec removed KEYLOCKER and SHA promotions from EVEX MAP4.
    https://www.intel.com/content/www/us/en/developer/articles/technical/advanced-performance-extensions-apx.html
    
    gas/ChangeLog:
    
            * NEWS: Mention that remove KEYLOCKER and SHA promotions from EVEX
            * MAP4.
            * testsuite/gas/i386/x86-64-apx-egpr-promote-inval.l: Removed KEYLOCKER
            * and SHA instructions.
            * testsuite/gas/i386/x86-64-apx-egpr-promote-inval.s: Ditto.
            * testsuite/gas/i386/x86-64-apx-evex-promoted-bad.d: Ditto.
            * testsuite/gas/i386/x86-64-apx-evex-promoted-bad.s: Ditto.
            * testsuite/gas/i386/x86-64-apx-evex-promoted-intel.d: Ditto.
            * testsuite/gas/i386/x86-64-apx-evex-promoted-wig.d: Ditto.
            * testsuite/gas/i386/x86-64-apx-evex-promoted.d: Ditto.
            * testsuite/gas/i386/x86-64-apx-evex-promoted.s: Ditto.
    
    opcodes/ChangeLog:
    
            * i386-dis-evex-prefix.h: Removed KEYLOCKER and SHA instructions.
            * i386-dis-evex.h: Ditto.
            * i386-opc.tbl: Ditto.
            * i386-tbl.h: Regenerated.
    
    (cherry picked from commit 884fb5373a1463b97845f15d94abf6aaa911347b)

 gas/NEWS                                           |   2 +
 .../gas/i386/x86-64-apx-evex-promoted-intel.d      |  46 ----
 gas/testsuite/gas/i386/x86-64-apx-evex-promoted.d  |  46 ----
 gas/testsuite/gas/i386/x86-64-apx-evex-promoted.s  |  46 ----
 opcodes/i386-dis-evex-prefix.h                     |  35 ---
 opcodes/i386-dis-evex.h                            |  18 +-
 opcodes/i386-dis.c                                 |   7 -
 opcodes/i386-opc.tbl                               |  18 --
 opcodes/i386-tbl.h                                 | 302 +++++----------------
 9 files changed, 74 insertions(+), 446 deletions(-)

commit 5a95afa9e5f70e5228543a57c9dd3c5abff3accd
Author:     Andrew Carlotti <andrew.carlotti@arm.com>
AuthorDate: Tue Feb 27 19:41:29 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Apr 7 00:38:24 2024 +0200

    aarch64: Remove B16B16, SVE2p1 and SME2p1
    
    Support for these extensions is broken and incomplete in the 2.42
    branch, with a number of syntax and opcode bugs.  This patch removes the
    flags and documentation, to avoid any further suggestion that this
    extension is fully and correctly supported.
    
    (cherry picked from commit d816fda3cbd83ff5c2700bf5f001d59fcaf75985)

 gas/NEWS                               | 13 ++++++-------
 gas/config/tc-aarch64.c                |  3 ---
 gas/doc/c-aarch64.texi                 |  6 ------
 gas/testsuite/gas/aarch64/bfloat16-1.d |  1 +
 gas/testsuite/gas/aarch64/sme2p1-1.d   |  1 +
 gas/testsuite/gas/aarch64/sve2p1-1.d   |  1 +
 6 files changed, 9 insertions(+), 16 deletions(-)

commit 0778c773133f2ce4e76db290742bceaad8390c98
Author:     Alan Modra <amodra@gmail.com>
AuthorDate: Sat Mar 9 19:48:48 2024 +1030
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Apr 7 00:37:53 2024 +0200

    Re: Move bfd_init to bfd.c
    
    Commit b1c95bc4dd73 cleared some bfd static variables, with bad
    results since bfd_set_error_program_name is often called before
    bfd_init.
    
            * bfd.c (bfd_init): Don't clear _bfd_error_program_name.
    
    (cherry picked from commit 0c947d990a92fd48ac0aa887df7e1e055fa0d680)
    (cherry picked from commit cb11047e34adf6d71689a828f3ee0b0d6a0f8938)

 bfd/bfd.c | 1 -
 1 file changed, 1 deletion(-)

commit ff843986fa4d2b08a22c0d97bc8c25c051755207
Author:     Alan Modra <amodra@gmail.com>
AuthorDate: Sat Mar 9 13:26:19 2024 +1030
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Apr 7 00:37:36 2024 +0200

    print cached error messages using _bfd_error_handler
    
            * format.c (print_warnmsg): Use _bfd_error_handler to print
            cached messages.
    
    (cherry picked from commit bd8d76258f86f93b20e6bd94f58033a49eb0d3ec)
    (cherry picked from commit 818bcf40efbee8784511ee8951c4c78328462582)

 bfd/format.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

commit 69a7b4c07284a15b73b27b651c6428e139a83235
Author:     Srinath Parvathaneni <srinath.parvathaneni@arm.com>
AuthorDate: Thu Feb 29 21:06:25 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Apr 7 00:37:13 2024 +0200

    aarch64: Fix the 2nd operand in gcsstr and gcssttr instructions.
    
    The assembler wrongly expects plain register name instead of
    memory-form 2nd operand for gcsstr and gcssttr instructions.
    This patch fixes the issue.
    
    (cherry picked from commit 831be495ef18c2df5964fbd5dc7c6c16fc275d13)

 gas/testsuite/gas/aarch64/gcs-1-bad.l | 48 +++++++++++++++++------------------
 gas/testsuite/gas/aarch64/gcs-1.d     | 48 +++++++++++++++++------------------
 gas/testsuite/gas/aarch64/gcs-1.s     |  2 +-
 opcodes/aarch64-tbl.h                 |  4 +--
 4 files changed, 51 insertions(+), 51 deletions(-)

commit 729c1bc13028fbc3075150fc5d425f41bb8b2d1a
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Thu Feb 15 15:00:31 2024 -0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Sun Apr 7 00:36:43 2024 +0200

    x86: Display -msse-check= default as none
    
    Display -msse-check= default as none for "as --help" since its default
    is none, not warning.
    
            PR gas/31389
            * config/tc-i386.c (md_show_usage): Change -msse-check= default
            to none.
    
    (cherry picked from commit 7a6a03c499ad899c1d1dd93beccbb62795feb1db)
    (cherry picked from commit 553c7f61b74badf91df484450944675efd9cd485)

 gas/config/tc-i386.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit fb7f89b9a2bb958b7d3c9f30b87b3619c66f3b24 (tag: gentoo/binutils-2.42-3)
Author:     Peter Bergner <bergner@linux.ibm.com>
AuthorDate: Fri Feb 9 10:51:30 2024 -0600
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Feb 16 00:50:29 2024 +0100

    PowerPC: Add support for Power11 options
    
    binutils/
            * doc/binutils.texi (PowerPC -M option): Mention power11 and pwr11.
    
    gas/
            * config/tc-ppc.c: (md_show_usage): Mention -mpower11 and -mpwr11.
            * doc/c-ppc.texi: Likewise.
    
    opcodes/
            * ppc-dis.c (ppc_opts): Add "power11" and "pwr11" entries.
            (powerpc_init_dialect): Default to "power11".
    
    (cherry picked from commit 4199cf1e152daab0460f08cc7dbd1f727ac3e4cc)
    (cherry picked from commit 4f7d1d2d5ec2fa5070dc24503acd2961c5993a71)

 binutils/doc/binutils.texi | 11 ++++++-----
 gas/config/tc-ppc.c        |  2 ++
 gas/doc/c-ppc.texi         |  3 +++
 opcodes/ppc-dis.c          | 12 +++++++++++-
 4 files changed, 22 insertions(+), 6 deletions(-)

commit 7225c68a4cbbd41f379a043e7db54060fd5540c1
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Sat Feb 3 14:32:17 2024 -0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Feb 16 00:50:03 2024 +0100

    x86-64: Add R_X86_64_CODE_6_GOTTPOFF
    
    For
    
            add     %reg1, name@gottpoff(%rip), %reg2
    
    and
    
            add     name@gottpoff(%rip), %reg1, %reg2
    
    add
    
     #define R_X86_64_CODE_6_GOTTPOFF               50
    
    if the instruction starts at 6 bytes before the relocation offset.
    They are similar to R_X86_64_GOTTPOFF.  Linker can covert GOTTPOFF to
    
            add     $name@tpoff, %reg1, %reg2
    
    Rewrite fx_tcbit, fx_tcbit2 and fx_tcbit3 usage to generate
    R_X86_64_GOTPCRELX, R_X86_64_REX_GOTPCRELX, R_X86_64_CODE_4_GOTPCRELX,
    R_X86_64_CODE_4_GOTTPOFF, R_X86_64_CODE_4_GOTPC32_TLSDESC and
    R_X86_64_CODE_6_GOTTPOFF.
    
    NB: There is no need to check BFD_RELOC_X86_64_CODE_4_GOTTPOFF in
    md_assemble since there is only BFD_RELOC_X86_64_GOTTPOFF at this
    stage, which will be converted to BFD_RELOC_X86_64_CODE_4_GOTTPOFF
    or BFD_RELOC_X86_64_CODE_6_GOTTPOFF in i386_validate_fix.
    
    5 relocations:
    
     #define R_X86_64_CODE_5_GOTPCRELX              46
     #define R_X86_64_CODE_5_GOTTPOFF               47
     #define R_X86_64_CODE_5_GOTPC32_TLSDESC        48
     #define R_X86_64_CODE_6_GOTPCRELX              49
     #define R_X86_64_CODE_6_GOTPC32_TLSDESC        51
    
    are added for completeness and they are unused.
    
    bfd/
    
            * elf64-x86-64.c (x86_64_elf_howto_table): Add
            R_X86_64_CODE_5_GOTPCRELX, R_X86_64_CODE_5_GOTTPOFF,
            R_X86_64_CODE_5_GOTPC32_TLSDESC, R_X86_64_CODE_6_GOTPCRELX,
            R_X86_64_CODE_6_GOTTPOFF and R_X86_64_CODE_6_GOTPC32_TLSDESC.
            (R_X86_64_standard): Updated.
            (x86_64_reloc_map): Add R_X86_64_CODE_5_GOTPCRELX,
            R_X86_64_CODE_5_GOTTPOFF, R_X86_64_CODE_5_GOTPC32_TLSDESC,
            R_X86_64_CODE_6_GOTPCRELX, R_X86_64_CODE_6_GOTTPOFF and
            R_X86_64_CODE_6_GOTPC32_TLSDESC.
            (elf_x86_64_check_tls_transition): Handle
            R_X86_64_CODE_6_GOTTPOFF.
            (elf_x86_64_tls_transition): Likewise.
            (elf_x86_64_scan_relocs): Handle R_X86_64_CODE_6_GOTTPOFF.
            Issue an error for R_X86_64_CODE_5_GOTPCRELX,
            R_X86_64_CODE_5_GOTTPOFF, R_X86_64_CODE_5_GOTPC32_TLSDESC,
            R_X86_64_CODE_6_GOTPCRELX and R_X86_64_CODE_6_GOTPC32_TLSDESC.
            (elf_x86_64_relocate_section): Handle R_X86_64_CODE_6_GOTTPOFF.
            * reloc.c (bfd_reloc_code_real): Add
            BFD_RELOC_X86_64_CODE_5_GOTPCRELX,
            BFD_RELOC_X86_64_CODE_5_GOTTPOFF,
            BFD_RELOC_X86_64_CODE_5_GOTPC32_TLSDESC,
            BFD_RELOC_X86_64_CODE_6_GOTPCRELX,
            BFD_RELOC_X86_64_CODE_6_GOTTPOFF and
            BFD_RELOC_X86_64_CODE_6_GOTPC32_TLSDESC.
            * bfd-in2.h: Regenerated.
            * libbfd.h: Likewise.
    
    elfcpp/
    
            * x86_64.h (R_X86_64_CODE_5_GOTPCRELX): New.
            (R_X86_64_CODE_5_GOTTPOFF): Likewise.
            (R_X86_64_CODE_5_GOTPC32_TLSDESC): Likewise.
            (R_X86_64_CODE_6_GOTPCRELX): Likewise.
            (R_X86_64_CODE_6_GOTTPOFF): Likewise.
            (R_X86_64_CODE_6_GOTPC32_TLSDESC): Likewise.
    
    gas/
    
            * config/tc-i386.c (tc_i386_fix_adjustable): Handle
            BFD_RELOC_X86_64_CODE_6_GOTTPOFF.
            (md_assemble): Don't check BFD_RELOC_X86_64_CODE_4_GOTTPOFF.
            Allow "add %reg1, foo@gottpoff(%rip), %reg2".
            (output_disp): Handle BFD_RELOC_X86_64_CODE_6_GOTTPOFF.  Rewrite
            setting fx_tcbitX bits for BFD_RELOC_X86_64_GOTTPOFF,
            BFD_RELOC_X86_64_GOTPC32_TLSDESC and BFD_RELOC_32_PCREL.
            (md_apply_fix): Handle BFD_RELOC_X86_64_CODE_6_GOTTPOFF.
            (i386_validate_fix): Rewrite fx_tcbitX bit checking for
            BFD_RELOC_X86_64_GOTTPOFF, BFD_RELOC_X86_64_GOTPC32_TLSDESC and
            BFD_RELOC_32_PCREL.
            (tc_gen_reloc): Handle BFD_RELOC_X86_64_CODE_6_GOTTPOFF.
            * testsuite/gas/i386/x86-64-gottpoff.d: Updated.
            * testsuite/gas/i386/x86-64-gottpoff.s: Add tests for
            "add %reg1, foo@gottpoff(%rip), %reg2" and
            "add foo@gottpoff(%rip), %reg, %reg2".
    
    gold/
    
            * x86_64.cc (Target_x86_64::optimize_tls_reloc): Handle
            R_X86_64_CODE_6_GOTTPOFF.
            (Target_x86_64::Scan::get_reference_flags): Likewise.
            (Target_x86_64::Scan::local): Likewise.
            (Target_x86_64::Scan::global): Likewise.
            (Target_x86_64::Relocate::relocate): Likewise.
            (Target_x86_64::Relocate::relocate_tls): Likewise.
            (Target_x86_64::Relocate::tls_ie_to_le): Handle.
            R_X86_64_CODE_6_GOTTPOFF.
            * testsuite/x86_64_ie_to_le.s: Add tests for
            "add %reg1, foo@gottpoff(%rip), %reg2" and
            "add foo@gottpoff(%rip), %reg, %reg2".
            * testsuite/x86_64_ie_to_le.sh: Updated.
    
    include/
    
            * elf/x86-64.h (elf_x86_64_reloc_type): Add
            R_X86_64_CODE_5_GOTPCRELX, R_X86_64_CODE_5_GOTTPOFF,
            R_X86_64_CODE_5_GOTPC32_TLSDESC, R_X86_64_CODE_6_GOTPCRELX,
            R_X86_64_CODE_6_GOTTPOFF and R_X86_64_CODE_6_GOTPC32_TLSDESC.
    
    ld/
    
            * testsuite/ld-x86-64/tlsbindesc.s: Add R_X86_64_CODE_6_GOTTPOFF
            tests.
            * testsuite/ld-x86-64/tlsbindesc.d: Updated.
            * testsuite/ld-x86-64/tlsbindesc.rd: Likewise.
    
    (cherry picked from commit 5bc71c2a6b8efb27089baa1fecded82be4f550a7)
    (cherry picked from commit 3c1f1c35784f4062455690329a0e7eaa61dd7c79)

 bfd/bfd-in2.h                            |   6 ++
 bfd/elf64-x86-64.c                       | 113 ++++++++++++++++++++++++++++++-
 bfd/libbfd.h                             |   6 ++
 bfd/reloc.c                              |  12 ++++
 elfcpp/x86_64.h                          |  24 +++++++
 gas/config/tc-i386.c                     | 102 ++++++++++++++++++++++------
 gas/testsuite/gas/i386/x86-64-gottpoff.d |   4 ++
 gas/testsuite/gas/i386/x86-64-gottpoff.s |  10 +++
 gold/testsuite/x86_64_ie_to_le.s         |   2 +
 gold/testsuite/x86_64_ie_to_le.sh        |   2 +
 gold/x86_64.cc                           |  47 +++++++++++--
 include/elf/x86-64.h                     |  20 ++++++
 ld/testsuite/ld-x86-64/tlsbindesc.dd     |  24 +++++++
 ld/testsuite/ld-x86-64/tlsbindesc.rd     |  36 +++++-----
 ld/testsuite/ld-x86-64/tlsbindesc.s      |   8 +++
 15 files changed, 371 insertions(+), 45 deletions(-)

commit 7406eab2e2aa78a9782159ca9b160d7b52d84a2d
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Feb 9 08:38:52 2024 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Feb 16 00:49:21 2024 +0100

    x86/APX: VROUND{P,S}{S,D} encodings require AVX512{F,VL}
    
    In eea4357967b6 ("x86/APX: VROUND{P,S}{S,D} can generally be encoded") I
    failed to add the AVX512* ISA dependency of the two new entries.
    
    (cherry picked from commit c426c8e307afa0c285bf63862be8c3f1e4ce2f1f)

 opcodes/i386-opc.tbl | 4 ++--
 opcodes/i386-tbl.h   | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

commit 18d066ff785ef7d0fdf36ffee8c9b795ffa4bbd5
Author:     Alan Modra <amodra@gmail.com>
AuthorDate: Fri Feb 9 07:04:22 2024 +1030
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Feb 16 00:49:01 2024 +0100

    PR31208, strip can break ELF alignment requirements
    
    In https://sourceware.org/pipermail/binutils/2007-August/053261.html
    (git commit 3dea8fca8b86) I disabled a then new linker feature that
    removed empty PT_LOAD headers in cases where a user specified program
    headers, and for objcopy.  This can be a problem for objcopy/strip and
    since objcopy operates on sections, any part of a PT_LOAD loading file
    contents not covered by a section will be omitted anyway.
    
            PR 31208
            * elf.c (_bfd_elf_map_sections_to_segments): Pass remove_empty_load
            as true to elf_modify_segment_map for objcopy/strip.
    
    (cherry picked from commit 7f26d260ef76a4cb2873a7815bef187005528c19)
    (cherry picked from commit 78f9e9faaa41d628170f6047c3e032a67f9e829d)

 bfd/elf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit e37ed79d180d6e26ca7e194322d224d5f6c95a2e
Author:     Richard W.M. Jones <rjones@redhat.com>
AuthorDate: Wed Jan 24 12:25:23 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Feb 16 00:48:42 2024 +0100

    PR 31283 windmc: Parse input correctly on big endian hosts
    
    On big endian hosts (eg. s390x) the windmc tool fails to parse even
    trivial files:
    
      $ cat test.mc
      ;
      $ ./binutils/windmc ./test.mc
      In test.mc at line 1: parser: syntax error.
      In test.mc at line 1: fatal: syntax error.
    
    The tool starts by reading the input as Windows CP1252 and then
    converting it internally into an array of UTF-16LE, which it then
    processes as an array of unsigned short (typedef unichar).
    
    There are lots of ways this is wrong, but in the specific case of big
    endian machines the little endian pairs of bytes are byte-swapped.
    
    For example, the ';' character in the input above is first converted
    to UTF16-LE byte sequence { 0x3b, 0x00 }, which is then cast to
    unsigned short.  On a big endian machine the first unichar appears to
    be 0x3b00.  The lexer is unable to recognize this as the comment
    character ((unichar)';') and so parsing fails.
    
    The simple fix is to convert the input to UTF-16BE on big endian
    machines (and do the reverse conversion when writing the output).
    
    Fixes: https://sourceware.org/bugzilla/show_bug.cgi?id=31283
    Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
    (cherry picked from commit 3f8f9745c75b333515f399fc2908ede2ed8014e9)
    (cherry picked from commit e19278f72bdc92e720b2d6c144ddedff5821b56c)

 binutils/config.in    |  15 ++++
 binutils/configure    | 230 +++++++++++++++++++++++++++++++++++++++++++++++++-
 binutils/configure.ac |   2 +
 binutils/winduni.c    |  16 +++-
 4 files changed, 259 insertions(+), 4 deletions(-)

commit a4e050ccb32e79d2d2372cb6d879138397b09ddc
Author:     Alan Modra <amodra@gmail.com>
AuthorDate: Tue Feb 6 12:59:06 2024 +1030
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Feb 16 00:48:12 2024 +0100

    Link x86-64 mark-plt-1.so with --no-as-needed
    
    Fixes
    FAIL: Build mark-plt-1.so
    where gcc is built with default --as-needed.
    
            * testsuite/ld-x86-64/x86-64.exp (Build mark-plt-1.so): Pass
            --no-as-needed.
    
    (cherry picked from commit 60c95acdaca94eca79b81ec75bfab97826cc0271)
    (cherry picked from commit b76b89831165cb28751d57d14de5bb6210938d82)

 ld/testsuite/ld-x86-64/x86-64.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 6517a975a9cc29d45a9a7f54797541caa8b312d3
Author:     Xi Ruoyao <xry111@xry111.site>
AuthorDate: Fri Feb 2 21:00:58 2024 +0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Feb 16 00:47:51 2024 +0100

    LoongArch: gas: Fix the types of symbols referred with %le_*_r in the symtab
    
    When a symbol is referred with %le_{hi20,lo12,add}_r, it's definitely a
    TLS symbol and we should set its type to TLS in the symtab.  Otherwise
    when building Perl with gcc-14 -flto, we get:
    
    /usr/bin/ld: PL_current_context: TLS definition in
    ./miniperl.ltrans0.ltrans.o section .tbss mismatches non-TLS reference
    in ./miniperl.ltrans1.ltrans.o
    
    A minimal reproducer:
    
        $ cat t1.s
        .section .tbss
        .globl x
        x: .word 0
        $ cat t2.s
        f:
          lu12i.w $a0, %le_hi20_r(x)
          add.d   $a0, $a0, $tp, %le_add_r(x)
          li.w    $a1, 1
          st.w    $a1, $a0, %le_lo12_r(x)
        $ gas/as-new t1.s -o t1.o
        $ gas/as-new t2.s -o t2.o
        $ ld/ld-new t1.o t2.o
        ld/ld-new: x: TLS definition in t1.o section .tbss mismatches
        non-TLS reference in t2.o
    
    Unfortunately this was undetected before Binutils-2.42 release because
    GCC < 14 does not use %le_*_r, and without LTO it's very rare to have a
    TLS LE definition and its reference in two different translation units.
    So this fix should be backported to Binutils-2.42 branch too.
    
    Signed-off-by: Xi Ruoyao <xry111@xry111.site>
    (cherry picked from commit 029e52bac7f3a6dd8b39f7f3d298b73174da806b)
    (cherry picked from commit e92e2d654bf3140f81466c6752581d6da8da1d67)

 gas/config/tc-loongarch.c                       | 3 +++
 gas/testsuite/gas/loongarch/tls_le_r_sym_type.d | 3 +++
 gas/testsuite/gas/loongarch/tls_le_r_sym_type.s | 6 ++++++
 3 files changed, 12 insertions(+)

commit cecab07443f9cd51c7de7cd2b643a4b1b81faa22
Author:     H.J. Lu <hjl.tools@gmail.com>
AuthorDate: Thu Feb 1 14:42:08 2024 -0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Feb 16 00:46:08 2024 +0100

    x86: Disallow instructions with length > 15 bytes
    
    It is a hard error when an instruction length exceeds the limit of 15
    bytes:
    
    [hjl@gnu-cfl-3 tmp]$ cat x.s
            .text
            xacquire lock addq $0x11223344, %fs:(,%eax)
    [hjl@gnu-cfl-3 tmp]$ gcc -c x.s
    x.s: Assembler messages:
    x.s:2: Warning: instruction length of 16 bytes exceeds the limit of 15
    [hjl@gnu-cfl-3 tmp]$ objdump -dw x.o
    
    x.o:     file format elf64-x86-64
    
    Disassembly of section .text:
    
    0000000000000000 <.text>:
       0:   64 67 f2 f0 48 81 04 05 00 00 00 00 44 33 22    xacquire lock (bad)
       f:   11                      .byte 0x11
    [hjl@gnu-cfl-3 tmp]$
    
    and
    
    [hjl@gnu-cfl-3 tmp]$ cat z.s
            addq $0xe0, %fs:0, %rdx
    [hjl@gnu-cfl-3 tmp]$ as -o z.o z.s
    z.s: Assembler messages:
    z.s:1: Warning: instruction length of 16 bytes exceeds the limit of 15
    [hjl@gnu-cfl-3 tmp]$ objdump -dw z.o
    
    z.o:     file format elf64-x86-64
    
    Disassembly of section .text:
    
    0000000000000000 <.text>:
       0:   64 62 f4 ec 18 81 04 25 00 00 00 00 e0 00 00    (bad)
            ...
    [hjl@gnu-cfl-3 pr31323]$
    
    Instructions with length > 15 bytes are always invalid.  It is quite easy
    to generate invalid instructions with APX now.  We should issue an error
    when instruction length exceeds the limit of 15 bytes.
    
            PR gas/31323
            * config/tc-i386.c (output_insn): Issue an error when instruction
            length exceeds the limit of 15 bytes.
            * testsuite/gas/i386/oversized16.l: Updated.
            * testsuite/gas/i386/oversized64.l: Likewise.
            * testsuite/gas/i386/x86-64-apx-inval.l: New file.
            * testsuite/gas/i386/x86-64-apx-inval.s: Likewise.
    
    (cherry picked from commit 46bd909328c3c8f3d6fc7a505b2fad1eea72d872)
    (cherry picked from commit 42cde237366398f6e318232f4ce080bef42f0371)

 gas/config/tc-i386.c                      |  4 ++--
 gas/testsuite/gas/i386/oversized16.l      | 30 +++++++++++++++---------------
 gas/testsuite/gas/i386/oversized64.l      | 30 +++++++++++++++---------------
 gas/testsuite/gas/i386/x86-64-apx-inval.l |  3 +++
 gas/testsuite/gas/i386/x86-64-apx-inval.s |  4 ++++
 gas/testsuite/gas/i386/x86-64.exp         |  1 +
 6 files changed, 40 insertions(+), 32 deletions(-)

commit 5e7105764676a90a5e3301d6aaf54381971ba494
Author:     Nick Clifton <nickc@redhat.com>
AuthorDate: Wed Jan 31 15:42:14 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Feb 16 00:45:35 2024 +0100

    Mention support for AMD/znver5 in GAS
    
    (cherry picked from commit ffb78e62bc1ebc0856ac08224d47846b3d9d52b5)

 gas/NEWS | 2 ++
 1 file changed, 2 insertions(+)

commit b81f215d43e6c97d465a4c552c390300cdc3593f
Author:     Georg-Johann Lay <avr@gjlay.de>
AuthorDate: Wed Jan 31 11:24:22 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Fri Feb 16 00:45:12 2024 +0100

    PR31124: Addendum: Remove PROVIDE of __flmap_init_label, __flmap.
    
    Supply these symbols as computed by the linker scripts, even when there are weak definitions.
    PR 31124
        * scripttempl/avr.sc (__flmap, __flmap_init_label): Remove PROVIDE.
    
    (cherry picked from commit 2fad36c3f553d103fcd0b75abd7a17da89b99864)

 ld/scripttempl/avr.sc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

commit d1722d7b99981639407eeb5837b8faec8e2cb5bd (tag: gentoo/binutils-2.42-2)
Author:     Indu Bhagat <indu.bhagat@oracle.com>
AuthorDate: Tue Jan 30 00:35:04 2024 -0800
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue Jan 30 17:29:04 2024 +0100

    gas: scfi: add missing ginsn-cofi-1 testcase files
    
    Previous commit a58dc5427f0 intended to bring the following two commits
    from master branch:
    
     91cdbed4d7b gas: scfi: untraceable control flow should be a hard error
     16cbeae1b27 x86: testsuite: scfi: adjust COFI testcase
    
    But missed adding the testcase files. Fix the failure by adding the
    missing files.
    
    gas/testsuite/
            * gas/scfi/x86_64/ginsn-cofi-1.l: New test.
            * gas/scfi/x86_64/ginsn-cofi-1.s: Likewise.
    
    (cherry picked from commit 48942a586ebc056bd059d3f63a5eed3a2fa46ab3)

 gas/testsuite/gas/scfi/x86_64/ginsn-cofi-1.l | 38 ++++++++++++++++++++++++++++
 gas/testsuite/gas/scfi/x86_64/ginsn-cofi-1.s | 20 +++++++++++++++
 2 files changed, 58 insertions(+)

commit 059825c4d9f9024788801e98aedb64f8dfdf9cb3
Author:     Alan Modra <amodra@gmail.com>
AuthorDate: Tue Jan 30 09:38:56 2024 +1030
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Tue Jan 30 17:28:21 2024 +0100

    PR31314, chew crashing on use of uninitialized value
    
    The "drop" call in wrap_comment already increments pc.  Defining DOCDD
    in proto.str is a warning fix.
    
            PR 31314
            * chew.c (wrap_comment): Don't increment pc.
            * proto.str (DOCDD): Define.
    
    (cherry picked from commit e175a2fc60cb9709c4461cdd8596ae05e529d67b)
    (cherry picked from commit 6d329337f6701fe090602c6f8ca373250eb91b82)

 bfd/doc/chew.c    | 2 --
 bfd/doc/proto.str | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)

commit b68b5b07b73c7ca07f551f90319669703ccbede3 (tag: gentoo/binutils-2.42-1)
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: Wed Feb 22 20:05:35 2023 +0100
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Jan 29 17:16:43 2024 +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>

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

commit cd531449740893c9d08e7110e03144a08a03e57b
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: Sat Jul 31 01:18:18 2021 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Jan 29 17:16:40 2024 +0100

    Gentoo: XFAIL 15 broken ld.gold tests
    
    It seems like either the tests or ld.gold in general cannot handle
    compilers built with --enable-default-pie. No fix yet, so let's ignore
    these test failures for the moment. For details see the linked bugs.
    
    Bug: https://bugs.gentoo.org/684046
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22755
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=27303

 gold/testsuite/Makefile.am |  6 ++++++
 gold/testsuite/Makefile.in | 16 ++++++++++++----
 2 files changed, 18 insertions(+), 4 deletions(-)

commit bc95c4f7765898935936e889bc8062f5a5f7804b
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: Mon Jan 29 17:16:37 2024 +0100

    Gentoo: Give also libctf optionally a gentoo-specific soversion

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

commit 936328451bc6cc46a3077a9b4eece4033edd5eec
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: Mon Jan 29 17:16:34 2024 +0100

    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 5f188453033e79a95dc330c86d58b9aec004ed63
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: Tue Jul 20 21:12:38 2021 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Jan 29 17:16:32 2024 +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>

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

commit 47a875bb7afc3673b8c9e14f57ede7867c6e7a04
Author:     Mike Frysinger <vapier@gentoo.org>
AuthorDate: Fri Jan 7 00:15:53 2005 -0500
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Jan 29 17:16:29 2024 +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)

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

commit 1f5ed3e896eb80e040028d5b81d84cd6ffc97721
Author:     Mike Frysinger <vapier@gentoo.org>
AuthorDate: Tue Jul 20 21:08:31 2021 +0200
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: Mon Jan 29 17:16:26 2024 +0100

    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 by Andreas K. Hüttel <dilfridge@gentoo.org>
    Ported to binutils 2.39 by WANG Xuerui <xen0n@gentoo.org>

 gold/options.cc | 33 +++++++++++++++++++++++++++++++++
 gold/options.h  |  7 +++++++
 ld/config.in    |  3 +++
 ld/configure    | 16 ++++++++++++++++
 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, 148 insertions(+)

commit 3f56050d62ee48df02cfba3304133e5caf79014d
Author:     Nick Clifton <nickc@redhat.com>
AuthorDate: Mon Jan 29 16:01:42 2024 +0000
Commit:     Nick Clifton <nickc@redhat.com>
CommitDate: Mon Jan 29 16:01:42 2024 +0000

    Set version number to 2.42.0 and re-enable development

 bfd/configure                         | 20 ++++++++++----------
 bfd/development.sh                    |  2 +-
 bfd/po/bfd.pot                        |  2 +-
 bfd/version.m4                        |  2 +-
 binutils/README-how-to-make-a-release |  4 ++--
 binutils/configure                    | 20 ++++++++++----------
 gas/configure                         | 20 ++++++++++----------
 gprof/configure                       | 20 ++++++++++----------
 ld/configure                          | 20 ++++++++++----------
 opcodes/configure                     | 20 ++++++++++----------
 10 files changed, 65 insertions(+), 65 deletions(-)
