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

  1. 15 Sep, 2017 2 commits
  2. 14 Sep, 2017 6 commits
  3. 13 Sep, 2017 1 commit
  4. 12 Sep, 2017 1 commit
  5. 11 Sep, 2017 1 commit
  6. 10 Sep, 2017 3 commits
    • Nick Clifton's avatar
      Import fix from mainline that fixes buffer overrun errors when parsing corrupt... · 4c730770
      Nick Clifton authored
      Import fix from mainline that fixes buffer overrun errors when parsing corrupt DWARF debug information string sections.
      
      	PR 22047
      	* dwarf2.c (read_section): If necessary add a terminating NUL byte
      	to dwarf string sections.
      4c730770
    • Alan Modra's avatar
      PowerPC64 --plt-align · 38d47c22
      Alan Modra authored
      This changes the PowerPC64 --plt-align option to perform the usual
      alignment of code as suggested by its name, as well as the previous
      behaviour of padding so as to reduce boundary crossing.  The old
      behaviour is had by using a negative parameter.
      
      The default is also changed to align plt stub code by default to 32
      byte boundaries, the point being to get better bctr branch prediction
      on power8 and power9 hardware.
      
      bfd/
      	* elf64-ppp.c (plt_stub_pad): Handle positive and negative
      	plt_stub_align.
      ld/
      	* ld.texinfo (--plt-align): Describe new behaviour of option.
      	* emultempl/ppc64elf.em (params): Default plt_stub_align to 5.
      	* testsuite/ld-powerpc/powerpc.exp: Pass --no-plt-align for
      	selected tests.
      	* testsuite/ld-powerpc/relbrlt.d: Pass --no-plt-align.
      	* testsuite/ld-powerpc/elfv2so.d: Adjust expected output.
      
      (cherry picked from commit 2420fff6)
      (and commit bab55c05 for part of elfv2so.d change)
      38d47c22
    • GDB Administrator's avatar
      Automatic date update in version.in · 68b908bd
      GDB Administrator authored
      68b908bd
  7. 09 Sep, 2017 3 commits
    • H.J. Lu's avatar
      x86: Remove restriction on NOTRACK prefix position · 21ac7093
      H.J. Lu authored
      Since the NOTRACK prefix is no longer required to be the last prefix
      before the REX prefix, restriction on the NOTRACK prefix position is
      removed from assembler as well as disassembler.  Assembler encodes the
      NOTRACK prefix the same way as the DS segment register, which places
      it before other prefixes.  Disassembler displays prefixes in the order
      they appear.
      
      gas/
      
      	* config/tc-i386.c (NOTRACK_PREFIX): Removed.
      	(REX_PREFIX): Updated.
      	(MAX_PREFIXES): Likewise.
      	(parse_insn): Remove restriction on NOTRACK prefix position.
      	* testsuite/gas/i386/notrack.s: Add tests with NOTRACK prefix
      	before other prefixes.
      	* testsuite/gas/i386/x86-64-notrack.s: Likewise.
      	* testsuite/gas/i386/notrackbad.s: Remove tests with NOTRACK
      	prefix before other prefixes.
      	* testsuite/gas/i386/x86-64-notrackbad.s: Likewise.
      	* testsuite/gas/i386/notrack-intel.d: Updated.
      	* testsuite/gas/i386/notrack.d: Likewise.
      	* testsuite/gas/i386/notrackbad.l: Likewise.
      	* testsuite/gas/i386/x86-64-notrack-intel.d: Likewise.
      	* testsuite/gas/i386/x86-64-notrack.d: Likewise.
      	* testsuite/gas/i386/x86-64-notrackbad.l: Likewise.
      
      opcodes/
      
      	* i386-dis.c (last_active_prefix): Removed.
      	(ckprefix): Don't set last_active_prefix.
      	(NOTRACK_Fixup): Don't check last_active_prefix.
      
      (cherry picked from commit 4e9ac44a)
      21ac7093
    • H.J. Lu's avatar
      x86: Check for valid PLT section size · bb0216e2
      H.J. Lu authored
      Update x86 get_synthetic_symtab to check for valid PLT section size
      before examining PLT section contents.
      
      	PR binutils/22018
      	* elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
      	PLT section size.
      	* elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
      
      (cherry picked from commit 90efb642)
      bb0216e2
    • GDB Administrator's avatar
      Automatic date update in version.in · fe41779b
      GDB Administrator authored
      fe41779b
  8. 08 Sep, 2017 1 commit
  9. 07 Sep, 2017 1 commit
  10. 06 Sep, 2017 1 commit
  11. 05 Sep, 2017 4 commits
    • Nick Clifton's avatar
      Import patches from mainline to fix minor binutils bugs: · 64aa1246
      Nick Clifton authored
      	PR 21861
      	* winduni.c (codepages): Use cp1252 for codepage 0.
      
      	PR 21813
      	* rddbg.c (read_symbol_stabs_debugging_info): Check for an empty
      	string whilst concatenating symbol names.
      
      	PR 21909
      	* prdbg.c (pr_int_type): Increase size of local string buffer.
      	(pr_float_type): Likewise.
      	(pr_bool_type): Likewise.
      
      	PR 21820
      	* readelf.c (dump_section_as_strings): Do not fail if the section
      	was empty.
      	(dump_section_as_bytes): Likewise.
      
      	PR 21990
      	* readelf.c (process_version_sections <SHT_GNU_verneed>): Check
      	for invalid vn_next field before adding to idx.  Use unsigned
      	long for index vars.  Move index checks.
      	<SHT_GNU_verdef>: Likewise for vd_next.
      
      	PR 21994
      	* readelf.c (process_version_sections <SHT_GNU_verdef>): Check
      	vd_aux and vda_next for sanity.  Delete "end".  Correct overflow
      	checks.
      	(process_version_sections <SHT_GNU_verneed>): Correct overflow
      	check.  Don't report invalid vna_next on overflow.  Do report
      	invalid vna_next on size less than aux info.
      64aa1246
    • Nick Clifton's avatar
      Import patch from mainline to fix memory leak. · 57094590
      Nick Clifton authored
      	PR binutils/22032
      	* opncls.c (bfd_close_all_done): Don't call bfd_cache_close
      	before _close_and_cleanup.  Call iovec->bclose after.
      	(bfd_close): Remove code common to, and call, bfd_close_all_done.
      57094590
    • Nick Clifton's avatar
      Import parch from mainline to prevent buffer overrun. · 81d80fc0
      Nick Clifton authored
      	PR 21995
      	* readelf.c (process_mips_specific): Add checks for a NULL data
      	pointer.
      81d80fc0
    • GDB Administrator's avatar
      Automatic date update in version.in · 39b3e074
      GDB Administrator authored
      39b3e074
  12. 04 Sep, 2017 8 commits
    • Nick Clifton's avatar
      Import patch from mainline to improve padding of .eh_frame sections. · 35e01275
      Nick Clifton authored
      	PR 21441
      bfd	* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
      	alignment padding here.
      	* elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
      	in a reverse pass over sections.
      
      ld	* testsuite/ld-elf/eh3.d: Update.
      	* testsuite/ld-elf/eh4.d: Update.
      	PR 21441
      	* testsuite/ld-x86-64/pr21038a.d: Adjust.
      	* testsuite/ld-x86-64/pr21038a-now.d: Adjust.
      35e01275
    • Nick Clifton's avatar
      Import patch from mainline to fix address violation errors when parsing corrupt ELF binaries. · d6f8dea6
      Nick Clifton authored
      	PR 21916
      	* elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
      	small section lengths.
      	* elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
      	table.
      	(elfcore_grok_freebsd_prstatus): Add checks to make sure that
      	there is enough data present in the note.
      d6f8dea6
    • Nick Clifton's avatar
      Import patch from mainline to allows 16-bit MSP430 absolute branches to be... · 3a6dbb3b
      Nick Clifton authored
      Import patch from mainline to allows 16-bit MSP430 absolute branches to be relaxed ino 1-bit PC-relative branches.
      
      	PR 21824
      	* elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
      	16-bit absolute branches into 10-bit pc-relative branches on the
      	MSP430 as well as the MSP430X.
      3a6dbb3b
    • Nick Clifton's avatar
      Import patch from mainline to fix address violation errors when parsing... · deeb3d27
      Nick Clifton authored
      Import patch from mainline to fix address violation errors when parsing corrupt VMS and MACHO binaries.
      
      	PR 21813
      	* mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
      	of the relocs to the canonicalize_one_reloc routine.
      	* mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
      	for the _bfd_mach_o_canonicalize_one_reloc field.
      	* mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
      	res_base parameter.  Use to check for corrupt pair relocs.
      	* mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
      	Likewise.
      	* mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
      	Likewise.
      	* mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
      	Likewise.
      	* vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
      	enough data in the record before attempting to parse it.
      	(_bfd_vms_slurp_eeom): Likewise.
      	(_bfd_vms_slurp_egsd): Check for an invalid section index.
      	(image_set_ptr): Likewise.
      	(alpha_vms_slurp_relocs): Likewise.
      	(alpha_vms_object_p): Check for a truncated record.
      deeb3d27
    • Nick Clifton's avatar
      Import patch from mainline to improve reporting of corrupt archives. · a541116f
      Nick Clifton authored
      	PR 21787
      	* archive.c (bfd_generic_archive_p): If the bfd does not have the
      	correct magic bytes at the start, set the error to wrong format
      	and clear the format selector before returning NULL.
      a541116f
    • Nick Clifton's avatar
      Import patch from mainline to fix address violations when parsing corrupt COFF binaries · 7e693dd5
      Nick Clifton authored
      	PR 21786
      	* coff-rs6000.c (_bfd_strntol): New function.
      	(_bfd_strntoll): New function.
      	(GET_VALUE_IN_FIELD): New macro.
      	(EQ_VALUE_IN_FIELD): new macro.
      	(_bfd_xcoff_slurp_armap): Use new macros.
      	(_bfd_xcoff_archive_p): Likewise.
      	(_bfd_xcoff_read_ar_hdr): Likewise.
      	(_bfd_xcoff_openr_next_archived_file): Likewise.
      	(_bfd_xcoff_stat_arch_elt): Likewise.
      	* coff64-rs6000.c (_bfd_strntol): New function.
      	(_bfd_strntoll): New function.
      	(GET_VALUE_IN_FIELD): New macro.
      	(xcoff64_slurp_armap): Use new macros.
      7e693dd5
    • Nick Clifton's avatar
      Import patch from mainline to replace an abort when parsing a corrupt COFF... · 353c8680
      Nick Clifton authored
      Import patch from mainline to replace an abort when parsing a corrupt COFF binary with an error message instead.
      
      	PR binutils/21781
      	* coffcode.h (handle_COMDAT): Replace abort with an error message
      	and return.
      353c8680
    • GDB Administrator's avatar
      Automatic date update in version.in · 75d67a6c
      GDB Administrator authored
      75d67a6c
  13. 03 Sep, 2017 2 commits
  14. 02 Sep, 2017 2 commits
  15. 01 Sep, 2017 4 commits
    • H.J. Lu's avatar
      x86: Correct unwind information for the second PLT · e6d76f0c
      H.J. Lu authored
      For i386, generate unwind information for the second PLT.  For x32,
      correct alignment of .eh_frame section for the second PLT.
      
      bfd/
      
      	PR ld/22061
      	* elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
      	.eh_frame section for the second PLT.
      	* elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
      	alignment of .eh_frame section for the second PLT.
      
      ld/
      
      	PR ld/22061
      	* testsuite/ld-i386/ibt-plt-1.d: Pass --hash-style=sysv to ld.
      	Updated.
      	* testsuite/ld-i386/ibt-plt-2a.d: Likewise.
      	* testsuite/ld-i386/ibt-plt-2c.d: Likewise.
      	* testsuite/ld-i386/ibt-plt-3a.d: Likewise.
      	* testsuite/ld-i386/ibt-plt-3c.d: Likewise.
      	* testsuite/ld-x86-64/ibt-plt-1-x32.d: Likewise.
      	* testsuite/ld-x86-64/ibt-plt-2a-x32.d: Likewise.
      	* testsuite/ld-x86-64/ibt-plt-2c-x32.d: Likewise.
      	* testsuite/ld-x86-64/ibt-plt-3a-x32.d: Likewise.
      	* testsuite/ld-x86-64/ibt-plt-3c-x32.d: Likewise.
      	* testsuite/ld-i386/ibt-plt-2b.d: Pass --hash-style=sysv to ld
      	and dump unwind information.
      	* testsuite/ld-i386/ibt-plt-2d.d: Likewise.
      	* testsuite/ld-i386/ibt-plt-3b.d: Likewise.
      	* testsuite/ld-i386/ibt-plt-3d.d: Likewise.
      	* testsuite/ld-x86-64/ibt-plt-2b-x32.d: Likewise.
      	* testsuite/ld-x86-64/ibt-plt-2b.d: Likewise.
      	* testsuite/ld-x86-64/ibt-plt-2d-x32.d: Likewise.
      	* testsuite/ld-x86-64/ibt-plt-2d.d: Likewise.
      	* testsuite/ld-x86-64/ibt-plt-3b-x32.d: Likewise.
      	* testsuite/ld-x86-64/ibt-plt-3b.d: Likewise.
      	* testsuite/ld-x86-64/ibt-plt-3d-x32.d: Likewise.
      	* testsuite/ld-x86-64/ibt-plt-3d.d: Likewise.
      	* testsuite/ld-x86-64/ibt-plt-1.d: Pass --hash-style=sysv to ld.
      	* testsuite/ld-x86-64/ibt-plt-2a.d: Likewise.
      	* testsuite/ld-x86-64/ibt-plt-2c.d: Likewise.
      	* testsuite/ld-x86-64/ibt-plt-3a.d: Likewise.
      	* testsuite/ld-x86-64/ibt-plt-3c.d: Likewise.
      
      (cherry picked from commit e10c9c62)
      e6d76f0c
    • Nick Clifton's avatar
      Prevent an address violation parsing corrupt DWARF information by fixing the... · 6bdd6269
      Nick Clifton authored
      Prevent an address violation parsing corrupt DWARF information by fixing the test for an overlong debug line info structure.
      
              PR 22059
              * dwarf2.c (decode_line_info): Fix test for an overlong line info
              structure.
      6bdd6269
    • Nick Clifton's avatar
      Import latest bug fixes for the libiberty sources from GCC mainline. · d4ea9548
      Nick Clifton authored
      	PR lto/81968
      	* simple-object-elf.c (simple_object_elf_copy_lto_debug_section):
      	Keep names of removed global symbols.
      
      	* simple-object-xcoff.c (simple_object_xcoff_find_sections):
      	Improve .go_export csect handling.  Don't make assumptions
      	on containing section or number of auxiliary entries.
      
      	PR lto/81968
      	* simple-object-elf.c (simple_object_elf_copy_lto_debug_section):
      	Adjust field with for sh_type write, set SHF_EXCLUDE only for
      	removed sections.
      
      	PR lto/81925
      	* simple-object-elf.c (simple_object_elf_write_shdr): Adjust
      	type of sh_addralign and sh_entsize and properly write
      	sh_entsize as Elf_Addr.
      	(simple_object_elf_write_to_file): Read sh_entsize as Elf_Addr.
      
      	* simple-object-common.h (struct simple_object_functions): Add
      	copy_lto_debug_sections hook.
      	* simple-object.c: Include fcntl.h.
      	(handle_lto_debug_sections): New helper function.
      	(simple_object_copy_lto_debug_sections): New function copying
      	early LTO debug sections to regular debug sections in a new file.
      	(simple_object_start_write): Handle NULL segment_name.
      	* simple-object-coff.c (simple_object_coff_functions): Adjust
      	for not implemented copy_lto_debug_sections hook.
      	* simple-object-mach-o.c (simple_object_mach_o_functions): Likewise.
      	* simple-object-xcoff.c (simple_object_xcoff_functions): Likewise.
      	* simple-object-elf.c (SHT_NULL, SHT_SYMTAB, SHT_RELA, SHT_REL,
      	SHT_GROUP): Add various sectopn header types.
      	(SHF_EXCLUDE): Add flag.
      	(Elf32_External_Sym, Elf64_External_Sym): Add symbol struct.
      	(ELF_ST_BIND, ELF_ST_TYPE, ELF_ST_INFO): Add accessors.
      	(STT_OBJECT, STT_FUNC, STT_TLS, STT_GNU_IFUNC): Add Symbol types.
      	(STV_DEFAULT): Add symbol visibility.
      	(SHN_COMMON): Add special section index name.
      	(struct simple_object_elf_write): New.
      	(simple_object_elf_start_write): Adjust for new private data.
      	(simple_object_elf_write_shdr): Pass in values for all fields
      	we write.
      	(simple_object_elf_write_to_file): Adjust.  Copy from recorded
      	section headers if requested.
      	(simple_object_elf_release_write): Release private data.
      	(simple_object_elf_copy_lto_debug_sections): Copy and rename sections
      	as denoted by PFN and all their dependences, symbols and relocations
      	to the empty destination file.
      	(simple_object_elf_functions): Adjust for copy_lto_debug_sections hook.
      
      	* simple-object-xcoff.c (simple_object_xcoff_find_sections):
      	Search symbol table for .go_export symbol and apply pfn if found.
      d4ea9548
    • Nick Clifton's avatar
      Check for an invalid note size when parsing ELF notes. · 30326b09
      Nick Clifton authored
      	PR 21933
      	PR 22060
      	* elf.c (elf_read_notes): Check for a note size of -1.
      30326b09