and though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here

  1. 29 Mar, 2018 2 commits
  2. 28 Mar, 2018 4 commits
    • Cary Coutant's avatar
      Fix case where IR file provides symbol visibility but replacement file does not. · 330b90b5
      Cary Coutant authored
      In PR 22868, two IR files provide conflicting visibility for a symbol.
      When a def with PROTECTED visibility is seen after a def with DEFAULT
      visibility, gold does not override the visibility. Later, if the
      replacement object define the symbol with DEFAULT visibility, the symbol
      remains DEFAULT. This was caused by a recent change to allow multiply-defined
      absolute symbols, combined with the fact that the plugin framework was using
      SHN_ABS as the section index for placeholder symbols. The solution is to
      use a real (but arbitrary) section index.
      
      gold/
      	PR gold/22868
      	* plugin.cc (Sized_pluginobj::do_add_symbols): Use a real section
      	index instead of SHN_ABS for defined symbols.
      	* testsuite/Makefile.am (plugin_pr22868): New test case.
      	* testsuite/Makefile.in: Regenerate
      	* testsuite/plugin_pr22868.sh: New test script.
      	* testsuite/plugin_pr22868_a.c: New source file.
      	* testsuite/plugin_pr22868_b.c: New source file.
      330b90b5
    • Eric Botcazou's avatar
      PR ld/22972 on SPARC. · 99181cca
      Eric Botcazou authored
      This is a regression for the corner case of a hidden symbol in a PIC/PIE
      binary which is subject to both a new-style GOTDATA relocation and an
      old-style GOT relocation.  In this case, depending  on the link order,
      the R_SPARC_RELATIVE dynamic relocation for the GOT slot needed because
      of the old-style relocation can be replaced with R_SPARC_NONE coming
      from the GOTDATA relocation.
      
      The fix simply records whether an old-style GOT relocation is seen for a
      symbol and prevents the R_SPARC_NONE from being generated in this case.
      
      bfd/
      	* elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
      	has_old_style_got_reloc.
      	(_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
      	relocations.  Fix a couple of long lines.
      	(_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
      	a R_SPARC_NONE for the GOT slot if the symbol is also subject to
      	old-style GOT relocations.
      ld/
      	* testsuite/ld-sparc/sparc.exp: Add test for mixed GOTDATA/GOT relocs.
      	* testsuite/ld-sparc/gotop-hidden.c: New file.
      	* testsuite/ld-sparc/got-hidden32.s: Likewise.
      	* testsuite/ld-sparc/got-hidden64.s: Likewise.
      	* testsuite/ld-sparc/pass.out: Likewise.
      99181cca
    • Roland McGrath's avatar
      gold/testsuite: Fix bad regexp in split_x86_64.sh · f14da278
      Roland McGrath authored
      gold/
      	* testsuite/split_x86_64.sh: Fix bad regexp.
      f14da278
    • GDB Administrator's avatar
      Automatic date update in version.in · 1377b6a9
      GDB Administrator authored
      1377b6a9
  3. 27 Mar, 2018 1 commit
  4. 26 Mar, 2018 2 commits
    • H.J. Lu's avatar
      x86-64: Add ENDBR64 to the TLSDESC PLT entry · 963e88c6
      H.J. Lu authored
      The TLSDESC entry in a lazy procedure linkage table is called indirectly
      with "callq *(%rax)".  This patch adds an ENDBR64 to support indirect
      branch tracking in Intel CET.  The TLSDESC PLT entry now looks like:
      
      0xf3, 0x0f, 0x1e, 0xfa,  /* endbr64             */
      0xff, 0x35, 8, 0, 0, 0,  /* pushq GOT+8(%rip)   */
      0xff, 0x25, 16, 0, 0, 0  /* jmpq *GOT+TDG(%rip)  */
      
      The BND prefix isn't needed since MPX isn't used for TLSDESC.
      
      bfd/
      
      	PR ld/23000
      	* elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
      	ENDBR64 to the TLSDESC PLT entry.
      
      ld/
      
      	PR ld/23000
      	* testsuite/ld-x86-64/tlsdesc.pd: Updated.
      
      (cherry picked from commit bf54968b)
      963e88c6
    • GDB Administrator's avatar
      Automatic date update in version.in · 5423c6f6
      GDB Administrator authored
      5423c6f6
  5. 25 Mar, 2018 1 commit
  6. 24 Mar, 2018 1 commit
  7. 23 Mar, 2018 1 commit
  8. 22 Mar, 2018 1 commit
  9. 21 Mar, 2018 4 commits
    • Alan Modra's avatar
      PowerPC64 debian bug 886264, out-of-line save/restore functions · d66deb71
      Alan Modra authored
      This calculation in relocate_section
      
      	      if (stub_entry->stub_type == ppc_stub_save_res)
      		relocation += (stub_sec->output_offset
      			       + stub_sec->output_section->vma
      			       + stub_sec->size - htab->sfpr->size
      			       - htab->sfpr->output_offset
      			       - htab->sfpr->output_section->vma);
      
      to adjust from the original out-of-line save/restore function address
      in sfpr to a copy at the end of stub_sec goes wrong when stub_sec is
      padded, because the copy is no longer at the end of stub_sec.  The
      solution is to pad before copying sfpr, so the copy is always at the
      end of stub_sec.
      
      	* elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
      	sfpr size added before defining alias symbols.
      	(ppc64_elf_build_stubs): Add stub section padding before
      	copying sfpr contents and defining save/restore alias symbols.
      
      (cherry picked from commit 7dda8d3c)
      d66deb71
    • Alan Modra's avatar
      Really remove unnecessary power9 group terminating nop · 345da48b
      Alan Modra authored
      Oops, not tested well enough.  -mpower9 sets all the PPC_OPCODE_POWERn
      for n <= 9.
      
      	* config/tc-ppc.c (ppc_handle_align): Correct last patch.  Really
      	don't emit a group terminating nop for power9.  Simplify cpu
      	tests.
      
      (cherry picked from commit 6a7524c6)
      345da48b
    • Alan Modra's avatar
      Remove unnecessary power9 group terminating nop · 10d2f8bc
      Alan Modra authored
      Power9 doesn't have a group terminating nop, so we may as well emit a
      normal nop for power9.  Not that it matters a great deal, I believe
      ori 2,2,0 will be treated exactly as ori 0,0,0 by the hardware.
      
      	* config/tc-ppc.c (ppc_handle_align): Don't emit a group
      	terminating nop for power9.
      
      (cherry picked from commit 3fea0c3b)
      10d2f8bc
    • GDB Administrator's avatar
      Automatic date update in version.in · e93478c6
      GDB Administrator authored
      e93478c6
  10. 20 Mar, 2018 3 commits
  11. 19 Mar, 2018 3 commits
    • Alan Modra's avatar
      PR22836 testcases · cd2de608
      Alan Modra authored
      	PR 22836
      	* testsuite/ld-elf/pr22836-1.s: New file.
      	* testsuite/ld-elf/pr22836-1a.d: Likewise.
      	* testsuite/ld-elf/pr22836-1b.d: Likewise.
      
      (cherry picked from commit 60f763ee)
      cd2de608
    • Alan Modra's avatar
      PR22836, "-r -s" doesn't work with -g3 using GCC 7 · d957f81c
      Alan Modra authored
      This fixes the case where all of a group is removed with ld -r, the
      situation in the PR, and failures where part of a group is removed
      that contain relocs.
      
      bfd/
      	PR 22836
      	* elf.c (_bfd_elf_fixup_group_sections): Account for removed
      	relocation sections.  If size reduces to just the flag word,
      	remove that too and mark with SEC_EXCLUDE.
      	* elflink.c (bfd_elf_final_link): Strip empty group sections.
      binutils/
      	* testsuite/binutils-all/group-7.s,
      	* testsuite/binutils-all/group-7a.d,
      	* testsuite/binutils-all/group-7b.d,
      	* testsuite/binutils-all/group-7c.d: New tests.
      	* testsuite/binutils-all/objcopy.exp: Run them.
      ld/
      	* testsuite/ld-elf/pr22836-2.d,
      	* testsuite/ld-elf/pr22836-2.s: New test.
      
      (cherry picked from commit 6e5e9d58)
      d957f81c
    • GDB Administrator's avatar
      Automatic date update in version.in · 00a6bd6b
      GDB Administrator authored
      00a6bd6b
  12. 18 Mar, 2018 1 commit
  13. 17 Mar, 2018 1 commit
  14. 16 Mar, 2018 2 commits
    • Thomas Preud'homme's avatar
      [ARM] Fix bxns mask · 54ef1671
      Thomas Preud'homme authored
      Bit 7 of BXNS is a fixed bit which distinguish it from BLXNS. Yet it is
      not set in the disassembler entry mask. This commit fixes that.
      
      2018-03-16  Thomas Preud'homme  <thomas.preudhomme@arm.com>
      
      	Backport from mainline
      	2018-02-19  Thomas Preud'homme  <thomas.preudhomme@arm.com>
      
      opcodes/
      	* arm-dis.c (thumb_opcodes): Fix BXNS mask.
      54ef1671
    • GDB Administrator's avatar
      Automatic date update in version.in · 2412fb43
      GDB Administrator authored
      2412fb43
  15. 15 Mar, 2018 1 commit
  16. 14 Mar, 2018 2 commits
    • H.J. Lu's avatar
      GC: Also check the local debug definition section · da8c5cfc
      H.J. Lu authored
      Extend
      
      commit b7c871ed
      Author: H.J. Lu <hjl.tools@gmail.com>
      Date:   Wed May 17 07:57:15 2017 -0700
      
          Mark debug sections referenced by kept debug sections
      
      to handle the local debug definition section.
      
      bfd/
      
      	PR ld/20882
      	* elflink.c (elf_gc_mark_debug_section): Also check the local
      	debug definition section.
      
      ld/
      
      	PR ld/20882
      	* testsuite/ld-gc/pr20882.d: Also dump and check .debug_abbrev
      	section.
      	* testsuite/ld-gc/pr20882b.s: Add .debug_abbrev section.
      
      (cherry picked from commit 9e223787)
      da8c5cfc
    • GDB Administrator's avatar
      Automatic date update in version.in · 427226ba
      GDB Administrator authored
      427226ba
  17. 13 Mar, 2018 1 commit
  18. 12 Mar, 2018 1 commit
  19. 11 Mar, 2018 1 commit
  20. 10 Mar, 2018 1 commit
  21. 09 Mar, 2018 1 commit
  22. 08 Mar, 2018 1 commit
  23. 07 Mar, 2018 1 commit
  24. 06 Mar, 2018 1 commit
  25. 05 Mar, 2018 1 commit
  26. 04 Mar, 2018 1 commit