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

  1. 19 Sep, 2020 3 commits
  2. 18 Sep, 2020 1 commit
  3. 17 Sep, 2020 2 commits
  4. 16 Sep, 2020 1 commit
  5. 15 Sep, 2020 3 commits
    • Nick Clifton's avatar
      Add support to the assembler for a ".nop" directive which inserts a single no-op instruction. · 23f268a0
      Nick Clifton authored
      	Import from mainline:
      	2020-09-14  Nick Clifton  <nickc@redhat.com>
      
      	* read.c (s_nop): New function.  Handles the .nop directive.
      	(potable): Add entry for "nop".
      	(s_nops): Code tidy.
      	* read.h (s_nop): Add prototype.
      	* config/tc-bpf.h (md_single_noop_insn): Define.
      	* config/tc-mmix.h (md_single_noop_insn): Define.
      	* config/tc-or1k.h (md_single_noop_insn): Define.
      	* config/tc-ia64.h (md_single_noop_insn): Define.
      	* write.c (relax_segment): Update error message regarding
      	non-absolute values passed to .fill and .nops.
      	* NEWS: Mention the new directive.
      	* doc/as.texi: Document the new directive.
      	* doc/internals.texi: Document the new internal macros used to
      	implement the new directive.
      	* testsuite/gas/all/nop.s: New test.
      	* testsuite/gas/all/nop.d: New test control file.
      	* testsuite/gas/all/gas.exp: Run the new test.
      	* testsuite/gas/elf/dwarf-5-nop-for-line-table.s: New test.
      	* testsuite/gas/elf/dwarf-5-nop-for-line-table.d: New test
      	control file.
      	* testsuite/gas/elf/elf.exp: Run the new test.
      	* testsuite/gas/i386/space1.l: Adjust expected output.
      23f268a0
    • Hans-Peter Nilsson's avatar
      CRIS: fix PR ld/26589, a missing NULL check in fix for PR ld/22269 · ef6b667e
      Hans-Peter Nilsson authored
      Not sure why there wasn't a NULL check in the ld/22269 patch
      (e01c16a8) at the time, as there was one for the corresponding patch
      to elf32-m68k.c (5056ba1d).
      
      Incidentally, I had missed that in 2017, as a prerequisite for the
      ld/22269 series, the check_relocs function finally were made "safe"!
      (I.e. the number of references and symbol types are final, garbage
      collection done, so port-specific accounting can be made sanely.)
      
      Committed.
      
      bfd:
      	PR ld/26589
      	* elf32-cris.c (cris_elf_check_relocs): Add missing NULL check
      	on argument before calling UNDEFWEAK_NO_DYNAMIC_RELOC.
      
      ld:
      	PR ld/26589
      	* testsuite/ld-elf/pr26589.d, testsuite/ld-elf/locref3.s: New test.
      
      (cherry picked from commit 4a8f181d)
      ef6b667e
    • GDB Administrator's avatar
      Automatic date update in version.in · 70275928
      GDB Administrator authored
      70275928
  6. 14 Sep, 2020 7 commits
    • Mark Wielaard's avatar
      gas: Don't error when .debug_line already exists, unless .loc was used · bb4799e9
      Mark Wielaard authored
      When -g was used to generate DWARF gas would error out when a .debug_line
      already exists. But when a .debug_info section already exists it would
      simply skip generating one without warning or error. Do the same for
      .debug_line. It is only an error when the user explicitly uses .loc
      directives and also generates the .debug_line table itself.
      
      The tests are unfortunately arch specific because the line table is only
      generated when actual instructions have been emitted. Use i386 because
      that is probably the most used architecture. Before this patch the new
      dwarf-line-2 testcase would fail, with this patch it succeeds (and doesn't
      try to add its own line table).
      
      gas/ChangeLog:
      
          * as.texi (-g): Explicitly mention when .debug_info and .debug_line
          are generated for the DWARF format.
          (Loc): Add that it is an error to both use a .loc directive and
          generate a .debug_line yourself.
          * dwarf2dbg.c (dwarf2_any_loc_directive_seen): New static variable.
          (dwarf2_directive_loc): Set dwarf2_any_loc_directive_seen to TRUE.
          (dwarf2_finish): Check dwarf2_any_loc_directive_seen before emitting
          an error. Only create .debug_line if it is empty (or doesn't exist).
          * testsuite/gas/i386/i386.exp: Add dwarf2-line-{1,2,3,4} when testing
          an elf target.
          * testsuite/gas/i386/dwarf2-line-{1,2,3,4}.{s,d,l}: New test files.
      bb4799e9
    • Mark Wielaard's avatar
      gas: Output directory and file names in .debug_line_str for DWARF5 · b5693f7d
      Mark Wielaard authored
      	* dwarf2dbg.c (add_line_strp): New function.
      	(out_dir_and_file_list): Take line_seg and sizeof_offset as
      	arguments, Use DW_FORM_line_strp for dir and file. Call
      	add_line_strp and set symbol offset for DWARF2_LINE_VERSION 5.
      	(out_debug_line): Call out_dir_and_file_list with line_seg and
      	sizeof_offset.
      	* gas/testsuite/gas/elf/dwarf-5-file0.d: Expect indirect line
      	strings.
      b5693f7d
    • Mark Wielaard's avatar
      gas: Output .debug_rnglists for DWARF 5. · fe148fc9
      Mark Wielaard authored
      	* dwarf2dbg.c (DWARF2_RNGLISTS_VERSION): New constant.
      	(out_debug_ranges): Add ranges_sym argument and set it.
      	(out_debug_rnglists): New function.
      	(out_debug_info): Change ranges_seg argument to ranges_sym
      	and use it to set DW_AT_ranges value.
      	(dwarf2_finish): Remove ranges_seg, add ranges_sym. For
      	DWARF2_VERSION 5 call out_debug_rnglists.
      fe148fc9
    • Mark Wielaard's avatar
      gas: Make sure to only add an md5 to a .file when requested. · 3a7d446f
      Mark Wielaard authored
      	* dwarf2dbg.c (dwarf2_directive_filename): Initialize with_md5 to
      	FALSE.
      	* gas/testsuite/gas/elf/dwarf-5-file0.s: Add a random bignum.
      3a7d446f
    • Mark Wielaard's avatar
      gas: Use DW_FORM_sec_offset for DWARF version 4 or higher. · 1e9cc650
      Mark Wielaard authored
      Older DWARF versions used DW_FORM_data4 or DW_FORM_data8 for offsets
      into sections for e.g. DW_AT_stmt_list ot DW_AT_ranges. But version 4
      introduced a dedicated form for such section offsets. Make sure to emit
      the proper form for newer DWARF versions.
      
      gas/ChangeLog:
      
      	* dwarf2dbg.c (out_debug_abbrev): Use DW_FORM_sec_offset for DWARF
      	version 4 or higher.
      1e9cc650
    • Mark Wielaard's avatar
      gas: Handle bad -gdwarf options, just like bad --gdwarf options. · a2afee4a
      Mark Wielaard authored
      parse_args uses getopt_long_only so it can handle long options both
      with double and single dash. But this means that some single dash
      options like -gdwarf-1 don't generate an error (unlike --gdwarf-1).
      
      This is especially confusing since there is also --gdwarf2, but no
      --gdwarf4 (it is --gdwarf-4). When giving -gdwarf4 the option is
      silently interpreted as -g (which set dwarf_version to 2). This causes
      some confusion for people who don't expect this and suddenly get
      DWARF2 instead of DWARF4 as they might expect.
      
      So make it so that the -gdwarf<unknown> creates an error, just like
      --gdwarf<unknown> would.
      a2afee4a
    • GDB Administrator's avatar
      Automatic date update in version.in · 2fee395e
      GDB Administrator authored
      2fee395e
  7. 13 Sep, 2020 1 commit
  8. 12 Sep, 2020 1 commit
  9. 11 Sep, 2020 1 commit
  10. 10 Sep, 2020 2 commits
    • Alan Modra's avatar
      PowerPC TPREL_HA/LO optimisation · 113617fc
      Alan Modra authored
      ppc64 ld optimises sequences like the following
      	addis 3,13,wot@tprel@ha
      	lwz 3,wot@tprel@l(3)
      to
      	nop
      	lwz 3,wot@tprel(13)
      when "wot" is located near enough to the thread pointer.
      However, the ABI doesn't require that R_PPC64_TPREL16_HA always be on
      an addis rt,13,imm instruction, and while ld checked for that on the
      high-part instruction it didn't disable the optimisation on the
      low-part instruction.  This patch fixes that problem, disabling the
      tprel optimisation globally if high-part instructions don't pass
      sanity checks.  The optimisation is also enabled for ppc32, where
      before ld.bfd had the code in the wrong place and ld.gold had it in a
      block only enabled for ppc64.
      
      bfd/
      	* elf32-ppc.c (ppc_elf_check_relocs): Set has_tls_reloc for
      	high part tprel16 relocs.
      	(ppc_elf_tls_optimize): Sanity check high part tprel16 relocs.
      	Clear do_tls_opt on odd instructions.
      	(ppc_elf_relocate_section): Move TPREL16_HA/LO optimisation later.
      	Don't sanity check them here.
      	* elf64-ppc.c (ppc64_elf_check_relocs): Set has_tls_reloc for
      	high part tprel16 relocs.
      	(ppc64_elf_tls_optimize): Sanity check high part tprel16 relocs.
      	Clear do_tls_opt on odd instructions.
      	(ppc64_elf_relocate_section): Don't sanity check TPREL16_HA.
      ld/
      	* testsuite/ld-powerpc/tls32.d: Update for TPREL_HA/LO optimisation.
      	* testsuite/ld-powerpc/tlsexe32.d: Likewise.
      	* testsuite/ld-powerpc/tlsldopt32.d: Likewise.
      	* testsuite/ld-powerpc/tlsmark32.d: Likewise.
      	* testsuite/ld-powerpc/tlsopt4_32.d: Likewise.
      	* testsuite/ld-powerpc/tprel.s,
      	* testsuite/ld-powerpc/tprel.d,
      	* testsuite/ld-powerpc/tprel32.d: New tests.
      	* testsuite/ld-powerpc/tprelbad.s,
      	* testsuite/ld-powerpc/tprelbad.d: New test.
      	* testsuite/ld-powerpc/powerpc.exp: Run them.
      gold/
      	* powerpc.cc (Target_powerpc): Add tprel_opt_ and accessors.
      	(Target_powerpc::Scan::local): Sanity check tprel high relocs.
      	(Target_powerpc::Scan::global): Likewise.
      	(Target_powerpc::Relocate::relocate): Control tprel optimisation
      	with tprel_opt_ and enable for 32-bit.
      
      (cherry picked from commit 252dcdf4)
      113617fc
    • GDB Administrator's avatar
      Automatic date update in version.in · a18bf4fa
      GDB Administrator authored
      a18bf4fa
  11. 09 Sep, 2020 1 commit
  12. 08 Sep, 2020 1 commit
  13. 07 Sep, 2020 1 commit
  14. 06 Sep, 2020 1 commit
  15. 05 Sep, 2020 1 commit
  16. 04 Sep, 2020 1 commit
  17. 03 Sep, 2020 3 commits
  18. 02 Sep, 2020 1 commit
  19. 01 Sep, 2020 1 commit
  20. 31 Aug, 2020 1 commit
  21. 30 Aug, 2020 1 commit
  22. 29 Aug, 2020 1 commit
  23. 28 Aug, 2020 1 commit
  24. 27 Aug, 2020 1 commit
  25. 26 Aug, 2020 2 commits
    • Jose E. Marchesi's avatar
      opcodes: Add missing entries to ebpf_isa_attr · b6fb4037
      Jose E. Marchesi authored
      opcodes/
      
      	* disassemble.c (enum epbf_isa_attr): Add ISA_XBPFBE, ISA_EBPFMAX.
      
      (cherry picked from commit 31b3f3e6)
      b6fb4037
    • Jose E. Marchesi's avatar
      bpf: add xBPF ISA · b801c1a4
      Jose E. Marchesi authored
      This patch adds support for xBPF, another ISA targetting the BPF
      virtual architecture. For now, the primary difference between eBPF
      and xBPF is that xBPF supports indirect calls through the
      'call %reg' form of the call instruction.
      
      bfd/
      	* archures.c (bfd_mach_xbpf): Define.
      	* bfd-in2.h: Regenerate.
      	* cpu-bpf.c (bfd_xbpf_arch) New.
      	(bfd_bpf_arch) Update next in list field to point to xbpf arch.
      
      cpu/
      	* bpf.cpu (arch bpf): Add xbpf mach and isas.
      	(define-xbpf-isa) New pmacro.
      	(all-isas) Add xbpfle,xbpfbe.
      	(endian-isas): New pmacro.
      	(mach xbpf): New.
      	(model xbpf-def): Likewise.
      	(h-gpr): Add xbpf mach.
      	(f-dstle, f-srcle, dstle, srcle): Add xbpfle isa.
      	(f-dstbe, f-srcbe, dstbe, srcbe): Add xbpfbe isa.
      	(define-alu-insn-un): Use new endian-isas pmacro.
      	(define-alu-insn-bin, define-alu-insn-mov): Likewise.
      	(define-endian-insn, define-lddw): Likewise.
      	(dlind, dxli, dxsi, dsti): Likewise.
      	(define-cond-jump-insn, define-call-insn): Likewise.
      	(define-atomic-insns): Likewise.
      
      gas/
      	* config/tc-bpf.c: Add option -mxbpf to select xbpf isa.
      	* testsuite/gas/bpf/indcall-1.d: New file.
      	* testsuite/gas/bpf/indcall-1.s: Likewise.
      	* testsuite/gas/bpf/indcall-bad-1.l: Likewise.
      	* testsuite/gas/bpf/indcall-bad-1.s: Likewise.
      	* testsuite/gas/bpf/bpf.exp: Run new tests.
      
      opcodes/
      	* bpf-desc.c: Regenerate.
      	* bpf-desc.h: Likewise.
      	* bpf-opc.c: Likewise.
      	* bpf-opc.h: Likewise.
      	* disassemble.c (disassemble_init_for_target): Set bits for xBPF
      	ISA when appropriate.
      
      (cherry picked from commit 4449c81a)
      b801c1a4