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

  1. 24 Jul, 2017 2 commits
    • Tristan Gingold's avatar
      Bump version to 2.29 · dd9a28c0
      Tristan Gingold authored
      bfd/
      2017-07-24  Tristan Gingold  <gingold@adacore.com>
      
      	* version.m4: Bump version to 2.29
      	* configure: Regenerate.
      
      binutils/
      2017-07-24  Tristan Gingold  <gingold@adacore.com>
      
      	* configure: Regenerate.
      
      gas/
      2017-07-24  Tristan Gingold  <gingold@adacore.com>
      
      	* configure: Regenerate.
      
      gprof/
      2017-07-24  Tristan Gingold  <gingold@adacore.com>
      
      	* configure: Regenerate.
      
      ld/
      2017-07-24  Tristan Gingold  <gingold@adacore.com>
      
      	* configure: Regenerate.
      
      opcodes/
      2017-07-24  Tristan Gingold  <gingold@adacore.com>
      
      	* configure: Regenerate.
      dd9a28c0
    • GDB Administrator's avatar
      Automatic date update in version.in · acbdf0a2
      GDB Administrator authored
      acbdf0a2
  2. 23 Jul, 2017 2 commits
    • Alan Modra's avatar
      Correct eh_frame info for __glink_PLTresolve · 63aec83e
      Alan Modra authored
      My PPC64_OPT_LOCALENTRY patch of June 1, git commit f378ab09, and
      the later gold change, git commit 7ee7ff70, added an insn in
      __glink_PLTresolve which needs a corresponding adjustment in the
      eh_frame info for asynchronous exceptions to unwind correctly.
      
      It would have been OK for both ABIs to use +5 for the advance before
      restore of LR, since we can put the DW_CFA_restore_extended on any
      insn after the actual restore and before the r12/r0 copy is clobbered,
      but it's slightly better to delay as much as possible.  There are
      then more addresses where fewer CFA program insns are executed.
      
      bfd/
      	* elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
      	restore of LR.
      gold/
      	* powerpc.cc (glink_eh_frame_fde_64v2): Correct advance to
      	restore of LR.
      	(glink_eh_frame_fde_64v1): Advance to restore of LR at latest
      	possible insn.
      63aec83e
    • GDB Administrator's avatar
      Automatic date update in version.in · 545c56b8
      GDB Administrator authored
      545c56b8
  3. 22 Jul, 2017 1 commit
  4. 21 Jul, 2017 2 commits
  5. 20 Jul, 2017 2 commits
  6. 19 Jul, 2017 1 commit
  7. 18 Jul, 2017 2 commits
    • Nick Clifton's avatar
      Update translations. · a870bd45
      Nick Clifton authored
      bfd	* po/es.po: Updated translation.
      	* po/fi.po: Likewise.
      	* po/fr.po: Likewise.
      	* po/id.po: Likewise.
      	* po/ja.po: Likewise.
      	* po/ro.po: Likewise.
      	* po/ru.po: Likewise.
      	* po/sr.po: Likewise.
      	* po/sv.po: Likewise.
      	* po/tr.po: Likewise.
      	* po/uk.po: Likewise.
      	* po/vi.po: Likewise.
      	* po/zh_CN.po: Likewise.
      
      	* po/hr.po: New translation.
      	* configure.ac (ALL_LINGUAS): Add hr.
      	* configure: Regenerate.
      
      gold	* po/es.po: Updated translation.
      	* po/fi.po: Likewise.
      	* po/fr.po: Likewise.
      	* po/id.po: Likewise.
      	* po/it.po: Likewise.
      	* po/vi.po: Likewise.
      	* po/zh_CN.po: Likewise.
      
      	* po/ja.po: New translation.
      	* po/sv.po: Likewise.
      	* po/uk.po: Likewise.
      
      ld	* po/bg.po: Updated translation.
      	* po/da.po: Likewise.
      	* po/es.po: Likewise.
      	* po/fi.po: Likewise.
      	* po/fr.po: Likewise.
      	* po/id.po: Likewise.
      	* po/it.po: Likewise.
      	* po/ja.po: Likewise.
      	* po/tr.po: Likewise.
      	* po/uk.po: Likewise.
      	* po/vi.po: Likewise.
      	* po/zh_CN.po: Likewise.
      	* po/zh_TW.po: Likewise.
      
      	* po/ru.po: New translation.
      	* po/de.po: Likewise.
      	* configure.ac (ALL_LINGUAS): Add ru and de.
      	* configure: Regenerate.
      
      binutils* po/bg.po: Updated translation.
      	* po/ca.po: Likewise.
      	* po/da.po: Likewise.
      	* po/es.po: Likewise.
      	* po/fi.po: Likewise.
      	* po/fr.po: Likewise.
      	* po/hr.po: Likewise.
      	* po/id.po: Likewise.
      	* po/it.po: Likewise.
      	* po/ja.po: Likewise.
      	* po/ro.po: Likewise.
      	* po/ru.po: Likewise.
      	* po/sk.po: Likewise.
      	* po/sr.po: Likewise.
      	* po/sv.po: Likewise.
      	* po/tr.po: Likewise.
      	* po/uk.po: Likewise.
      	* po/vi.po: Likewise.
      	* po/zh_CN.po: Likewise.
      	* po/zh_TW.po: Likewise.
      
      gas	* po/es.po: Updated translation.
      	* po/fi.po: Likewise.
      	* po/fr.po: Likewise.
      	* po/id.po: Likewise.
      	* po/ja.po: Likewise.
      	* po/ru.po: Likewise.
      	* po/sv.po: Likewise.
      	* po/tr.po: Likewise.
      	* po/uk.po: Likewise.
      	* po/zh_CN.po: Likewise.
      
      gprof	* po/bg.po: Updated translation.
      	* po/da.po: Likewise.
      	* po/de.po: Likewise.
      	* po/eo.po: Likewise.
      	* po/es.po: Likewise.
      	* po/fi.po: Likewise.
      	* po/fr.po: Likewise.
      	* po/ga.po: Likewise.
      	* po/hu.po: Likewise.
      	* po/id.po: Likewise.
      	* po/it.po: Likewise.
      	* po/ja.po: Likewise.
      	* po/ms.po: Likewise.
      	* po/nl.po: Likewise.
      	* po/pt_BR.po: Likewise.
      	* po/ro.po: Likewise.
      	* po/ru.po: Likewise.
      	* po/sr.po: Likewise.
      	* po/sv.po: Likewise.
      	* po/tr.po: Likewise.
      	* po/uk.po: Likewise.
      	* po/vi.po: Likewise.
      
      opcodes	* po/da.po: Updated translation.
      	* po/de.po: Likewise.
      	* po/es.po: Likewise.
      	* po/fi.po: Likewise.
      	* po/fr.po: Likewise.
      	* po/id.po: Likewise.
      	* po/it.po: Likewise.
      	* po/nl.po: Likewise.
      	* po/pt_BR.po: Likewise.
      	* po/ro.po: Likewise.
      	* po/sv.po: Likewise.
      	* po/tr.po: Likewise.
      	* po/uk.po: Likewise.
      	* po/vi.po: Likewise.
      	* po/zh_CN.po: Likewise.
      a870bd45
    • GDB Administrator's avatar
      Automatic date update in version.in · daf562ca
      GDB Administrator authored
      daf562ca
  8. 17 Jul, 2017 4 commits
    • H.J. Lu's avatar
      Support single digit GCC version · f2e7964c
      H.J. Lu authored
      On Fedora 26, "g++ -dumpversion" displays "7", instead of "7.1.1".
      Update selective.exp to support single digit GCC version.  Also
      remove duplicated [4-9] version check.
      
      	* testsuite/ld-selective/selective.exp: Support single digit
      	GCC version.
      
      (cherry picked from commit 61a0857c)
      f2e7964c
    • H.J. Lu's avatar
      x86-64: Limit PIC check to shared library build · 89f512d3
      H.J. Lu authored
      When building an executable, undefined symbols are error and undefined
      weak symbols are resolved to zero.  We only need to check PIC for
      building a shared library.
      
      bfd/
      
      	PR ld/21782
      	* elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
      	to shared library.
      
      ld/
      
      	PR ld/21782
      	* testsuite/ld-x86-64/pie3-nacl.d: New file.
      	* testsuite/ld-x86-64/pie3.d: Likewise.
      	* testsuite/ld-x86-64/pie3.s: Likewise.
      	* testsuite/ld-x86-64/x86-64.exp: Run pie3 and pie3-nacl.
      
      (cherry picked from commit c5bb8910)
      89f512d3
    • Nick Clifton's avatar
      Correct previous fix to ar, so that it now only comaplains about a lack of... · 274cdf7e
      Nick Clifton authored
      Correct previous fix to ar, so that it now only comaplains about a lack of input files if not running in MRI mode.
      
      	PR 21433
      	* ar.c (main): Skip check for no files on the command line when
      	running in MRI mode.
      274cdf7e
    • GDB Administrator's avatar
      Automatic date update in version.in · 7764a81a
      GDB Administrator authored
      7764a81a
  9. 16 Jul, 2017 2 commits
    • Alan Modra's avatar
      __tls_get_addr_opt GOT entries · 442ae604
      Alan Modra authored
      My 2017-01-24 patch (commit f0158f44) wrongly applied an optimization
      of GOT entries for the __tls_get_addr_opt stub, to shared libraries.
      
      When the TLS segment layout is known, as it is for the executable and
      shared libraries loaded at initial program start, powerpc supports a
      __tls_get_addr optimization.  On the first call to __tls_get_addr for
      a given __tls_index GOT entry, the DTPMOD word is set to zero and the
      DTPREL word to the thread pointer offset to the thread variable.  This
      allows the __tls_get_addr_opt stub to return that value immediately
      without making a call into glibc for any subsequent __tls_get_addr
      calls using that __tls_index GOT entry.
      
      That's all fine, but I thought I'd be clever and when the thread
      variable is local, set up the GOT entry as if __tls_get_addr had
      already been called.  Which is good only for the executable, since ld
      cannot know the TLS layout for shared libraries.
      
      Of course, if this only applies to executables there isn't much point
      to the optimization.  Normally, GD and LD code in an executable will
      be converted to IE or LE, losing the __tls_get_addr call.  So the only
      time it will trigger is with --no-tls-optimize.  Thus, revert all
      support.
      
      	* elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
      	__tls_index GOT entries when using __tls_get_addr_opt stub.
      	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
      442ae604
    • GDB Administrator's avatar
      Automatic date update in version.in · cc6755c8
      GDB Administrator authored
      cc6755c8
  10. 15 Jul, 2017 1 commit
  11. 14 Jul, 2017 2 commits
    • Maciej W. Rozycki's avatar
      PR ld/21529: Use a linker script to limit output with the test case · 991a4012
      Maciej W. Rozycki authored
      Complement commit d9409498 ("Add a testcase for PR ld/21529") and
      use a linker script to prevent an inter-segment gap arranged by the
      default linker script associated with some targets such as `rx-elf':
      
      $ ld -e main -o tmpdir/dump-elf tmpdir/pr21529.o
      $ readelf -l tmpdir/dump-elf
      Elf file type is EXEC (Executable file)
      Entry point 0x10000004
      There are 2 program headers, starting at offset 52
      
      Program Headers:
        Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
        LOAD           0x001000 0x10000000 0x10000000 0x00008 0x00008 R E 0x1000
        LOAD           0x001ffc 0xbffffffc 0xbffffffc 0x00004 0x00004 RW  0x1000
      
       Section to Segment mapping:
        Segment Sections...
         00     .text
         01     .stack
      $
      
      and converted to padding with the use of the binary BFD for output from
      producing unreasonably large files.
      
      	ld/
      	* testsuite/ld-unique/pr21529.ld: New test linker script.
      	* testsuite/ld-unique/pr21529.d: Use it.
      
      (cherry picked from commit 211b0bed)
      991a4012
    • GDB Administrator's avatar
      Automatic date update in version.in · 3ba5311c
      GDB Administrator authored
      3ba5311c
  12. 13 Jul, 2017 1 commit
  13. 12 Jul, 2017 3 commits
    • Han Shen's avatar
      Fixing for PR gold/21491 - Errata workaround can produce broken images. · d3dc405d
      Han Shen authored
      The problem is caused by the fact that gold is relocating the stubs
      for an entire output section when it processes the relocations for a
      particular input section that happened to be designated as the stub
      table "owner". The Relocate_task for that input section may or may not
      run before the Relocate_task for another input section that contains
      the code that needs the erratum fix, but doesn't "own" the stub
      table. If it runs before (or might even race with) that other task, it
      ends up with a copy of the unrelocated original instruction.
      
      In other words - when calling fix_errata() from
      do_relocate_sections(), gold is going through the list of errata stubs
      that are associated only with that object. This routine updates the
      stored original instruction and replaces it in the output view with a
      branch to the stub. Later, as gold is going through the object file's
      input sections, it then checks for stub tables "owned" by each input
      section, and writes out all the stubs from that stub table, regardless
      of what object file each stub is associated with.
      
      Fixed by relocating the erratum stub only after the corresponding
      errata spot is fixed. That is to have fix_errata() call
      Stub_table::relocate_erratum_stub() for each stub.
      
      gold/ChangeLog
      2017-07-06  Han Shen  <shenhan@google.com>
      
      	PR gold/21491
      
      	* aarch64.cc (Erratum_stub::invalidate_erratum_stub): New method.
      	(Erratum_stub::is_invalidated_erratum_stub): New method.
      	(Stub_table::relocate_reloc_stub): Renamed from "relocate_stub".
      	(Stub_table::relocate_reloc_stubs): Renamed from "relocate_stubs".
      	(Stub_table::relocate_erratum_stub): New method.
      	(AArch64_relobj::fix_errata_and_relocate_erratum_stubs): Renamed from
      	"fix_errata".
      	(Target_aarch64::relocate_reloc_stub): Renamed from "relocate_stub".
      d3dc405d
    • Nick Clifton's avatar
      Fix compile time warnings when using gcc 7.1.1 · 6be20bda
      Nick Clifton authored
      bfd	* elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
      	plt_name buffer.
      	(elf_xtensa_get_gotplt_section): Increase length of got_name
      	buffer.
      	* mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
      	default return of FALSE.
      	* mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
      	default return of FALSE.
      
      binutils * dwarf.c (dwarf_vmatoa_1): Do not pass a NULL string pointer to
      	sprintf.
      	* srconv.c (walk_tree_type): Initialise the spare field of the
      	IT_dty structure.
      
      gas	* config/tc-pru.c (md_assemble): Add continue statement after
      	handling 'E' operand character.
      	* config/tc-v850.c (md_assemble): Initialise the 'insn' variable.
      6be20bda
    • GDB Administrator's avatar
      Automatic date update in version.in · 212cef53
      GDB Administrator authored
      212cef53
  14. 11 Jul, 2017 2 commits
  15. 10 Jul, 2017 2 commits
  16. 09 Jul, 2017 1 commit
  17. 08 Jul, 2017 1 commit
  18. 07 Jul, 2017 7 commits
    • Maciej W. Rozycki's avatar
      MIPS/LD: Fix a segfault from ELF `e_flags' access with non-ELF output BFD · 14106172
      Maciej W. Rozycki authored
      Fix a commit 861fb55a ("Defer allocation of R_MIPS_REL32 GOT
      slots"), <https://sourceware.org/ml/binutils/2008-08/msg00096.html>,
      regression and a more recent:
      
      FAIL: ld-unique/pr21529
      
      new LD test case failure, observed with all the relevant MIPS targets
      whenever the linker is invoked with one or more ELF inputs and the
      output format set to `binary'.
      
      The culprit is a segmentation fault caused in `mips_before_allocation'
      by a null pointer dereference, where an attempt is made to access the
      ELF file header's `e_flags' member, for the purpose of determining
      whether to produce a PLT and copy relocations, without first checking
      that the output BFD is ELF.  The `e_flags' member is stored in BFD's
      private data pointed to by `tdep', which in the case of the `binary' BFD
      is null, causing the segmentation fault.  With other non-ELF BFDs such
      as SREC `tdep' is not null and consequently no crash may happen and in
      that case random data will be interpreted as it was `e_flags'.
      
      Disable the access to `e_flags' then and all the associated checks and
      consequently never produce a PLT and copy relocations if output is not a
      MIPS ELF BFD, matching `_bfd_mips_elf_merge_private_bfd_data' that does
      not process `e_flags' in that case either and therefore does not let us
      decide here anyway if all the input objects included in the link are
      suitable for use with a PLT and copy relocations.
      
      	ld/
      	* emultempl/mipself.em (mips_before_allocation): Avoid ELF
      	processing if not MIPS ELF.
      	* testsuite/ld-mips-elf/binary.d: New test.
      	* testsuite/ld-mips-elf/binary.ld: New test linker script.
      	* testsuite/ld-mips-elf/binary.s: New test source.
      	* testsuite/ld-mips-elf/mips-elf.exp: Run the new test.
      
      (cherry picked from commit e54cb31a)
      14106172
    • Alan Modra's avatar
      Make ppc476 testcases more robust · 9cbb5896
      Alan Modra authored
      	* testsuite/ld-powerpc/ppc476-shared.lnk: Align .bss.
      	* testsuite/ld-powerpc/ppc476-shared.d: Adjust.
      	* testsuite/ld-powerpc/ppc476-shared2.d: Adjust.
      9cbb5896
    • Alan Modra's avatar
      Move print_insn_XXX to an opcodes internal header, again · 8fb18c19
      Alan Modra authored
      88c1242d changed some generated files rather than the source.
      
      	* cgen-dis.in: Include disassemble.h, not dis-asm.h.
      	* m32c-dis.c: Regenerate.
      	* mep-dis.c: Regenerate.
      8fb18c19
    • Alan Modra's avatar
      Add some missing xcoff support · 6b6161a4
      Alan Modra authored
      	* coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
      6b6161a4
    • Alan Modra's avatar
      Apply ld/Makefile.in patch to the correct file · 96d6939e
      Alan Modra authored
      Makefile.in is generated.
      
      	* Makefile.am (eelf64_s390.c): Depend on emultempl/s390.em.
      96d6939e
    • Alan Modra's avatar
      Another _doprnt fix for %L handling · 0ae7fdc4
      Alan Modra authored
      	* bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
      	as long long.  Move code replacing "ll" with "I64", and simplify.
      0ae7fdc4
    • GDB Administrator's avatar
      Automatic date update in version.in · 85589a8b
      GDB Administrator authored
      85589a8b
  19. 06 Jul, 2017 1 commit
    • H.J. Lu's avatar
      Convert 'L' to 'l' when setting wide_width to 1 · 9366af32
      H.J. Lu authored
      When setting wide_width to 1, convert 'L' to 'l'.  Otherwise, %Lx/%Lu/%Ld
      will be passed to fprintf which will treat the argument as long long.
      
      	* bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
      	to 1.
      
      (cherry picked from commit a0b7b105)
      9366af32
  20. 05 Jul, 2017 1 commit
    • H.J. Lu's avatar
      Fix build with GCC 4.2 · 23f43628
      H.J. Lu authored
      Fix GCC 4.2 warnings like:
      
      cc1: warnings being treated as errors
      binutils-gdb/bfd/dwarf2.c:1844: warning: declaration of ‘time’ shadows a global declaration
      /usr/include/time.h:187: warning: shadowed declaration is here
      binutils-gdb/bfd/dwarf2.c: In function ‘line_info_add_file_name’:
      binutils-gdb/bfd/dwarf2.c:1854: warning: declaration of ‘time’ shadows a global declaration
      /usr/include/time.h:187: warning: shadowed declaration is here
      
      bfd/
      
      	* dwarf2.c (line_info_add_include_dir_stub): Replace time with
      	xtime.
      	(line_info_add_file_name): Likewise.
      	(decode_line_info): Likewise.
      
      binutils/
      
      	* dwarf.c (display_debug_names): Replace index with xindex.
      
      (cherry picked from commit 1d827a72)
      23f43628