1. Jul 19, 2021
  2. Jul 18, 2021
  3. Jul 17, 2021
  4. Jul 16, 2021
  5. Jul 15, 2021
  6. Jul 14, 2021
  7. Jul 13, 2021
  8. Jul 12, 2021
  9. Jul 11, 2021
  10. Jul 10, 2021
  11. Jul 09, 2021
  12. Jul 08, 2021
    • Nick Clifton's avatar
      26672a41
    • GDB Administrator's avatar
      Automatic date update in version.in · 2798ba74
      GDB Administrator authored
      2798ba74
    • Michael Matz's avatar
      elf/riscv: Fix relaxation with aliases [PR28021] · 7764dd1f
      Michael Matz authored
      the fix for PR22756 only changed behaviour for hidden aliases,
      but the same situation exists for non-hidden aliases: sym_hashes[]
      can contain multiple entries pointing to the same symbol structure
      leading to relaxation adjustment to be applied twice.
      
      Fix this by testing for duplicates for everything that looks like it
      has a version.
      
      PR ld/28021
      
      bfd/
      	* elfnn-riscv.c (riscv_relax_delete_bytes): Check for any
      	versioning.
      
      ld/
      	* testsuite/ld-riscv-elf/relax-twice.ver: New.
      	* testsuite/ld-riscv-elf/relax-twice-1.s: New.
      	* testsuite/ld-riscv-elf/relax-twice-2.s: New.
      	* testsuite/ld-riscv-elf/ld-riscv-elf.exp
      	(run_relax_twice_test): New, and call it.
      
      (cherry picked from commit 235f5ef4)
      7764dd1f
  13. Jul 07, 2021
    • H.J. Lu's avatar
      ld: Check archive only for archive member · f9b77101
      H.J. Lu authored
      Since plugin_maybe_claim calls bfd_close on the original input BFD if it
      isn't an archive member, pass NULL to bfd_plugin_close_file_descriptor
      to indicate that the BFD isn't an archive member.
      
      bfd/
      
      	PR ld/18028
      	* plugin.c (bfd_plugin_close_file_descriptor): Check archive
      	only of abfd != NULL.
      	(try_claim): Pass NULL to bfd_plugin_close_file_descriptor if
      	it isn't an archive member.
      
      ld/
      
      	PR ld/18028
      	* plugin.c (plugin_input_file): Add comments for abfd and ibfd.
      	(plugin_object_p): Set input->ibfd to NULL if it isn't an
      	archive member.
      
      (cherry picked from commit 7a30ac44)
      f9b77101
    • Rainer Orth's avatar
      Fix Solaris gprof build with --disable-nls · 0316a68c
      Rainer Orth authored
      gprof fails to compile on Solaris 10 and 11.3 with --disable-nls:
      
      In file included from /vol/src/gnu/binutils/hg/binutils-2.37-branch/git/gprof/gprof.h:33,
                       from /vol/src/gnu/binutils/hg/binutils-2.37-branch/git/gprof/basic_blocks.c:24:
      /usr/include/libintl.h:45:14: error: expected identifier or '(' before 'const'
         45 | extern char *dcgettext(const char *, const char *, const int);
            |              ^~~~~~~~~
      /usr/include/libintl.h:46:14: error: expected identifier or '(' before 'const'
         46 | extern char *dgettext(const char *, const char *);
            |              ^~~~~~~~
      /usr/include/libintl.h:47:14: error: expected identifier or '(' before 'const'
         47 | extern char *gettext(const char *);
            |              ^~~~~~~
      /vol/src/gnu/binutils/hg/binutils-2.37-branch/git/gprof/../bfd/sysdep.h:165:33:
      error: expected identifier or '(' before 'do'
        165 | # define textdomain(Domainname) do {} while (0)
            |                                 ^~
      /vol/src/gnu/binutils/hg/binutils-2.37-branch/git/gprof/../bfd/sysdep.h:165:39:
      error: expected identifier or '(' before 'while'
        165 | # define textdomain(Domainname) do {} while (0)
            |                                       ^~~~~
      /vol/src/gnu/binutils/hg/binutils-2.37-branch/git/gprof/../bfd/sysdep.h:166:46:
      error: expected identifier or '(' before 'do'
        166 | # define bindtextdomain(Domainname, Dirname) do {} while (0)
            |                                              ^~
      /vol/src/gnu/binutils/hg/binutils-2.37-branch/git/gprof/../bfd/sysdep.h:166:52:
      error: expected identifier or '(' before 'while'
        166 | # define bindtextdomain(Domainname, Dirname) do {} while (0)
            |                                                    ^~~~~
      /usr/include/libintl.h:55:14: error: expected identifier or '(' before 'unsigned'
         55 | extern char *dcngettext(const char *, const char *,
            |              ^~~~~~~~~~
      /usr/include/libintl.h:57:14: error: expected identifier or '(' before 'unsigned'
         57 | extern char *dngettext(const char *, const char *,
            |              ^~~~~~~~~
      /usr/include/libintl.h:59:14: error: expected identifier or '(' before 'unsigned'
         59 | extern char *ngettext(const char *, const char *, unsigned long int);
            |              ^~~~~~~~
      
      This is a known issue already partially fixed in binutils/sysdep.h.  For
      gprof, the same fix needs to be applied in bfd/sysdep.h, as the
      following patch does.  Tested on i386-pc-solaris2.10 and
      i386-pc-solaris2.11.
      
      2021-07-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
      
      	bfd:
      	* sysdep.h [!ENABLE_NLS]: Prevent inclusion of <libintl.h> on
      	Solaris.
      0316a68c
    • Rainer Orth's avatar
      Check for strnlen declaration to fix Solaris 10 build · 64af9fed
      Rainer Orth authored
      binutils currently fails to compile on Solaris 10:
      
      /vol/src/gnu/binutils/hg/binutils-2.37-branch/git/bfd/opncls.c: In function 'bfd_get_debug_link_info_1':
      /vol/src/gnu/binutils/hg/binutils-2.37-branch/git/bfd/opncls.c:1231:16: error: implicit declaration of function 'strnlen' [-Werror=implicit-function-declaration]
       1231 |	  crc_offset = strnlen (name, size) + 1;
            |		       ^~~~~~~
      /vol/src/gnu/binutils/hg/binutils-2.37-branch/git/bfd/opncls.c:1231:16: error: incompatible implicit declaration of built-in function 'strnlen' [-Werror]
      /vol/src/gnu/binutils/hg/binutils-2.37-branch/git/bfd/opncls.c: In function 'bfd_get_alt_debug_link_info':
      /vol/src/gnu/binutils/hg/binutils-2.37-branch/git/bfd/opncls.c:1319:20: error: incompatible implicit declaration of built-in function 'strnlen' [-Werror]
       1319 |	  buildid_offset = strnlen (name, size) + 1;
            |			   ^~~~~~~
      
      and in a couple of other places.  The platform lacks strnlen, and while
      libiberty.h can provide a fallback declaration, the necessary configure
      test isn't run.
      
      Fixed with the following patch.  Tested on i386-pc-solaris2.10.
      
      2021-07-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
      
      	bfd:
      	* configure.ac: Check for strnlen declaration.
      	* configure, config.in: Regenerate.
      
      	binutils:
      	* configure.ac: Check for strnlen declaration.
      	* configure, config.in: Regenerate.
      64af9fed
    • GDB Administrator's avatar
      Automatic date update in version.in · b3fac0a8
      GDB Administrator authored
      b3fac0a8
  14. Jul 06, 2021
  15. Jul 05, 2021
    • H.J. Lu's avatar
      ld: Cache and reuse the IR archive file descriptor · 0f206424
      H.J. Lu authored
      Linker plugin_object_p opens the IR archive for each IR archive member.
      For GCC plugin, plugin_object_p closes the archive file descriptor.  But
      for LLVM plugin, the archive file descriptor remains open.  If there are
      3000 IR archive members, there are 3000 file descriptors for them.  We
      can run out of file descriptors petty easily.
      
      1. Add archive_plugin_fd and archive_plugin_fd_open_count to bfd so that
      we can cache and reuse the IR archive file descriptor for all IR archive
      members in the archive.
      2. Add bfd_plugin_close_file_descriptor to properly close the IR archive
      file descriptor.
      
      bfd/
      
      	PR ld/28040
      	* archive.c (_bfd_archive_close_and_cleanup): Close the archive
      	plugin file descriptor if needed.
      	* bfd.c (bfd): Add archive_plugin_fd and
      	archive_plugin_fd_open_count.
      	* opncls.c (_bfd_new_bfd): Initialize to -1.
      	* plugin.c (bfd_plugin_open_input): Cache and reuse the archive
      	plugin file descriptor.
      	(bfd_plugin_close_file_descriptor): New function.
      	(try_claim): Call bfd_plugin_close_file_descriptor.
      	* plugin.h (bfd_plugin_close_file_descriptor): New.
      	* bfd-in2.h: Regenerated.
      
      ld/
      
      	PR ld/28040
      	* plugin.c (plugin_input_file): Add ibfd.
      	(release_plugin_file_descriptor): New function.
      	(release_input_file): Call release_plugin_file_descriptor to
      	close input->fd.
      	(plugin_object_p): Call release_plugin_file_descriptor to close
      	input->fd.  Also call release_plugin_file_descriptor if not
      	claimed.
      	* testsuite/config/default.exp (RANLIB): New.
      	* testsuite/ld-plugin/lto.exp: Run ranlib test.
      
      (cherry picked from commit 91817247)
      0f206424
    • Nick Clifton's avatar
      Reapply patch to allow libiberty to be built with LTO enabled. · 8a52ca87
      Nick Clifton authored
      	Reapply this change from commit:
      	50ad1254
      
      	* Makefile.in (AR): Add @AR_PLUGIN_OPTION@
      	(RANLIB): Add @RANLIB_PLUGIN_OPTION@.
      	(configure_deps): Depend on ../config/gcc-plugin.m4.
      	* aclocal.m4: Include ../config/gcc-plugin.m4.
      	* configure.ac: AC_SUBST AR_PLUGIN_OPTION and
      	RANLIB_PLUGIN_OPTION.
      	* configure: Regenerated.
      8a52ca87
    • Nick Clifton's avatar
      Updated translations · 1f0bdd68
      Nick Clifton authored
      1f0bdd68
    • GDB Administrator's avatar
      Automatic date update in version.in · 51850091
      GDB Administrator authored
      51850091
  16. Jul 04, 2021
  17. Jul 03, 2021
  18. Jul 02, 2021
    • Pedro Alves's avatar
      Document TUI improvements in the manual & NEWS · 90b044ef
      Pedro Alves authored
      
      
      gdb/ChangeLog:
      yyyy-mm-dd  Pedro Alves  <pedro@palves.net>
      	    Hannes Domani  <ssbssa@yahoo.de>
      
      	* NEWS: Add new "TUI Improvements" section and mention mouse
      	support and that unrecognized special keys are now passed to
      	GDB.  Mention Python Window.click in the Python improvements
      	section.
      
      gdb/doc/ChangeLog:
      yyyy-mm-dd  Pedro Alves  <pedro@palves.net>
      
      	* gdb.texinfo (TUI): <TUI Mouse Support>: New node/section.
      
      Co-Authored-By: default avatarHannes Domani <ssbssa@yahoo.de>
      
      Change-Id: I0d79a795d8ac561fd28cdc5184bff029ba28bc64
      90b044ef
    • Nick Clifton's avatar
      Fix an illegal memory access triggered by an attempt to parse a corrupt input file. · 49910fd8
      Nick Clifton authored
      	PR 28046
      	* dwarf2.c (read_ranges): Check that range_ptr does not exceed
      	range_end.
      49910fd8
    • Alan Modra's avatar
      PR28048, heap-buffer-overflow on readelf -Ww · 4ff0bb2d
      Alan Modra authored
      	PR 28048
      	* dwarf.c (get_type_signedness): Don't run off end of buffer
      	printing DW_FORM_string attribute.
      4ff0bb2d
    • Alan Modra's avatar
      Re: Fix minor NDS32 renaming snafu · 62194b63
      Alan Modra authored
      Some extern declarations differ in constnes to their definitions too.
      Let's make sure this sort of thing doesn't happen again, but putting
      the externs in a header where they belong.
      
      gas/
      	* config/tc-nds32.c (nds32_keyword_gpr): Don't declare.
      	(md_begin): Constify k.
      opcodes/
      	* nds32-dis.c (nds32_find_reg_keyword): Constify arg and return.
      	(nds32_parse_audio_ext, nds32_parse_opcode): Constify psys_reg.
      	(nds32_field_table, nds32_opcode_table, nds32_keyword_table),
      	(nds32_opcodes, nds32_operand_fields, nds32_keywords),
      	(nds32_keyword_gpr): Move declarations to..
      	* nds32-asm.h: ..here, constifying to match definitions.
      62194b63
    • Nick Clifton's avatar
      Fix minor NDS32 renaming snafu. · af82b082
      Nick Clifton authored
      	* config/tc-nds32.c: Change all references of keyword_gpr to
      	nds32_keyword_gpr.
      af82b082
    • Mike Frysinger's avatar
      sim: unify reserved instruction bits settings · 7eb1f99a
      Mike Frysinger authored
      Move these options up to the common dir so we only test & export
      them once across all ports.
      
      The setting only affects igen based ports, and they were turning
      this on by default, so keep the default in place.
      7eb1f99a