1. 27 Sep, 2019 1 commit
  2. 26 Sep, 2019 1 commit
  3. 25 Sep, 2019 6 commits
    • Alan Modra's avatar
      PR25031, nm reports wrong address on 32bit · 895b6d98
      Alan Modra authored
      Using saved_format breaks when nm is presented with multiple object
      files, some 32-bit and some 64-bit.
      
      	PR 25031
      	* nm.c (print_format_string): New.
      	(get_print_format): Delete saved_format.  Move earlier.
      	(set_print_width): Call get_print_format.
      	(print_value): Use print_format_string.
      
      (cherry picked from commit 352f6bc3)
      895b6d98
    • Alan Modra's avatar
      implicit conversion from enum ld_plugin_level to enum ld_plugin_status · 40ac0077
      Alan Modra authored
      This is a gcc10 warning fix.
      
      gold/
      	* testsuite/plugin_new_section_layout.c (new_input_hook): Correct
      	return status enum values.
      
      (cherry picked from commit 6831670d)
      40ac0077
    • Alan Modra's avatar
      PR25018, readelf crash on 32bits · a11b3493
      Alan Modra authored
      Pointer comparisons after adding an offset just don't work to catch
      overflow when the offset is a larger type than the pointer.
      
      	PR 25018
      	* dwarf.c (get_type_signedness): Delete ineffective pointer
      	comparison check.  Properly range check uvalue offset on
      	recursive call.
      	(read_and_display_attr_value): Range check uvalue offset before
      	calling get_type_signedness.
      
      (cherry picked from commit b3fe587e)
      a11b3493
    • Alan Modra's avatar
      Work around gcc10 FAIL: S-records with constructors · fdbc0dd5
      Alan Modra authored
      gcc10 on x86_64 and powerpc64le recognises that the loop in
      Foo::operator= can be turned into a call to memmove, which then
      results in an undefined symbol when linking.  Avoid that by making the
      loop smaller.
      
      	* testsuite/ld-srec/sr3.cc (FOO_MSG_LEN): Set to 4.
      
      (cherry picked from commit a13ba308)
      fdbc0dd5
    • Alan Modra's avatar
      tc-i386.c gcc10 warning fix · 641cbc94
      Alan Modra authored
      .../gas/config/tc-i386.c: In function ‘md_parse_option’:
      .../gas/config/tc-i386.c:11441:9: error: implicit conversion from ‘enum <anonymous>’ to ‘enum <anonymous>’ [-Werror=enum-conversion]
      11441 |  vexwig = evexw0;
            |         ^
      .../gas/config/tc-i386.c:11443:9: error: implicit conversion from ‘enum <anonymous>’ to ‘enum <anonymous>’ [-Werror=enum-conversion]
      11443 |  vexwig = evexw1;
            |         ^
      
      	* config/tc-i386.c (md_parse_option): Fix warning on vexwig assignment.
      
      (cherry picked from commit 40c9c8de)
      641cbc94
    • GDB Administrator's avatar
      Automatic date update in version.in · 3417d517
      GDB Administrator authored
      3417d517
  4. 24 Sep, 2019 2 commits
  5. 23 Sep, 2019 1 commit
  6. 22 Sep, 2019 1 commit
  7. 21 Sep, 2019 1 commit
  8. 20 Sep, 2019 2 commits
  9. 19 Sep, 2019 4 commits
    • Matthew Malcomson's avatar
      [gas][news] NEWS (2.33) note new SVE2 and TME instructions for AArch64 · 21ce4806
      Matthew Malcomson authored
      These NEWS entries had been missed when the instructions were added.
      
      gas/ChangeLog:
      
      2019-09-19  Matthew Malcomson  <matthew.malcomson@arm.com>
      
      	* NEWS: Add SVE2 and TME entries.
      21ce4806
    • Tamar Christina's avatar
      AArch64: Fix objdump tests · 7bfaf478
      Tamar Christina authored
      The newly added objdump -S tests check for source line mapping of a static
      variable.  But the test doesn't dump any data sections so this should never
      pass.
      
      This changes the test to dump all sections so the source mapping can be found.
      
      binutils/ChangeLog:
      
      	* testsuite/binutils-all/objdump.exp (objdump -S): Update testcases.
      
      (cherry picked from commit 4e28d4cc)
      7bfaf478
    • Alan Modra's avatar
      PR24981, Hit assertion failure in ld/ldlang.c:7504 · 722b8231
      Alan Modra authored
      This fixes a problem with commit 128bf1fe, a patch I made
      2019-08-06.   Apparently it is possible to trigger the assertion I
      added during an LTO bootstrap, something I haven't reproduced.
      However, I did find a case triggered by an odd linker script feature
      that allows a file to be loaded from the script without specifying
      that file on the command line.  Regarding input sections:
        "When you use a file name which is not an archive:file specifier
         and does not contain any wild card characters, the linker will
         first see if you also specified the file name on the linker command
         line or in an INPUT command.  If you did not, the linker will
         attempt to open the file as an input file, as though it appeared on
         the command line."
      
      So putting
        .foo : { foo.a(*) }
      into a script supposedly extracts foo.a into .foo.  Except it doesn't,
      since this feature is meant for object files only.  Well anyway,
      assuming --whole-archive was given on the command line, foo.a contains
      a -flto object and no other objects involved were -flto then we'll hit
      the assert due to files added like foo.a here *not* having their input
      statement put on the general statement list.  Why these are not put on
      the statement list isn't obvious but it has been that way since commit
      193c5f93 in 1994.
      
      	PR 24981
      	* ldlang.c (lang_process): Remove assertion.  Comment.
      
      (cherry picked from commit a19826f4)
      722b8231
    • GDB Administrator's avatar
      Automatic date update in version.in · 0ebd6330
      GDB Administrator authored
      0ebd6330
  10. 18 Sep, 2019 2 commits
    • H.J. Lu's avatar
      i386: Adjust for new output format from readelf · 758440d4
      H.J. Lu authored
      	PR binutils/24887
      	* testsuite/ld-i386/property-1.r: Adjust for new output format
      	from readelf.
      	* testsuite/ld-i386/property-1a.r: Likewise.
      	* testsuite/ld-i386/property-2.r: Likewise.
      	* testsuite/ld-i386/property-2a.r: Likewise.
      	* testsuite/ld-i386/property-3.r: Likewise.
      	* testsuite/ld-i386/property-3a.r: Likewise.
      	* testsuite/ld-i386/property-4.r: Likewise.
      	* testsuite/ld-i386/property-4a.r: Likewise.
      	* testsuite/ld-i386/property-5.r: Likewise.
      	* testsuite/ld-i386/property-5a.r: Likewise.
      	* testsuite/ld-i386/property-6.r: Likewise.
      	* testsuite/ld-i386/property-7.r: Likewise.
      	* testsuite/ld-i386/property-7a.r: Likewise.
      	* testsuite/ld-i386/property-1.r: Likewise.
      	* testsuite/ld-i386/property-1a.r: Likewise.
      	* testsuite/ld-i386/property-2.r: Likewise.
      	* testsuite/ld-i386/property-2a.r: Likewise.
      	* testsuite/ld-i386/property-3.r: Likewise.
      	* testsuite/ld-i386/property-3a.r: Likewise.
      	* testsuite/ld-i386/property-4.r: Likewise.
      	* testsuite/ld-i386/property-4a.r: Likewise.
      	* testsuite/ld-i386/property-5.r: Likewise.
      	* testsuite/ld-i386/property-5a.r: Likewise.
      	* testsuite/ld-i386/property-6.r: Likewise.
      	* testsuite/ld-i386/property-7.r: Likewise.
      	* testsuite/ld-i386/property-7a.r: Likewise.
      
      (cherry picked from commit 6715fe29)
      758440d4
    • GDB Administrator's avatar
      Automatic date update in version.in · a58bfdb3
      GDB Administrator authored
      a58bfdb3
  11. 17 Sep, 2019 1 commit
  12. 16 Sep, 2019 2 commits
  13. 15 Sep, 2019 1 commit
  14. 09 Sep, 2019 2 commits
  15. 08 Sep, 2019 2 commits
    • Tom Tromey's avatar
      Truncate long TUI window titles · 8634b462
      Tom Tromey authored
      If a TUI window has a long title, it can overflow the title line.
      This changes the TUI to use just the tail part of the title in this
      case.
      
      gdb/ChangeLog
      2019-09-08  Tom Tromey  <tom@tromey.com>
      
      	* tui/tui-wingeneral.c (box_win): Truncate long window titles.
      
      gdb/testsuite/ChangeLog
      2019-09-08  Tom Tromey  <tom@tromey.com>
      
      	* gdb.tui/resize.exp: Remove setup_xfail.
      	* gdb.tui/regs.exp: Remove setup_xfail.
      	* gdb.tui/basic.exp: Remove setup_xfail.
      8634b462
    • GDB Administrator's avatar
      Automatic date update in version.in · b26b24e0
      GDB Administrator authored
      b26b24e0
  16. 07 Sep, 2019 2 commits
    • Simon Marchi's avatar
      Change lookup_symbol's block_index parameter type to block_enum · c7f839cb
      Simon Marchi authored
      The only two values valid to pass to the block_index parameter of
      quick_symbol_functions::lookup_symbol are GLOBAL_BLOCK and STATIC_BLOCK,
      part of enum block_enum.  Change the type of that parameter to
      block_enum.
      
      Change also the block_index field of dw2_symtab_iterator in the same
      way..  This makes it consistent with dw2_debug_names_iterator, which
      already uses block_enum for its block_index field.
      
      This is a follow-up to this thread:
      
      https://sourceware.org/ml/gdb-patches/2019-08/msg00097.html
      
      gdb/ChangeLog:
      
      	* dwarf2read.c (struct dw2_symtab_iterator) <block_index>:
      	Change type to gdb::optional<block_enum>.
      	(dw2_symtab_iter_init): Change block_index parameter type
      	to gdb::optional<block_enum>.
      	(dw2_lookup_symbol): Change block_index parameter
      	type to block_enum.c
      	(dw2_debug_names_lookup_symbol): Likewise.
      	* psymtab.c (psym_lookup_symbol): Likewise.
      	* symfile-debug.c (debug_qf_lookup_symbol): Likewise.
      	* symfile.h (struct quick_symbol_functions) <lookup_symbol>:
      	Likewise.
      c7f839cb
    • GDB Administrator's avatar
      Automatic date update in version.in · deccd150
      GDB Administrator authored
      deccd150
  17. 06 Sep, 2019 5 commits
    • David Blaikie's avatar
      un-XFAIL under Clang tests using labels · 736b0f76
      David Blaikie authored
      gdb/testsuite/
      	* gdb.base/label.exp: un-XFAIL label related tests under Clang.
      	* gdb.cp/cplabel.exp: Ditto.
      	* gdb.linespec/ls-errs.exp: Ditto.
      736b0f76
    • Christian Biesinger's avatar
      Change int to bool for the relocate_* functions · ead0e69a
      Christian Biesinger authored
      These parameters are only used as bools. This also
      renames "flag" to "relocatable" to make it clearer
      what it does.
      
      gdb/ChangeLog:
      
      2019-09-06  Christian Biesinger  <cbiesinger@google.com>
      
      	* defs.h (relocate_gdb_directory): Change int to bool in
      	signature and rename flag to relocatable.
      	* main.c (relocate_path): Likewise.
      	(relocate_gdb_directory): Likewise.
      ead0e69a
    • Alan Modra's avatar
      beos.em qsort predicate tidy · f5c3a9e3
      Alan Modra authored
      lang_input_section_type** is better than lang_statement_union_type**
      here since that is in fact the type passed to the qsort predicate,
      and I think it's worth factoring out the common indirections.
      
      	* emultempl/beos.em (sort_by_file_name): Use appropriate
      	intermediary variables.
      	(sort_by_section_name): Likewise.
      f5c3a9e3
    • Alan Modra's avatar
      bfd_get_filename · b16c44de
      Alan Modra authored
      This macro says:
      /* Cast from const char * to char * so that caller can assign to
         a char * without a warning.  */
      
      I reckon that isn't such a good idea since it can result in char*
      variables where const char* is appropriate.  Not very many places
      need the char* cast.
      
      bfd/
      	* aout-target.h (object_p): Formatting.
      	* bfd-in.h (bfd_get_filename): Don't cast to char*.
      	* corefile.c (generic_core_file_matches_executable_p): Constify
      	variables and remove cast.
      	* bfd-in2.h: Regenerate.
      binutils/
      	* nm.c (print_object_filename_bsd, print_object_filename_sysv),
      	(print_object_filename_posix, print_archive_filename_bsd),
      	(print_archive_filename_sysv, print_archive_filename_posix),
      	(print_archive_member_bsd, print_archive_member_sysv),
      	(print_archive_member_posix): Constify parameter.
      	(struct output_fns <print_object_filename, print_archive_filename>),
      	(<print_archive_member>): Likewise.
      	* objcopy.c (copy_archive): Add cast for make_tempdir.
      ld/
      	* emultempl/elf32.em (gld${EMULATION_NAME}_search_needed): Constify
      	variable.
      	* emultempl/pe.em (gld_${EMULATION_NAME}_after_open): Likewise.
      	* emultempl/pep.em (gld_${EMULATION_NAME}_after_open): Likewise.
      gdb/
      	* coffread.c (coff_symfile_read): Constify filename variable.
      	* dbxread.c (dbx_symfile_init, coffstab_build_psymtabs),
      	(elfstab_build_psymtabs, stabsect_build_psymtabs): Likewise.
      	* gdb_bfd.c (gdb_bfd_close_or_warn): Likewise.
      	* solib.c (reload_shared_libraries_1): Likewise.
      	* symfile.c (reread_symbols): Likewise.
      	* solib-aix.c (solib_aix_bfd_open): Add cast for xfree of filename.
      	* solib-darwin.c (darwin_bfd_open): Likewise.
      	* symfile-mem.c (symbol_file_add_from_memory): Likewise.
      sim/cris/
      	* sim-if.c (sim_open): Constify filename variable.
      b16c44de
    • GDB Administrator's avatar
      Automatic date update in version.in · 6ade8373
      GDB Administrator authored
      6ade8373
  18. 05 Sep, 2019 4 commits
    • Eric Botcazou's avatar
      Fix PR ld/24574 · de07a745
      Eric Botcazou authored
      This restores a line that has been dropped when the auto-import feature
      of the PE-COFF linker was overhauled about one year.  It is necessary
      for GDB to properly resolve extern symbol in DLLs.
      
      ld/ChangeLog
      	* pe-dll.c (pe_find_data_imports): Replace again the original name
      	of the undefined symbol with the __imp_ prefixed one after it is
      	resolved.
      de07a745
    • Tom de Vries's avatar
      [gdb/testsuite] Restore breakpoint command in ui-redirect.exp · 30331a6c
      Tom de Vries authored
      In gdb.base/ui-redirect.exp, the "save breakpoint" command is used to write
      the current breakpoints to a file, but the actual output is not verified.
      
      Consequently, the test has regressed in that the "print 1" command associated
      with a breakpoint on main is removed by a subsequent runto_main, which first
      deletes all breakpoints:
      ...
      (gdb) break main
      Breakpoint 1 at 0x4004d7: file start.c, line 34.
      (gdb) commands
      Type commands for breakpoint(s) 1, one per line.
      End with a line saying just "end".
      > PASS: gdb.base/ui-redirect.exp: commands
      print 1
      > PASS: gdb.base/ui-redirect.exp: print 1
      end
      (gdb) PASS: gdb.base/ui-redirect.exp: end
      delete breakpoints
      Delete all breakpoints? (y or n) y
      ...
      and consequently the "save breakpoint" output is missing the breakpoint
      command for main:
      ...
       break main
      -  commands
      -    print 1
      -  end
       break foo
       break bar
      ...
      
      Fix this by replacing "gdb_breakpoint main" with runto_main, and verifying the
      "save breakpoints" output.
      
      Tested on x86_64-linux.
      
      gdb/testsuite/ChangeLog:
      
      2019-09-05  Tom de Vries  <tdevries@suse.de>
      
      	* lib/gdb.exp (cmp_file_string): New proc.
      	* gdb.base/ui-redirect.exp: Replace "gdb_breakpoint main" with
      	runto_main.  Verify save breakpoints output.
      30331a6c
    • Alan Modra's avatar
      PowerPC warning on symbol+offset@got · e47d413a
      Alan Modra authored
      	* config/tc-ppc.c (ppc_elf_suffix): Display the relocation
      	operator on GOT reloc warnings/errors.
      e47d413a
    • Alan Modra's avatar
      PowerPC64 GOT_PCREL relocs · 133a1f60
      Alan Modra authored
      PC-relative relocs typically use the addend in adjusting what they are
      relative to.  For example:
      	bcl 20,31,1f
      1:	mflr 12
      	addi 12,12,xxx-1b
      generates "R_PPC64_REL16 xxx+0x4" for the addi (when little-endian).
      The addend reflects the fact that you want the offset relative to the
      previous insn not the current one in this case.
      
      So the question is, will we ever want to do something like that for an
      instruction using R_PPC64_GOT_PCREL34?  I thought so at the time I
      first implemented support in ld but at the time I think the hardware
      was possibly going to support pcrel+offset+reg addressing.  In which
      case you might want something like:
      	load_big_offset_into_r2
      	pld 3,sym-big_offset@got@pcrel(2)
      which would be a way of supporting more than 8G offsets from code to
      the GOT.  We could do the same with
      	load_big_offset_into_r2
      	pla 9,sym-big_offset@got@pcrel
      	ldx 3,9,2
      However, this is really a poor version of TOC-pointer relative code.
      
      So let's go with an addend on R_PPC64_GOT_PCREL34 meaning that
      sym+addend should be put in a GOT entry, and the relocation calculate
      the pc-relative offset to that GOT entry.
      
      Note that this is an extension to the ABI, which says (by the
      expression given for GOT relocs) that non-zero addends on GOT and PLT
      relocs are ignored.  This is true for all GOT/PLT relocs, not just the
      pcrel ones.
      
      	* elf64-ppc.c (ppc64_elf_check_relocs): Interpret an addend in
      	GOT_PCREL and PLT_PCREL relocs as affecting the value stored
      	in the GOT/PLT entry rather than affecting the offset to that
      	GOI/PLT entry.
      	(ppc64_elf_edit_toc, ppc64_elf_relocate_section): Likewise.
      133a1f60