]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
3 years agoAutomatic date update in version.in
GDB Administrator [Fri, 20 Aug 2021 00:00:30 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years ago[GOLD] PowerPC64 relocation overflow for -Os register save/restore funcs
Alan Modra [Wed, 18 Aug 2021 03:13:46 +0000 (12:43 +0930)] 
[GOLD] PowerPC64 relocation overflow for -Os register save/restore funcs

Fixes a silly mistake in calculating the address of -Os out-of-line
register save/restore function copies.  Copies of these linker defined
functions are added to stub sections when the original (in
target->savres_section) can't be reached.

* powerpc.cc (Target_powerpc::Relocate::relocate): Correct address
calculation of out-of-line save/restore function copies.

(cherry picked from commit 89c905a342d2cb35ebc4d66ad7cdca581b5134c3)

3 years agoAutomatic date update in version.in
GDB Administrator [Thu, 19 Aug 2021 00:01:24 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Wed, 18 Aug 2021 00:00:58 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Tue, 17 Aug 2021 00:00:58 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Mon, 16 Aug 2021 00:00:52 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sun, 15 Aug 2021 00:01:51 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sat, 14 Aug 2021 00:00:50 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Fri, 13 Aug 2021 00:01:00 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Thu, 12 Aug 2021 00:01:28 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoRevert "ld script expression parsing"
Alan Modra [Wed, 11 Aug 2021 00:41:19 +0000 (10:11 +0930)] 
Revert "ld script expression parsing"

This reverts commit 40726f16a8d7105761e36398054860a923d4efc9.

3 years agoRevert "ld --defsym"
Alan Modra [Wed, 11 Aug 2021 00:43:27 +0000 (10:13 +0930)] 
Revert "ld --defsym"

This reverts commit fb6c220ebdae893d7d955827363010342fa1afa5.

3 years agoRevert "Re: ld script expression parsing"
Alan Modra [Wed, 11 Aug 2021 00:39:02 +0000 (10:09 +0930)] 
Revert "Re: ld script expression parsing"

This reverts commit 6afc66a7772e69ac3888b496e12d3c8f257c693c.

3 years agoAutomatic date update in version.in
GDB Administrator [Wed, 11 Aug 2021 00:00:54 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Tue, 10 Aug 2021 00:01:02 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Mon, 9 Aug 2021 00:01:04 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sun, 8 Aug 2021 00:00:55 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoPR28186, SEGV elf.c:7991:30 in _bfd_elf_fixup_group_sections
Alan Modra [Sat, 7 Aug 2021 04:40:38 +0000 (14:10 +0930)] 
PR28186, SEGV elf.c:7991:30 in _bfd_elf_fixup_group_sections

PR 28186
* elf.c (_bfd_elf_fixup_group_sections): Don't segfault on
objcopy/strip with NULL output_section.

(cherry picked from commit 182ad37589e3931390d0c43f1d52a9a6e0062a61)

3 years agoAutomatic date update in version.in
GDB Administrator [Sat, 7 Aug 2021 00:00:55 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Fri, 6 Aug 2021 00:00:51 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 5 Aug 2021 00:01:14 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoIBM Z: Add another arch14 instruction
Andreas Krebbel [Wed, 7 Jul 2021 12:05:00 +0000 (14:05 +0200)] 
IBM Z: Add another arch14 instruction

opcodes/

* opcodes/s390-opc.txt: Add qpaci.

gas/

* testsuite/gas/s390/zarch-arch14.d: Add qpaci.
* testsuite/gas/s390/zarch-arch14.s: Add qpaci.

(cherry picked from commit e4cc3b47ec2c4bdb1892db7e9759f90576742f31)

4 years agoIBM Z: Remove lpswey parameter
Andreas Krebbel [Wed, 4 Aug 2021 14:51:36 +0000 (16:51 +0200)] 
IBM Z: Remove lpswey parameter

opcodes/
* s390-opc.c (INSTR_SIY_RD): New instruction format.
(MASK_SIY_RD): New instruction mask.
* s390-opc.txt: Change instruction format of lpswey to SIY_RD.

gas/
* testsuite/gas/s390/zarch-arch14.d: Remove last operand of
lpswey.
* testsuite/gas/s390/zarch-arch14.s: Likewise.

(cherry picked from commit a164bbda300d1da6f97bfa14ba7fa22475e61d17)

4 years agoPR28156, rename.c doesn't compile with MinGW
Alan Modra [Wed, 4 Aug 2021 05:14:08 +0000 (14:44 +0930)] 
PR28156, rename.c doesn't compile with MinGW

Guard against lack of struct timespec definition.

PR 28156
* rename.c (get_stat_atime, get_stat_mtime): Don't compile
unless HAVE_UTIMENSAT is defined.

(cherry picked from commit 47fcfcbadce36c7ccc00c69b4c80717a0d6b9288)

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 4 Aug 2021 00:00:58 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 3 Aug 2021 00:01:02 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 2 Aug 2021 00:00:59 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 1 Aug 2021 00:00:55 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 31 Jul 2021 00:01:06 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 30 Jul 2021 00:01:04 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agobfd: Close the file descriptor if there is no archive fd
H.J. Lu [Mon, 26 Jul 2021 12:59:55 +0000 (05:59 -0700)] 
bfd: Close the file descriptor if there is no archive fd

Close the file descriptor if there is no archive plugin file descriptor
to avoid running out of file descriptors on thin archives with many
archive members.

bfd/

PR ld/28138
* plugin.c (bfd_plugin_close_file_descriptor): Close the file
descriptor there is no archive plugin file descriptor.

ld/

PR ld/28138
* testsuite/ld-plugin/lto.exp: Run tmpdir/pr28138 only for
native build.

PR ld/28138
* testsuite/ld-plugin/lto.exp: Run ld/28138 tests.
* testsuite/ld-plugin/pr28138.c: New file.
* testsuite/ld-plugin/pr28138-1.c: Likewise.
* testsuite/ld-plugin/pr28138-2.c: Likewise.
* testsuite/ld-plugin/pr28138-3.c: Likewise.
* testsuite/ld-plugin/pr28138-4.c: Likewise.
* testsuite/ld-plugin/pr28138-5.c: Likewise.
* testsuite/ld-plugin/pr28138-6.c: Likewise.
* testsuite/ld-plugin/pr28138-7.c: Likewise.

(cherry picked from commit 5a98fb7513b559e20dfebdbaa2a471afda3b4742)
(cherry picked from commit 7dc37e1e1209c80e0bab784df6b6bac335e836f2)

4 years agoRe: opcodes: constify & local meps macros
Alan Modra [Sat, 3 Jul 2021 02:09:24 +0000 (11:39 +0930)] 
Re: opcodes: constify & local meps macros

Commit f375d32b35ce changed a generated file.  Edit the source instead.

* mep.opc (macros): Make static and const.
(lookup_macro): Return and use const pointer.
(expand_macro): Make mac param const.
(expand_string): Make pmacro const.

(cherry picked from commit 4dcdbbd1bc1d14f2caff3bb4f8fe1f0e5dabcb85)

4 years agotexi2pod.pl: add no-op --no-split option support [PR28144]
Sergei Trofimovich [Mon, 26 Jul 2021 21:51:18 +0000 (22:51 +0100)] 
texi2pod.pl: add no-op --no-split option support [PR28144]

Change 2faf902da ("generate single html manual page by default")
added use of --no-split option to makeinfo. binutils reuses
makeinfo options for texi2pod.pl wrapper. Unsupported option
led to silent manpage truncation.

The change adds no-op option support.

etc/
PR 28144
* texi2pod.pl: Handle no-op --no-split option.

(cherry picked from commit 96a7037cd8573cf065aa6b12baca68696f96d9ca)

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 29 Jul 2021 00:01:00 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 28 Jul 2021 00:00:56 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 27 Jul 2021 00:01:04 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 26 Jul 2021 00:00:53 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 25 Jul 2021 00:00:59 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoRevert: PowerPC: Don't generate unused section symbols
Alan Modra [Sat, 24 Jul 2021 06:04:55 +0000 (15:34 +0930)] 
Revert: PowerPC: Don't generate unused section symbols

Blindly following x86 broke linux kernel builds.

bfd/
* elf32-ppc.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define as true.
* elf64-ppc.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Likewise.
gas/
* testsuite/gas/ppc/power4.d: Adjust for section sym change.
* testsuite/gas/ppc/test1elf32.d: Likewise.
* testsuite/gas/ppc/test1elf64.d: Likewise.
ld/
* testsuite/ld-powerpc/tlsexe.r: Adjust for section sym change.
* testsuite/ld-powerpc/tlsexe32.r: Likewise.
* testsuite/ld-powerpc/tlsexe32no.r: Likewise.
* testsuite/ld-powerpc/tlsexeno.r: Likewise.
* testsuite/ld-powerpc/tlsexenors.r: Likewise.
* testsuite/ld-powerpc/tlsexers.r: Likewise.
* testsuite/ld-powerpc/tlsexetoc.r: Likewise.
* testsuite/ld-powerpc/tlsexetocrs.r: Likewise.
* testsuite/ld-powerpc/tlsget.d: Likewise.
* testsuite/ld-powerpc/tlsget.wf: Likewise.
* testsuite/ld-powerpc/tlsget2.d: Likewise.
* testsuite/ld-powerpc/tlsget2.wf: Likewise.
* testsuite/ld-powerpc/tlsso.r: Likewise.
* testsuite/ld-powerpc/tlsso32.r: Likewise.
* testsuite/ld-powerpc/tlstocso.r: Likewise.

(cherry picked from commit c09c8b42021180eee9495bd50d8b35e683d3901b)

4 years agoRe: ld script expression parsing
Alan Modra [Thu, 22 Jul 2021 12:11:15 +0000 (21:41 +0930)] 
Re: ld script expression parsing

Commit 40726f16a8d7 broke references to sections within ADDR(), and
overlays with weird section names.

* ldgram.y (paren_script_name): New rule.
(exp): Use it for ALIGNOF, SIZEOF, ADDR, and LOADADDR.  Similarly
ensure script mode parsing for section name in SEGMENT_START.
(overlay_section): Delete unnecessary ldlex_script call.  Backup
on a lookahead NAME parsed in expression mode.
* testsuite/ld-elf/overlay.s: Add more sections.
* testsuite/ld-elf/overlay.t: Test '-' in section names.

(cherry picked from commit 553dd76c7e49e3e6afb528ff865589da8f6f3e1c)

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 24 Jul 2021 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 23 Jul 2021 00:00:59 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 22 Jul 2021 00:00:56 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoUpdated Russian translation for the bfd library
Nick Clifton [Wed, 21 Jul 2021 13:38:32 +0000 (14:38 +0100)] 
Updated Russian translation for the bfd library

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 21 Jul 2021 00:00:59 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoPR28106, build of 2.37 fails on FreeBSD and Clang
Alan Modra [Tue, 20 Jul 2021 09:16:57 +0000 (18:46 +0930)] 
PR28106, build of 2.37 fails on FreeBSD and Clang

https://en.cppreference.com/w/cpp/types/NULL says NULL might be
defined as nullptr.
https://en.cppreference.com/w/cpp/language/reinterpret_cast says
reinterpret_cast can't be used on nullptr.

PR gold/28106
PR gold/27815
* gc.h (gc_process_relocs): Use static_cast in Section_id constructor.

(cherry picked from commit b97bd976233ee4d43c2fe18f6356e62779cbe82d)

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 20 Jul 2021 00:00:56 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoChange "uint" to "unsigned"
Christopher Wellons [Sun, 18 Jul 2021 20:57:19 +0000 (16:57 -0400)] 
Change "uint" to "unsigned"

This fixes a defect introduced in 25162c795. The "uint" type has not
been explicitly defined here on mingw, causing compilation to fail.

On linux we have this in /usr/include/sys/types.h

/* Old compatibility names for C types.  */
typedef unsigned long int ulong;
typedef unsigned short int ushort;
typedef unsigned int uint;

So it's easy to see how such bugs can creep in.

* rust-demangle.c (struct rust_demangler): Change type of
"recursion" to unsigned.
(RUST_NO_RECURSION_LIMIT): Similarly in cast.

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 19 Jul 2021 00:00:41 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoRe-enable development on the 2.37 branch
Nick Clifton [Sun, 18 Jul 2021 18:45:19 +0000 (19:45 +0100)] 
Re-enable development on the 2.37 branch

4 years agoThis is the 2.37 release binutils-2_37
Nick Clifton [Sun, 18 Jul 2021 16:46:54 +0000 (17:46 +0100)] 
This is the 2.37 release

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 18 Jul 2021 00:00:58 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 17 Jul 2021 00:00:47 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoUpdated Swedish translation for the binutils sub-directory
Nick Clifton [Fri, 16 Jul 2021 12:56:37 +0000 (13:56 +0100)] 
Updated Swedish translation for the binutils sub-directory

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 16 Jul 2021 00:00:40 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoFix a stack exhaustion problem in the Rust demangling code in the libiberty library.
Nick Clifton [Thu, 15 Jul 2021 15:51:56 +0000 (16:51 +0100)] 
Fix a stack exhaustion problem in the Rust demangling code in the libiberty library.

PR 99935
* rust-demangle.c: Add recursion limit.

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 15 Jul 2021 00:00:43 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 14 Jul 2021 00:00:40 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 13 Jul 2021 00:00:47 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoUpdated French translation for the binutils sub-directory
Nick Clifton [Mon, 12 Jul 2021 13:20:35 +0000 (14:20 +0100)] 
Updated French translation for the binutils sub-directory

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 12 Jul 2021 00:00:37 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 11 Jul 2021 00:00:40 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 10 Jul 2021 00:00:36 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 9 Jul 2021 00:00:36 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agox86-64: Disallow PC reloc against weak undefined symbols in PIE
H.J. Lu [Thu, 8 Jul 2021 21:03:53 +0000 (14:03 -0700)] 
x86-64: Disallow PC reloc against weak undefined symbols in PIE

Disallow PC relocations against weak undefined symbols in PIE since they
can lead to non-zero address at run-time.

bfd/

PR ld/21782
* elf64-x86-64.c (elf_x86_64_relocate_section): Disallow PC
relocations against weak undefined symbols in PIE.

ld/

PR ld/21782
* testsuite/ld-x86-64/pie3.d: Expect linker error.

(cherry picked from commit 661b504df9bfb8d7c5d669091720e1dc0079c05e)

4 years agoUpdated Portuguese translation for the BFD sub-directory
Nick Clifton [Thu, 8 Jul 2021 11:38:46 +0000 (12:38 +0100)] 
Updated Portuguese translation for the BFD sub-directory

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 8 Jul 2021 00:00:37 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoelf/riscv: Fix relaxation with aliases [PR28021]
Michael Matz [Mon, 28 Jun 2021 15:57:17 +0000 (17:57 +0200)] 
elf/riscv: Fix relaxation with aliases [PR28021]

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 235f5ef4a6b8fbdcfaea8b629f7c6a9792a789de)

4 years agold: Check archive only for archive member
H.J. Lu [Wed, 7 Jul 2021 14:47:00 +0000 (07:47 -0700)] 
ld: Check archive only for archive member

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 7a30ac441a4e776e68399cb916c4731b5192e931)

4 years agoFix Solaris gprof build with --disable-nls
Rainer Orth [Wed, 7 Jul 2021 11:56:21 +0000 (13:56 +0200)] 
Fix Solaris gprof build with --disable-nls

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.

4 years agoCheck for strnlen declaration to fix Solaris 10 build
Rainer Orth [Wed, 7 Jul 2021 11:55:14 +0000 (13:55 +0200)] 
Check for strnlen declaration to fix Solaris 10 build

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.

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 7 Jul 2021 00:00:40 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 6 Jul 2021 00:00:38 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agold: Cache and reuse the IR archive file descriptor
H.J. Lu [Mon, 5 Jul 2021 15:54:54 +0000 (08:54 -0700)] 
ld: Cache and reuse the IR archive file descriptor

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 918172470430ea6fa082c941e6789add88331197)

4 years agoReapply patch to allow libiberty to be built with LTO enabled.
Nick Clifton [Mon, 5 Jul 2021 15:23:59 +0000 (16:23 +0100)] 
Reapply patch to allow libiberty to be built with LTO enabled.

Reapply this change from commit:
50ad1254d5030d0804cbf89c758359ae202e8d55

* 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.

4 years agoUpdated translations
Nick Clifton [Mon, 5 Jul 2021 14:53:36 +0000 (15:53 +0100)] 
Updated translations

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 5 Jul 2021 00:00:37 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 4 Jul 2021 00:00:36 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoRegenerate gprof/configure
Nick Clifton [Sat, 3 Jul 2021 14:32:53 +0000 (15:32 +0100)] 
Regenerate gprof/configure

4 years agoUpdate version number and regenerate files
Nick Clifton [Sat, 3 Jul 2021 14:13:10 +0000 (15:13 +0100)] 
Update version number and regenerate files

4 years agoAdd markers for 2.37 branch
Nick Clifton [Sat, 3 Jul 2021 13:50:57 +0000 (14:50 +0100)] 
Add markers for 2.37 branch

4 years agoSynchronize libiberty sources (and include/demangle.h) with GCC master version
Nick Clifton [Sat, 3 Jul 2021 13:00:33 +0000 (14:00 +0100)] 
Synchronize libiberty sources (and include/demangle.h) with GCC master version

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 3 Jul 2021 00:00:10 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoUse 'const' in ada-exp.y
Tom Tromey [Fri, 2 Jul 2021 19:22:18 +0000 (13:22 -0600)] 
Use 'const' in ada-exp.y

I found a few spots in ada-exp.y that could use 'const'.
Tested by rebuilding.

2021-07-02  Tom Tromey  <tromey@adacore.com>

* ada-exp.y (chop_selector, chop_separator, write_selectors)
(write_ambiguous_var, get_symbol_field_type): Use const.

4 years agoDocument TUI improvements in the manual & NEWS
Pedro Alves [Fri, 4 Jun 2021 16:12:41 +0000 (17:12 +0100)] 
Document TUI improvements in the manual & NEWS

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: Hannes Domani <ssbssa@yahoo.de>
Change-Id: I0d79a795d8ac561fd28cdc5184bff029ba28bc64

4 years agoFix an illegal memory access triggered by an attempt to parse a corrupt input file.
Nick Clifton [Fri, 2 Jul 2021 13:56:36 +0000 (14:56 +0100)] 
Fix an illegal memory access triggered by an attempt to parse a corrupt input file.

PR 28046
* dwarf2.c (read_ranges): Check that range_ptr does not exceed
range_end.

4 years agoPR28048, heap-buffer-overflow on readelf -Ww
Alan Modra [Fri, 2 Jul 2021 13:48:04 +0000 (23:18 +0930)] 
PR28048, heap-buffer-overflow on readelf -Ww

PR 28048
* dwarf.c (get_type_signedness): Don't run off end of buffer
printing DW_FORM_string attribute.

4 years agoRe: Fix minor NDS32 renaming snafu
Alan Modra [Fri, 2 Jul 2021 07:57:31 +0000 (17:27 +0930)] 
Re: Fix minor NDS32 renaming snafu

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.

4 years agoFix minor NDS32 renaming snafu.
Nick Clifton [Fri, 2 Jul 2021 09:45:02 +0000 (10:45 +0100)] 
Fix minor NDS32 renaming snafu.

* config/tc-nds32.c: Change all references of keyword_gpr to
nds32_keyword_gpr.

4 years agosim: unify reserved instruction bits settings
Mike Frysinger [Thu, 1 Jul 2021 05:04:48 +0000 (01:04 -0400)] 
sim: unify reserved instruction bits settings

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.

4 years agosim: m32r: merge with common configure script
Mike Frysinger [Thu, 1 Jul 2021 04:50:17 +0000 (00:50 -0400)] 
sim: m32r: merge with common configure script

Now that the traps code has been unified, the configure script has no
unique logic in it, so it can be merged into the single common one.

4 years agosim: m32r: reformat linux traps code
Mike Frysinger [Thu, 1 Jul 2021 04:49:33 +0000 (00:49 -0400)] 
sim: m32r: reformat linux traps code

Do this as a sep commit to try and make the history easier to review.

4 years agosim: m32r: unify ELF & Linux traps logic
Mike Frysinger [Thu, 1 Jul 2021 04:28:10 +0000 (00:28 -0400)] 
sim: m32r: unify ELF & Linux traps logic

This makes the simulator work the same regardless of the target (bare
metal m32r-elf or Linux m32r-linux-gnu) by unifying the traps code.
It was mostly already the same with the only difference being support
for trap #2 reserved for Linux syscalls.  We can move that logic to
runtime by checking the current environment operating mode instead.

4 years agosim: m32r: replace custom endian helpers with sim-endian
Mike Frysinger [Thu, 1 Jul 2021 04:17:38 +0000 (00:17 -0400)] 
sim: m32r: replace custom endian helpers with sim-endian

This improves the logic a bit by making the host<->target translations
a bit more clear.  The structs still bleed way too much between the two
worlds, but let's fix one thing at a time.

4 years agosim: m32r: fix virtual environment with Linux targets
Mike Frysinger [Thu, 1 Jul 2021 00:30:43 +0000 (20:30 -0400)] 
sim: m32r: fix virtual environment with Linux targets

We don't want to handle Linux syscalls when in the virtual environment,
just the user environment, so adjust the Linux traps logic to check for
that specifically (instead of just skipping the operating environment).

Also tweak some testcases to explicitly specify the environment they run
under rather than relying on the default matching their needs.  This gets
the tests passing for all m32r targets.

4 years agosim: m32r: namespace Linux syscall table
Mike Frysinger [Wed, 30 Jun 2021 22:39:17 +0000 (18:39 -0400)] 
sim: m32r: namespace Linux syscall table

The use of __NR_ defines in here conflicts a lot with the standard
host syscalls, sometimes leading to build errors (when the numbers
happen to be the same we get duplicate case handlers), and other
times leading to misbehavior (where the m32r syscall # is not what
is actually checked).

Namespace these using the standard that we already use: change the
__NR_ to TARGET_LINUX_SYS_ with a simple `sed`.

Also add a few missing includes so the code at least compiles.

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 2 Jul 2021 00:00:12 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agocgen: split GUILE setting out
Mike Frysinger [Tue, 29 Jun 2021 01:26:48 +0000 (21:26 -0400)] 
cgen: split GUILE setting out

This makes it easier to override to point to an older version of guile.
The current cgen code doesn't work with guile-2, so need to point to an
older guile-1.8.

4 years agoopcodes: constify & local meps macros
Mike Frysinger [Sun, 27 Jun 2021 06:17:27 +0000 (02:17 -0400)] 
opcodes: constify & local meps macros

Avoid exporting this common variable name into writable data.

4 years agoopcodes: cleanup nds32 variables
Mike Frysinger [Sun, 27 Jun 2021 06:14:29 +0000 (02:14 -0400)] 
opcodes: cleanup nds32 variables

For the variables that don't need to be exported, mark them static.
For the ones shared between modules, add a "nds32_" prefix to avoid
collisions with these common variable names.