[binutils-gdb/binutils-2_38-branch] This is the 2.38 GNU Binutils release

Nick Clifton nickc@sourceware.org
Wed Feb 9 12:01:14 GMT 2022


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=20756b0fbe065a84710aa38f2457563b57546440

commit 20756b0fbe065a84710aa38f2457563b57546440
Author: Nick Clifton <nickc@redhat.com>
Date:   Wed Feb 9 12:01:02 2022 +0000

    This is the 2.38 GNU Binutils release

Diff:
---
 ChangeLog                |     5 +
 ChangeLog.git.2.37-2.38  | 36427 +++++++++++++++++++++++++++++++++++++++++++++
 bfd/ChangeLog            |    11 +
 bfd/Makefile.in          |     1 -
 bfd/configure            |    38 +-
 bfd/development.sh       |     4 +-
 bfd/doc/Makefile.in      |     1 -
 bfd/po/bfd.pot           |   356 +-
 bfd/version.m4           |     2 +-
 binutils/ChangeLog       |     7 +
 binutils/Makefile.in     |     1 -
 binutils/configure       |    38 +-
 binutils/po/binutils.pot |    12 +-
 cpu/ChangeLog            |     4 +
 elfcpp/ChangeLog         |     4 +
 gas/ChangeLog            |     6 +
 gas/Makefile.in          |     1 -
 gas/configure            |    38 +-
 gold/ChangeLog           |     4 +
 gprof/ChangeLog          |     6 +
 gprof/Makefile.in        |     1 -
 gprof/configure          |    38 +-
 include/ChangeLog        |     4 +
 ld/ChangeLog             |     7 +
 ld/Makefile.in           |     1 -
 ld/configure             |    38 +-
 ld/po/ld.pot             |    70 +-
 libctf/ChangeLog         |     4 +
 opcodes/ChangeLog        |     7 +
 opcodes/Makefile.in      |     1 -
 opcodes/configure        |    38 +-
 opcodes/po/opcodes.pot   |     2 +-
 32 files changed, 36794 insertions(+), 383 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e616f6b01c1..345fc71e45d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-02-09  Nick Clifton  <nickc@redhat.com>
+
+	2.38 release.
+	* ChangeLog.git.2.37-2.38: New file.
+
 2022-01-22  Nick Clifton  <nickc@redhat.com>
 
 	* configure: Regenerate.
diff --git a/ChangeLog.git.2.37-2.38 b/ChangeLog.git.2.37-2.38
new file mode 100644
index 00000000000..9405aefc768
--- /dev/null
+++ b/ChangeLog.git.2.37-2.38
@@ -0,0 +1,36427 @@
+2022-02-09  GDB Administrator  <gdbadmin@sourceware.org>
+
+	Automatic date update in version.in
+
+2022-02-08  Palmer Dabbelt  <palmer@rivosinc.com>
+
+	RISC-V: Stop reporting warnings for mismatched extension versions
+	The extension version checking logic is really just too complicated to
+	encode into the linker, trying to do so causes more harm than good.
+	This removes the checks and the associated tests, leaving the logic to
+	keep the largest version of each extension linked into the target.
+
+	bfd/
+
+		* elfnn-riscv.c (riscv_version_mismatch): Rename to
+		riscv_update_subset_version, and stop reporting warnings on
+		version mismatches.
+		(riscv_merge_std_ext): Adjust calls to riscv_version_mismatch.
+		(riscv_merge_multi_letter_ext): Likewise.
+
+	ld/
+		* testsuite/ld-riscv-elf/attr-merge-arch-failed-01.d: Remove
+		* testsuite/ld-riscv-elf/attr-merge-arch-failed-01a.s: Likewise
+		* testsuite/ld-riscv-elf/attr-merge-arch-failed-01b.s: Likewise
+		* testsuite/ld-riscv-elf/attr-merge-arch-failed-02.d: Likewise
+		* testsuite/ld-riscv-elf/attr-merge-arch-failed-02a.s: Likewise
+		* testsuite/ld-riscv-elf/attr-merge-arch-failed-02b.s: Likewise
+		* testsuite/ld-riscv-elf/attr-merge-arch-failed-02c.s: Likewise
+		* testsuite/ld-riscv-elf/attr-merge-arch-failed-02d.s: Likewise
+		* testsuite/ld-riscv-elf/attr-merge-user-ext-01.d: New test.
+		* testsuite/ld-riscv-elf/attr-merge-user-ext-rv32i21_m2p0.s:
+		Likewise.
+		* testsuite/ld-riscv-elf/attr-merge-user-ext-rv32i21_m2p1.s:
+		Likewise.
+		* testsuite/ld-riscv-elf/ld-riscv-elf.exp: Remove obselete
+		attr-merge-arch-failed-{01,02}, replace with
+		attr-merge-user-ext-01.
+
+2022-02-08  H.J. Lu  <hjl.tools@gmail.com>
+
+	i386: Allow GOT32 relocations against ABS symbols
+	GOT32 relocations are allowed since absolute value + addend is stored in
+	the GOT slot.
+
+	Tested on glibc 2.35 build with GCC 11.2 and -Os.
+
+	bfd/
+
+		PR ld/28870
+		* elfxx-x86.c (_bfd_elf_x86_valid_reloc_p): Also allow GOT32
+		relocations.
+
+	ld/
+
+		PR ld/28870
+		* testsuite/ld-i386/i386.exp: Run pr28870.
+		* testsuite/ld-i386/pr28870.d: New file.
+		* testsuite/ld-i386/pr28870.s: Likewise.
+
+	(cherry picked from commit 30a954525f4e53a9cd50a1a8a6f201c7cf6595c7)
+
+2022-02-08  GDB Administrator  <gdbadmin@sourceware.org>
+
+	Automatic date update in version.in
+
+2022-02-07  Alan Modra  <amodra@gmail.com>
+
+	Revert "elf: Remove the 1-page gap before the RELRO segment"
+	This reverts commit 2f83249c13d86065b4c7cdb198ea871017b4bba1.
+
+		PR ld/28743
+		* ldlang.c (lang_size_relro_segment_1): Revert 2022-01-10 changes.
+		* testsuite/ld-i386/pr20830.d: Likewise.
+		* testsuite/ld-s390/gotreloc_64-relro-1.dd: Likewise.
+		* testsuite/ld-x86-64/pr14207.d: Likewise.
+		* testsuite/ld-x86-64/pr18176.d: Likewise.
+		* testsuite/ld-x86-64/pr20830a-now.d: Likewise.
+		* testsuite/ld-x86-64/pr20830a.d: Likewise.
+		* testsuite/ld-x86-64/pr20830b-now.d: Likewise.
+		* testsuite/ld-x86-64/pr20830b.d: Likewise.
+		* testsuite/ld-x86-64/pr21038a-now.d: Likewise.
+		* testsuite/ld-x86-64/pr21038a.d: Likewise.
+		* testsuite/ld-x86-64/pr21038b-now.d: Likewise.
+		* testsuite/ld-x86-64/pr21038c-now.d: Likewise.
+		* testsuite/ld-x86-64/pr21038c.d: Likewise.
+
+2022-02-07  Alan Modra  <amodra@gmail.com>
+
+	Revert "ld: Rewrite lang_size_relro_segment_1"
+	This reverts commit 8b7c6a1fbab5b0efc6abb50cdb24aef3954ac018.
+
+		PR ld/28743
+		PR ld/28819
+		* ldlang.c (lang_size_relro_segment_1): Revert 2022-01-14 change.
+		testsuite/ld-x86-64/pr28743-1.d: Likewise.
+		testsuite/ld-x86-64/pr28743-1.s: Likewise.
+		testsuite/ld-x86-64/x86-64.exp: Likewise.
+
+2022-02-07  GDB Administrator  <gdbadmin@sourceware.org>
+
+	Automatic date update in version.in
+
+2022-02-06  GDB Administrator  <gdbadmin@sourceware.org>
+
+	Automatic date update in version.in
+
+2022-02-05  H.J. Lu  <hjl.tools@gmail.com>
+
+	x86: Skip undefined symbol when finishing DT_RELR
+	Don't abort for undefined symbol when finishing DT_RELR.  Instead, skip
+	undefined symbol.  Undefined symbol will be reported by relocate_section.
+
+		* elfxx-x86.c (elf_x86_size_or_finish_relative_reloc): Skip
+		undefined symbol in finishing phase.
+
+	(cherry picked from commit a9e61227c09c03d5cb54f9c88520baffc1d86c86)
+
+2022-02-05  Alan Modra  <amodra@gmail.com>
+
+	PR28827 testcase
+	This testcase triggers a stub sizing error with the patches applied
+	for PR28743 (commit 2f83249c13d8 and c804c6f98d34).
+
+		PR 28827
+		* testsuite/ld-powerpc/pr28827-1.s,
+		* testsuite/ld-powerpc/pr28827-1.d: New test.
+		* testsuite/ld-powerpc/powerpc.exp: Run it.
+
+	(cherry picked from commit 9810db10f726f47c8e878ca4b0b4b4f5e9c16a5d)
+	(cherry picked from commit 0acf434a23768449cbb4b3732355f3f2febecaee)
+
+2022-02-05  Alan Modra  <amodra@gmail.com>
+
+	Enable "size" as a dumpprog in ld
+	binutils/
+		* testsuite/lib/binutils-common.exp (run_dump_test): Reference
+		global SIZE and SIZEFLAGS.
+	ld/
+		* testsuite/config/default.exp: Define SIZE and SIZEFLAGS.
+
+	(cherry picked from commit cd8adbf3017272877c7e196e2e326f888f207bd9)
+
+2022-02-05  Alan Modra  <amodra@gmail.com>
+
+	Detect .eh_frame_hdr earlier for SIZEOF_HEADERS
+	Current code detects the need for PT_GNU_EH_FRAME using a field set by
+	_bfd_elf_discard_section_eh_frame_hdr, which is called fairly late in
+	the linking process.  Use the elf hash table eh_info instead, which is
+	set up earlier by size_dynamic_sections.
+
+		* elf-bfd.h (struct output_elf_obj_tdata): Delete eh_frame_hdr.
+		(elf_eh_frame_hdr): Don't define.
+		(_bfd_elf_discard_section_eh_frame_hdr): Update prototype.
+		* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame_hdr): Delete
+		abfd parameter.  Don't set elf_eh_frame_hdr.
+		* elf.c (elf_eh_frame_hdr): New function.
+		(get_program_header_size): Adjust elf_eh_frame_hdr call.
+		(_bfd_elf_map_sections_to_segments): Likewise.
+
+	(cherry picked from commit 8df52eeeb06efcccd6b840689ad8e11ebb264e7f)
+
+2022-02-05  Alan Modra  <amodra@gmail.com>
+
+	PowerPC64 treatment of absolute symbols
+	Supporting -static-pie on PowerPC64 requires the linker to properly
+	treat SHN_ABS symbols for cases like glibc's _nl_current_LC_CTYPE_used
+	absolute symbol.  I've been slow to fix the linker on powerpc because
+	there is some chance that this will break some shared libraries or
+	PIEs.
+
+	bfd/
+		* elf64-ppc.c (ppc64_elf_check_relocs): Consolidate local sym
+		handling code.  Don't count dyn relocs against non-dynamic
+		absolute symbols.
+		(dec_dynrel_count): Adjust to suit.
+		(ppc64_elf_edit_toc): Don't remove entries for absolute symbols
+		when pic.
+		(allocate_got): Don't allocate space for got relocs against
+		non-dynamic absolute syms.
+		(ppc64_elf_layout_multitoc): Likewise.
+		(got_and_plt_relr): Likewise.
+		(ppc64_elf_size_dynamic_sections): Likewise for local got.
+		(got_and_plt_relr_for_local_syms): Likewise.
+		(ppc64_elf_size_stubs): Don't allocate space for relr either.
+		(ppc64_elf_relocate_section): Don't write relocs against non-dynamic
+		absolute symbols.  Don't optimise got and toc code sequences
+		loading absolute symbol entries.
+	ld/
+		* testsuite/ld-powerpc/abs-reloc.s,
+		* testsuite/ld-powerpc/abs-static.d,
+		* testsuite/ld-powerpc/abs-static.r,
+		* testsuite/ld-powerpc/abs-pie.d,
+		* testsuite/ld-powerpc/abs-pie.r,
+		* testsuite/ld-powerpc/abs-shared.d,
+		* testsuite/ld-powerpc/abs-shared.r,
+		* testsuite/ld-powerpc/abs-pie-relr.d,
+		* testsuite/ld-powerpc/abs-pie-relr.r,
+		* testsuite/ld-powerpc/abs-shared-relr.d,
+		* testsuite/ld-powerpc/abs-shared-relr.r: New tests.
+		* testsuite/ld-powerpc/powerpc.exp: Run them.
+
+	(cherry picked from commit 3a3a4c1fe4ccb1914d29fbf8f5930d55aacec78f)
+
+2022-02-05  Alan Modra  <amodra@gmail.com>
+
+	PR28827, assertion building LLVM 9 on powerpc64le-linux-gnu
+	The assertion is this one in ppc_build_one_stub
+	  BFD_ASSERT (stub_entry->stub_offset >= stub_entry->group->stub_sec->size);
+	It is checking that a stub doesn't overwrite the tail of a previous
+	stub, so not something trivial.
+
+	Normally, stub sizing iterates until no stubs are added, detected by
+	no change in stub section size.  Iteration also continues if no stubs
+	are added but one or more stubs increases in size, which also can be
+	detected by a change in stub section size.  But there is a
+	pathological case where stub section sizing decreases one iteration
+	then increases the next.  To handle that situation, stub sizing also
+	stops at more than STUB_SHRINK_ITER (20) iterations when calculated
+	stub section size is smaller.  The previous larger size is kept for
+	the actual layout (so that building the stubs, which behaves like
+	another iteration of stub sizing, will see the stub section sizes
+	shrink).  The problem with that stopping condition is that it assumes
+	that stub sizing is only affected by addresses external to the stub
+	sections, which isn't always true.
+
+	This patch fixes that by also keeping larger individual stub_offset
+	addresses past STUB_SHRINK_ITER.  It also catches a further
+	pathological case where one stub shrinks and another expands in such a
+	way that no stub section size change is seen.
+
+		PR 28827
+		* elf64-ppc.c (struct ppc_link_hash_table): Add stub_changed.
+		(STUB_SHRINK_ITER): Move earlier in file.
+		(ppc_size_one_stub): Detect any change in stub_offset.  Keep
+		larger one if past STUB_SHRINK_ITER.
+		(ppc64_elf_size_stubs): Iterate on stub_changed too.
+
+	(cherry picked from commit 0441f94fba61998b4bd18487aacf70a672df099c)
+
+	Re: PR28827, assertion building LLVM 9 on powerpc64le-linux-gnu
+
+	The previous patch wasn't quite correct.  The size and padding depends
+	on offset used in the current iteration, and if we're fudging the
+	offset past STUB_SHRINK_ITER then we'd better use that offset.  We
+	can't have plt_stub_pad using stub_sec->size as the offset.
+
+		PR 28827
+		* elf64-ppc.c (plt_stub_pad): Add stub_off param.
+		(ppc_size_one_stub): Set up stub_offset to value used in this
+		iteration before sizing the stub.  Adjust plt_stub_pad calls.
+
+	(cherry picked from commit 2405fc4016feadea33cb747d5654514f62b74ff4)
+
+	Re: PR28827, assertion building LLVM 9 on powerpc64le-linux-gnu
+
+	In trying to find a testcase for PR28827, I managed to hit a linker
+	error in bfd_set_section_contents with a .branch_lt input section
+	being too large for the output .branch_lt.
+
+	bfd/
+		PR 28827
+		* elf64-ppc.c (ppc64_elf_size_stubs): Set section size to
+		maxsize past STUB_SHRINK_ITER before laying out.  Remove now
+		unnecessary conditional setting of maxsize at start of loop.
+	ld/
+		* testsuite/ld-powerpc/pr28827-2.d,
+		* testsuite/ld-powerpc/pr28827-2.lnk,
+		* testsuite/ld-powerpc/pr28827-2.s: New test.
+		* testsuite/ld-powerpc/powerpc.exp: Run it.
+
+	(cherry picked from commit 9ff8aa7d418bc508dbd429576b93e30ed9dc5891)
+
+2022-02-05  Alan Modra  <amodra@gmail.com>
+
+	Update PowerPC64 symtocbase test
+	Using a symbol other than .TOC. with @tocbase is an extension to the
+	ABI.  It is never valid to use a symbol without a definition in the
+	binary, and symbols on these expressions cannot be overridden.  Make
+	this explicit by using ".hidden" in the testcase.
+
+		* testsuite/ld-powerpc/symtocbase-1.s: Align data.  Make function
+		entry symbol hidden.
+		* testsuite/ld-powerpc/symtocbase-2.s: Likewise.
+		* testsuite/ld-powerpc/symtocbase.d: Adjust expected output.
+
+	(cherry picked from commit ef5684c2bdf4d4f9975650e3b7b8f9b0ff98abee)
+
+2022-02-05  Alan Modra  <amodra@gmail.com>
+
+	objcopy --only-keep-debug
+	From: Peilin Ye <peilin.ye@bytedance.com>
+	objcopy's --only-keep-debug option has been broken for ELF files since
+	commit 8c803a2dd7d3.
+
+	  1. binutils/objcopy.c:setup_section() marks non-debug sections as
+	     SHT_NOBITS, then calls bfd_copy_private_section_data();
+	  2. If ISEC and OSEC share the same section flags,
+	     bfd/elf.c:_bfd_elf_init_private_section_data() restores OSEC's
+	     section type back to ISEC's section type, effectively undoing
+	     "make_nobits".
+
+		* objcopy.c (setup_section): Act on make_nobits after calling
+		bfd_copy_private_section_data.
+
+	(cherry picked from commit 7c4643efe7befea8e5063e8b56c0400fd8cee2d5)
+
+2022-02-05  Alan Modra  <amodra@gmail.com>
+
+	PR28826 x86_64 ld segfaults building xen
+	Fallout from commit e86fc4a5bc37
+
+		PR 28826
+		* coffgen.c (coff_write_alien_symbol): Init dummy to zeros.
+
+	(cherry picked from commit 07c9f243b3a12cc6749bc02ee7b165859979348b)
+
+2022-02-05  Alan Modra  <amodra@gmail.com>
+
+	PR28753, buffer overflow in read_section_stabs_debugging_info
+		PR 28753
+		* rddbg.c (read_section_stabs_debugging_info): Don't read past
+		end of section when concatentating stab strings.
+
+	(cherry picked from commit 085b299b71721e15f5c5c5344dc3e4e4536dadba)
+
+2022-02-05  GDB Administrator  <gdbadmin@sourceware.org>
+
+	Automatic date update in version.in
+
+2022-02-04  GDB Administrator  <gdbadmin@sourceware.org>
+
+	Automatic date update in version.in
+
+2022-02-03  H.J. Lu  <hjl.tools@gmail.com>
+
+	x86: Update X86_64_GOT_TYPE_P to cover more GOT relocations
+	Add R_X86_64_GOT32, R_X86_64_GOT64, R_X86_64_GOTPCREL64 and
+	R_X86_64_GOTPLT64 to X86_64_GOT_TYPE_P to cover more GOT relocations.
+
+		PR ld/28858
+		* elfxx-x86.h (X86_64_GOT_TYPE_P): Add R_X86_64_GOT32,
+		R_X86_64_GOT64, R_X86_64_GOTPCREL64 and R_X86_64_GOTPLT64.
+
+	(cherry picked from commit 8d26ee1cd166b8565df17c82e7ecc9d35b5a367f)
+
+2022-02-03  GDB Administrator  <gdbadmin@sourceware.org>
+
+	Automatic date update in version.in
+
+2022-02-02  Nick Clifton  <nickc@redhat.com>
+
+	Stop the BFD library from complaining that dwarf debug string sections are too big.
+		PR 28834
+		* dwarf2.c (read_section): Change the heuristic that checks for
+		overlarge dwarf debug info sections.
+
+	Updated French translation for the ld/ and gold/ sub-directories
+
+2022-02-02  GDB Administrator  <gdbadmin@sourceware.org>
+
+	Automatic date update in version.in
+
+2022-02-01  GDB Administrator  <gdbadmin@sourceware.org>
+
+	Automatic date update in version.in
+
+2022-01-31  Nick Clifton  <nickc@redhat.com>
+
+	Import a patch from the GCC mainline to fix an infinite recursion in the Rust demangler.
+		PR 98886
+		PR 99935
+		* rust-demangle.c (struct rust_demangler): Add a recursion
+		counter.
+		(demangle_path): Increment/decrement the recursion counter upon
+		entry and exit.  Fail if the counter exceeds a fixed limit.
+		(demangle_type): Likewise.
+		(rust_demangle_callback): Initialise the recursion counter,
+		disabling if requested by the option flags.
+
+2022-01-31  GDB Administrator  <gdbadmin@sourceware.org>
+
+	Automatic date update in version.in
+
+2022-01-30  GDB Administrator  <gdbadmin@sourceware.org>
+
+	Automatic date update in version.in
+
+2022-01-29  GDB Administrator  <gdbadmin@sourceware.org>
+
+	Automatic date update in version.in
+
+2022-01-28  Nick Clifton  <nickc@redhat.com>
+
+	Updated French translation for the gas sub-directory
+
+2022-01-28  GDB Administrator  <gdbadmin@sourceware.org>
+
+	Automatic date update in version.in
+
+2022-01-27  Nick Clifton  <nickc@redhat.com>
+
+	Updated Swedish translation for the binutils subdirectory
+
+2022-01-27  GDB Administrator  <gdbadmin@sourceware.org>
+
+	Automatic date update in version.in
+
+2022-01-26  H.J. Lu  <hjl.tools@gmail.com>
+
+	ld: Rewrite lang_size_relro_segment_1
+	1. Compute the desired PT_GNU_RELRO segment base and find the maximum
+	section alignment of sections starting from the PT_GNU_RELRO segment.
+	2. Find the first preceding load section.
+	3. Don't add the 1-page gap between the first preceding load section and
+	the relro segment if the maximum page size >= the maximum section
+	alignment.  Align the PT_GNU_RELRO segment first.  Subtract the maximum
+	page size if therer is still a 1-page gap.
+
+		PR ld/28743
+		PR ld/28819
+		* ldlang.c (lang_size_relro_segment_1): Rewrite.
+		* testsuite/ld-x86-64/pr28743-1.d: New file.
+		* testsuite/ld-x86-64/pr28743-1.s: Likewise.
+		* testsuite/ld-x86-64/x86-64.exp: Run pr28743-1.
+
+	(cherry picked from commit c804c6f98d342c3d46f73d7a7ec6229d5ab1c9f3)
+
+2022-01-26  GDB Administrator  <gdbadmin@sourceware.org>
+
+	Automatic date update in version.in
+
+2022-01-25  Klaus Ziegler  <klausz@haus-gisela.de>
+
+	Fix problem building binutils on SPARC/amd64
+		PR 28816
+		* elf/common.h (AT_SUN_HWCAP): Make definition conditional.
+
+2022-01-25  GDB Administrator  <gdbadmin@sourceware.org>
+
+	Automatic date update in version.in
+
+2022-01-24  Martin Sebor  <msebor@redhat.com>
+
+	Fix a problem building the libiberty library with gcc-12.
+		PR 28779
+		* regex.c: Suppress -Wuse-after-free.
+
+2022-01-24  Nick Clifton  <nickc@redhat.com>
+
+	Update Bulgarian, French, Romaniam and Ukranian translation for some of the sub-directories
+
+	Restore accidentally deleted allocfail.sh source file
+
+2022-01-24  GDB Administrator  <gdbadmin@sourceware.org>
+
+	Automatic date update in version.in
+
+2022-01-23  GDB Administrator  <gdbadmin@sourceware.org>
+
+	Automatic date update in version.in
+
+2022-01-22  Martin Storsj?  <martin@martin.st>
+
+	Allow inferring tmp_prefix from the dll name from a def file
+
+2022-01-22  Alexander von Gluck IV  <kallisti5@unixzen.com>
+
+	Adjust default page sizes for haiku arm.
+		* configure.tgt (arm-haiku): Fix typo.
+		* emulparams/armelf_haiku.su (MAXPAGESIZE): Use the default value.
+		(COMMONPAGESIZE): Likewise.
+
+2022-01-22  Nick Clifton  <nickc@redhat.com>
+
+	CHange version number to 2.37.90 and regenerate files
+
+	Add markers for 2.38 branch
+
+2022-01-22  Lifang Xia  <lifang_xia@linux.alibaba.com>
+
+	RISC-V: create new frag after alignment.
+	PR 28793:
+
+	The alignment may be removed in linker. We need to create new frag after
+	alignment to prevent the assembler from computing static offsets.
+
+	gas/
+		* config/tc-riscv.c (riscv_frag_align_code): Create new frag.
+
+2022-01-22  GDB Administrator  <gdbadmin@sourceware.org>
+
+	Automatic date update in version.in
+
+2022-01-21  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	gdb: include gdbsupport/buildargv.h in ser-mingw.c
+	Fixes:
+
+	      CXX    ser-mingw.o
+	    /home/simark/src/binutils-gdb/gdb/ser-mingw.c: In function ‘int pipe_windows_open(serial*, const char*)’:
+	    /home/simark/src/binutils-gdb/gdb/ser-mingw.c:870:3: error: ‘gdb_argv’ was not declared in this scope
+	      870 |   gdb_argv argv (name);
+	          |   ^~~~~~~~
+
+	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28802
+	Change-Id: I7f3e8ec5f9ca8582d587545fdf6b69901259f199
+
+2022-01-21  Nick Clifton  <nickc@redhat.com>
+
+	Updated Serbian translation for the ld sub-directory
+
+2022-01-21  Andrew Burgess  <aburgess@redhat.com>
+
+	gdb/doc: fill in two missing @r
+	I noticed two places in the docs where we appear to be missing @r.
+	makeinfo seems to do the correct things despite these being
+	missing (at least, I couldn't see any difference in the pdf or info
+	output), but it doesn't hurt to have the @r in place.
+
+2022-01-21  Mike Frysinger  <vapier@gentoo.org>
+
+	drop old unused stamp-h.in file
+	This was needed by ancient versions of automake, but that hasn't been
+	the case since at least automake-1.5, so punt this from the tree.
+
+2022-01-21  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	gdbsupport/gdb_regex.cc: replace defs.h include with common-defs.h
+	This was forgotten when gdb_regex was moved from gdb to gdbsupport.
+
+	Change-Id: I73b446f71861cabbf7afdb7408ef9d59fa64b804
+
+2022-01-21  GDB Administrator  <gdbadmin@sourceware.org>
+
+	Automatic date update in version.in
+
+2022-01-20  Tom Tromey  <tromey@adacore.com>
+
+	Avoid bad breakpoints with --gc-sections
+	We found a case where --gc-sections can cause gdb to set an invalid
+	breakpoint.  In the included test case, gdb will set a breakpoint with
+	two locations, one of which is 0x0.
+
+	The code in lnp_state_machine::check_line_address is intended to
+	filter out this sort of problem, but in this case, the entire CU is
+	empty, causing unrelocated_lowpc==0x0 -- which circumvents the check.
+
+	It seems to me that if a CU is empty like this, then it is ok to
+	simply ignore the line table, as there won't be any locations anyway.
+
+2022-01-20  GDB Administrator  <gdbadmin@sourceware.org>
+
+	Automatic date update in version.in
+
+2022-01-19  Maciej W. Rozycki  <macro@embecosm.com>
+
+	Add `set print array-indexes' tests for C/C++ arrays
+	Add `set print array-indexes' tests for C/C++ arrays, complementing one
+	for Fortran arrays.
+
+2022-01-19  Maciej W. Rozycki  <macro@embecosm.com>
+
+	Respect `set print array-indexes' with Fortran arrays
+	Add `set print array-indexes' handling for Fortran arrays.  Currently
+	the setting is ignored and indices are never shown.
+
+	Keep track of the most recent index handled so that any outstanding
+	repeated elements printed when the limit set by `set print elements' is
+	hit have the correct index shown.
+
+	Output now looks like:
+
+	(gdb) set print array-indexes on
+	(gdb) print array_1d
+	$1 = ((-2) = 1, (-1) = 1, (0) = 1, (1) = 1, (2) = 1)
+	(gdb) set print repeats 4
+	(gdb) set print elements 12
+	(gdb) print array_2d
+	$2 = ((-2) = ((-2) = 2, <repeats 5 times>) (-1) = ((-2) = 2, <repeats 5 times>) (0) = ((-2) = 2, (-1) = 2, ...) ...)
+	(gdb)
+
+	for a 5-element vector and a 5 by 5 array filled with the value of 2.
+
+2022-01-19  Maciej W. Rozycki  <macro@embecosm.com>
+
+	Add `set print repeats' tests for C/C++ arrays
+	Add `set print repeats' tests for C/C++ arrays, complementing one for
+	Fortran arrays and covering the different interpretation of the `set
+	print elements' setting in particular where the per-dimension count of
+	the elements handled is matched against the trigger rather than the
+	total element count as with Fortran arrays.
+
+2022-01-19  Maciej W. Rozycki  <macro@embecosm.com>
+
+	Respect `set print repeats' with Fortran arrays
+	Implement `set print repeats' handling for Fortran arrays.  Currently
+	the setting is ignored and always treated as if no limit was set.
+
+	Unlike the generic array walker implemented decades ago the Fortran one
+	is a proper C++ class.  Rather than trying to mimic the old walker then,
+	which turned out a bit of a challenge where interacting with the `set
+	print elements' setting, write it entirely from scratch, by adding an
+	extra specialization handler method for processing dimensions other than
+	the innermost one and letting the specialization class call the `walk_1'
+	method from the handler as it sees fit.  This way repeats can be tracked
+	and the next inner dimension recursed into as a need arises only, or
+	unconditionally in the base class.
+
+	Keep track of the dimension number being handled in the class rather as
+	a parameter to the walker so that it does not have to be passed across
+	by the specialization class.
+
+	Use per-dimension element count tracking, needed to terminate processing
+	early when the limit set by `set print elements' is hit.  This requires
+	extra care too where the limit triggers exactly where another element
+	that is a subarray begins.  In that case rather than recursing we need
+	to terminate processing or lone `(...)' would be printed.  Additionally
+	if the skipped element is the last one in the current dimension we need
+	to print `...' by hand, because `continue_walking' won't print it at the
+	upper level, because it can see the last element has already been taken
+	care of.
+
+	Preserve the existing semantics of `set print elements' where the total
+	count of the elements handled is matched against the trigger level which
+	is unlike with the C/C++ array printer where the per-dimension element
+	count is used instead.
+
+	Output now looks like:
+
+	(gdb) set print repeats 4
+	(gdb) print array_2d
+	$1 = ((2, <repeats 5 times>) <repeats 5 times>)
+	(gdb) set print elements 12
+	(gdb) print array_2d
+	$2 = ((2, <repeats 5 times>) (2, <repeats 5 times>) (2, 2, ...) ...)
+	(gdb)
+
+	for a 5 by 5 array filled with the value of 2.
+
+	Amend existing test cases accordingly that rely on the current incorrect
+	behavior and explicitly request that there be no limit for printing
+	repeated elements there.
+
+	Add suitable test cases as well covering sliced arrays in particular.
+
+	Co-Authored-By: Andrew Burgess <andrew.burgess@embecosm.com>
+
+2022-01-19  John Baldwin  <jhb@FreeBSD.org>
+
+	fbsd-nat: Add include for gdb_argv.
+
+2022-01-19  Alan Modra  <amodra@gmail.com>
+
+	PowerPC64 DT_RELR ELFv1
+	More fun with R_PPC64_NONE found in .opd.  Fixed by the
+	allocate_dynrelocs and ppc64_elf_size_dynamic_sections changes, and
+	since we are doing ifunc, opd and SYMBOL_REFERENCES_LOCAL tests later,
+	don't duplicate that work in check_relocs.
+
+		* elf64-ppc.c (ppc64_elf_check_relocs): Remove opd and ifunc
+		conditions for rel_count.
+		(dec_dynrel_count): Likewise.
+		(allocate_dynrelocs): Test for opd and ifunc when allocating
+		relative relocs.
+		(ppc64_elf_size_dynamic_sections): Likewise.
+
+2022-01-19  Alan Modra  <amodra@gmail.com>
+
+	PowerPC64 DT_RELR local PLT
+	Similarly to the local GOT case.
+
+		* elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
+		space for PLT relocs against local syms when enable_dt_relr.
+
+2022-01-19  Alan Modra  <amodra@gmail.com>
+
+	PowerPC64 DT_RELR local GOT
+	Fixes another case where we end up with superfluous R_PPC64_NONE.
+
+		* elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
+		space for GOT relocs against non-TLS local syms when enable_dt_relr.
+		(ppc64_elf_layout_multitoc): Likewise.
+
+2022-01-19  GDB Administrator  <gdbadmin@sourceware.org>
+
+	Automatic date update in version.in
+
+2022-01-18  Alan Modra  <amodra@gmail.com>
+
+	Re: PowerPC64 DT_RELR
+	HJ: "There are 238 R_PPC64_NONEs in libc.so.6 alone."
+	Indeed, let's make them go away.  I had the SYMBOL_REFERENCES_LOCAL
+	test in the wrong place.  check_relocs is too early to know whether a
+	symbol is dynamic in a shared library.  Lots of glibc symbols are made
+	local by version script, but that doesn't happen until
+	size_dynamic_sections.
+
+		* elf64-ppc.c (ppc64_elf_check_relocs): Don't count relative relocs
+		here depending on SYMBOL_REFERENCES_LOCAL.
+		(dec_dynrel_count): Likewise.
+		(allocate_dynrelocs): Do so here instead.
+
+2022-01-18  Tom Tromey  <tom@tromey.com>
+
+	Fix the remote-sim.c build
+	My earlier patch to move gdb_argv broke the remote-sim.c build.  This
+	patch fixes the bug.  I'm checking it in.
+
+2022-01-18  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	gdbserver: introduce remote_debug_printf
+	Add remote_debug_printf, and use it for all debug messages controlled by
+	remote_debug.
+
+	Change remote_debug to be a bool, which is trivial in this case.
+
+	Change-Id: I90de13cb892faec3830047b571661822b126d6e8
+
+2022-01-18  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	gdbserver: introduce threads_debug_printf, THREADS_SCOPED_DEBUG_ENTER_EXIT
+	Add the threads_debug_printf and THREADS_SCOPED_DEBUG_ENTER_EXIT, which
+	use the logging infrastructure from gdbsupport/common-debug.h.  Replace
+	all debug_print uses that are predicated by debug_threads with
+	threads_dethreads_debug_printf.  Replace uses of the debug_enter and
+	debug_exit macros with THREADS_SCOPED_DEBUG_ENTER_EXIT, which serves
+	essentially the same purpose, but allows showing what comes between the
+	enter and the exit in an indented form.
+
+	Note that "threads" debug is currently used for a bit of everything in
+	GDBserver, not only threads related stuff.  It should ideally be cleaned
+	up and separated logically as is done in GDB, but that's out of the
+	scope of this patch.
+
+	Change-Id: I2d4546464462cb4c16f7f1168c5cec5a89f2289a
+
+2022-01-18  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	gdbserver: turn debug_threads into a boolean
+	debug_threads is always used as a boolean.  Except in ax.cc and
+	tracepoint.cc.  These files have their own macros that use
+	debug_threads, and have a concept of verbosity level.  But they both
+	have a single level, so it's just a boolean in the end.
+
+	Remove this concept of level.  If we ever want to re-introduce it, I
+	think it will be better implemented in a more common location.
+
+	Change debug_threads to bool and adjust some users that were treating it
+	as an int.
+
+	Change-Id: I137f596eaf763a08c977dd74417969cedfee9ecf
+
+2022-01-18  Tom Tromey  <tom@tromey.com>
+
+	Simplify Ada catchpoints
+	All the Ada catchpoints use the same breakpoint_ops contents, because
+	the catchpoint itself records its kind.  This patch simplifies the
+	code by removing the redundant ops structures.
+
+	Move "catch exec" to a new file
+	The "catch exec" code is reasonably self-contained, and so this patch
+	moves it out of breakpoint.c (the second largest source file in gdb)
+	and into a new file, break-catch-exec.c.
+
+	Move "catch fork" to a new file
+	The "catch fork" code is reasonably self-contained, and so this patch
+	moves it out of breakpoint.c (the second largest source file in gdb)
+	and into a new file, break-catch-fork.c.
+
+	Unify "catch fork" and "catch vfork"
+	I noticed that "catch fork" and "catch vfork" are nearly identical.
+	This patch simplifies the code by unifying these two cases.
+
+	Move gdb_regex to gdbsupport
+	This moves the gdb_regex convenience class to gdbsupport.
+
+	Introduce gdb-hashtab module in gdbsupport
+	gdb has some extensions and helpers for working with the libiberty
+	hash table.  This patch consolidates these and moves them to
+	gdbsupport.
+
+	Move gdb obstack code to gdbsupport
+	This moves the gdb-specific obstack code -- both extensions like
+	obconcat and obstack_strdup, and things like auto_obstack -- to
+	gdbsupport.
+
+	Move gdb_argv to gdbsupport
+	This moves the gdb_argv class to a new header in gdbsupport.
+
+	Simplify event_location_probe
+	event_location_probe currently stores two strings, but really only
+	needs one.  This patch simplifies it and removes some unnecessary
+	copies as well.
+
+	Use std::string in event_location
+	This changes event_location to use std::string, removing some manual
+	memory management, and an unnecessary string copy.
+
+	Split event_location into subclasses
+	event_location uses the old C-style discriminated union approach.
+	However, it's better to use subclassing, as this makes the code
+	clearer and removes some chances for error.  This also enables future
+	cleanups to avoid manual memory management and copies.
+
+	Remove EL_* macros from location.c
+	This patch removes the old-style EL_* macros from location.c.  This
+	cleans up the code by itself, IMO, but also enables further cleanups
+	in subsequent patches.
+
+	Boolify explicit_to_string_internal
+	This changes explicit_to_string_internal to use 'bool' rather than
+	'int'.
+
+	Remove a use of xfree in location.c
+	This small cleanup removes a use of xfree from location.c, by
+	switching to unique_xmalloc_ptr.  One function is only used in
+	location.c, so it is made static.  And, another function is changed to
+	avoid a copy.
+
+2022-01-18  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	gdb: use ptid_t::to_string instead of target_pid_to_str in debug statements
+	Same idea as 0fab79556484 ("gdb: use ptid_t::to_string in infrun debug
+	messages"), but throughout GDB.
+
+	Change-Id: I62ba36eaef29935316d7187b9b13d7b88491acc1
+
+2022-01-18  Andrew Burgess  <aburgess@redhat.com>
+
+	gdb: preserve `|` in connection details string
+	Consider this GDB session:
+
+	  $ gdb -q
+	  (gdb) target remote  | gdbserver - ~/tmp/hello.x
+	  Remote debugging using | gdbserver - ~/tmp/hello.x
+	  ... snip ...
+	  (gdb) info connections
+	    Num  What                              Description
+	  * 1    remote gdbserver - ~/tmp/hello.x  Remote target using gdb-specific protocol
+	  (gdb) python conn = gdb.selected_inferior().connection
+	  (gdb) python print(conn.details)
+	  gdbserver - ~/tmp/hello.x
+	  (gdb)
+
+	I think there are two things wrong here, first in the "What" column of
+	the 'info connections' output, I think the text should be:
+
+	  remote | gdbserver - ~/tmp/hello.x
+
+	to correctly show the user how the connection was established.  And in
+	a similar fashion, I think that the `details` string of the
+	gdb.TargetConnection object should be:
+
+	  | gdbserver - ~/tmp/hello.x
+
+	This commit makes this change.  Currently the '|' is detected and
+	removed in gdb/serial.c.  The string passed to the pipe_ops
+	structure (from gdb/ser-pipe.c), doesn't then, contain the `|`, this
+	is instead implied by the fact that it is a pipes based implementation
+	of the serial_ops interface.
+
+	After this commit we still detect the `|` in gdb/serial.c, but we now
+	store the full string (including the `|`) in the serial::name member
+	variable.
+
+	For pipe based serial connections, this name is only used for
+	displaying the two fields I mention above, and in pipe_open (from
+	gdb/ser-pipe.c), and in pipe_open, we now know to skip over the `|`.
+
+	The benefit I see from this change is that GDB's output now more
+	accurately reflects the commands used to start a target, thus making
+	it easier for a user to understand what is going on.
+
+2022-01-18  Tiezhu Yang  <yangtiezhu@loongson.cn>
+
+	gdb: testsuite: print explicit test result for gdb.base/dfp-test.exp
+	In the current code, if decimal floating point is not supported for
+	this target, there is no binary file dfp-test, and also there is no
+	test result after execute the following commands:
+
+	  $ make check-gdb TESTS="gdb.base/dfp-test.exp"
+	  $ grep error gdb/testsuite/gdb.log
+	  /home/loongson/gdb.git/gdb/testsuite/gdb.base/dfp-test.c:39:1: error: decimal floating point not supported for this target
+	  [...]
+	  $ cat gdb/testsuite/gdb.sum
+	  [...]
+	  Running target unix
+	  Running /home/loongson/gdb.git/gdb/testsuite/gdb.base/dfp-test.exp ...
+
+			  === gdb Summary ===
+	  [...]
+
+	With this patch:
+
+	  $ make check-gdb TESTS="gdb.base/dfp-test.exp"
+	  $ cat gdb/testsuite/gdb.sum
+	  [...]
+	  Running target unix
+	  Running /home/loongson/gdb.git/gdb/testsuite/gdb.base/dfp-test.exp ...
+	  UNSUPPORTED: gdb.base/dfp-test.exp: decimal floating point not supported for this target.
+
+			  === gdb Summary ===
+
+	  # of unsupported tests		1
+	  [...]
+
+2022-01-18  Simon Marchi  <simon.marchi@efficios.com>
+
+	bfd/elf64-ppc.c: fix clang -Wbitwise-instead-of-logical warning in ppc64_elf_check_init_fini
+	I see this error with clang-14:
+
+	      CC       elf64-ppc.lo
+	    /home/smarchi/src/binutils-gdb/bfd/elf64-ppc.c:13131:11: error: use of bitwise '&' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
+	      return (check_pasted_section (info, ".init")
+	             ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+	Fix by replacing & with &&.  But given that the check_pasted_section
+	function has side-effects and we want to make sure both calls are made,
+	assign to temporary variables before evaluating the `&&`.
+
+	Change-Id: I849e1b2401bea5f4d8ef3ab9af99ba9e3ef42490
+
+2022-01-18  Alan Modra  <amodra@gmail.com>
+
+	PR28029, debuginfod tests
+	binutils/NEWS says of the change in --process-links semantics:
+	  If other debug section display options are also enabled (eg
+	  --debug-dump=info) then the contents of matching sections in both the main
+	  file and the separate debuginfo file *will* be displayed.  This is because in
+	  most cases the debug section will only be present in one of the files.
+
+	Implying that debug info is dumped without --process-links.  Indeed
+	that appears to be the case for readelf.  This does the same for
+	objdump.
+
+		PR 28029
+		* objdump.c (dump_bfd): Do not exit early when !is_mainfile
+		&& !processlinks, instead just exclude non-debug output.
+		(dump_dwarf): Add is_mainfile parameter and pass to
+		dump_dwarf_section.
+		(dump_dwarf_section): Only display debug sections when
+		!is_mainfile and !process_links.
+
+2022-01-18  Alan Modra  <amodra@gmail.com>
+
+	Check thin archive element file size against archive header
+	Makes it a little less likely for someone to break their thin archives.
+
+		* archive.c (_bfd_get_elt_at_filepos): Check thin archive
+		element file size.
+
+2022-01-18  Alan Modra  <amodra@gmail.com>
+
+	lang_size_relro_segment tidy
+	This function has seen too many minimal change style edits.
+	No functional changes in this patch.
+
+		* ldlang.c (lang_size_relro_segment): Tidy.
+
+2022-01-18  Alan Modra  <amodra@gmail.com>
+
+	PowerPC64 DT_RELR
+	PowerPC64 takes a more traditional approach to DT_RELR than x86.  Count
+	relative relocs in check_relocs, allocate space for them and output in
+	the usual places but not doing so when enable_dt_relr.  DT_RELR is
+	sized in the existing ppc stub relaxation machinery, run via the
+	linker's ldemul_after_allocation hook.  DT_RELR is output in the same
+	function that writes ppc stubs, run via ldemul_finish.
+
+	This support should be considered experimental.
+
+	bfd/
+		* elf64-ppc.c (struct ppc_local_dyn_relocs): Renamed from
+		ppc_dyn_relocs.  Add rel_count field.  Update uses.
+		(struct ppc_dyn_relocs): New.  Replace all uses of elf_dyn_relocs.
+		(struct ppc_link_hash_table): Add relr_alloc, relr_count and
+		relr_addr.
+		(ppc64_elf_copy_indirect_symbol): Merge rel_count.
+		(ppc64_elf_check_relocs): Init rel_count for global and local syms.
+		(dec_dynrel_count): Change r_info param to reloc pointer.  Update
+		all callers.  Handle decrementing rel_count.
+		(allocate_got): Don't allocate space for relative relocs when
+		enable_dt_relr.
+		(allocate_dynrelocs): Likewise.
+		(ppc64_elf_size_dynamic_sections): Likewise.  Handle srelrdyn.
+		(ppc_build_one_stub): Don't emit relative relocs on .branch_lt.
+		(compare_relr_address, append_relr_off): New functions.
+		(got_and_plt_relr_for_local_syms, got_and_plt_relr): Likewise.
+		(ppc64_elf_size_stubs): Size .relr.syn.
+		(ppc64_elf_build_stubs): Emit .relr.dyn.
+		(build_global_entry_stubs_and_plt): Don't output relative relocs
+		when enable_dt_relr.
+		(write_plt_relocs_for_local_syms): Likewise.
+		(ppc64_elf_relocate_section): Likewise.
+	binutils/
+		* testsuite/lib/binutils-common.exp (supports_dt_relr): Add
+		powerpc64.
+	ld/
+		* emulparams/elf64ppc.sh: Source dt-relr.sh.
+		* testsuite/ld-elf/dt-relr-2b.d: Adjust for powerpc.
+		* testsuite/ld-elf/dt-relr-2c.d: Likewise.
+		* testsuite/ld-elf/dt-relr-2d.d: Likewise.
+		* testsuite/ld-elf/dt-relr-2e.d: Likewise.
+
+2022-01-18  Alan Modra  <amodra@gmail.com>
+
+	tweak __ehdr_start visibility and flags for check_relocs
+	bfd/
+		* elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Test linker_def.
+	ld/
+		* ldelf.c (ldelf_before_allocation): Don't force __ehdr_start
+		local and hidden here..
+		* ldlang.c (lang_symbol_tweaks): ..do so here instead and set
+		def_regular and linker_def for check_relocs.  New function
+		extracted from lang_process.
+
+2022-01-18  GDB Administrator  <gdbadmin@sourceware.org>
+
+	Automatic date update in version.in
+
+2022-01-17  Nick Clifton  <nickc@redhat.com>
+
+	Update the config.guess and config.sub files from the master repository and regenerate files.
+
+2022-01-17  Sergey Belyashov  <sergey.belyashov@gmail.com>
+
+	Fix Z80 assembly failure.
+		PR 28762
+		* app.c (do_scrub_chars): Correct handling when the symbol is not 'af'.
+
+2022-01-17  Simon Marchi  <simon.marchi@polymtl.ca>
+
+	gdb/infrun: rename variable and move to more specific scope
+	Move the "started" variable to the scope it's needed, and rename it to
+	"step_over_started".
+
+	Change-Id: I56f3384dbd328f55198063bb855edda10f1492a3
+
+2022-01-17  Jan Beulich  <jbeulich@suse.com>
+
+	x86: adjust struct instr_info field types
+	Now that this lives on the stack, let's have it be a little less
+	wasteful in terms of space. Switch boolean fields to "bool" (also when
+	this doesn't change their size) and also limit the widths of "rex",
+	"rex_used", "op_ad", and "op_index". Do a little bit of re-ordering as
+	well to limit the number of padding holes.
+
+	x86: drop index16 field
+	There's a single use on a generally infrequently taken code path. Put
+	the necessary conditional there instead.
+
+	x86: drop most Intel syntax register name arrays
+	By making use of, in particular, oappend_maybe_intel() there's no need
+	for this redundant set of static data.
+
+	x86: fold variables in memory operand index handling
+	There's no real need for the pseudo-boolean "haveindex" or for separate
+	32-bit / 64-bit index pointers. Fold them into a single "indexes" and
+	set that uniformly to AT&T names, compensating by emitting the register
+	name via oappend_maybe_intel().
+
+	x86: constify disassembler static data
+	Now that the code is intended to be largely thread-safe, we'd better not
+	have any writable static objects.
+
+2022-01-17  GDB Administrator  <gdbadmin@sourceware.org>
+
+	Automatic date update in version.in
+
+2022-01-16  Joel Brobecker  <brobecker@adacore.com>
+
+	gdb/copyright.py: Do not update gdbsupport/Makefile.in
+	This file is generated, so we should not modify it (any modification
+	we make is going to be undone at the next re-generation anyway).
+
+2022-01-16  GDB Administrator  <gdbadmin@sourceware.org>
+
+	Automatic date update in version.in
+
+2022-01-15  GDB Administrator  <gdbadmin@sourceware.org>
+
+	Automatic date update in version.in
+
+2022-01-14  Simon Marchi  <simon.marchi@efficios.com>
+
+	gdb.dlang/demangle.exp: update expected output for _D8demangle4testFnZv
+	Since commit ce2d3708bc8b ("Synchronize binutils libiberty sources with
+	gcc version."), I see this failure:
+
+	    demangle _D8demangle4testFnZv^M
+	    demangle.test(typeof(null))^M
+	    (gdb) FAIL: gdb.dlang/demangle.exp: _D8demangle4testFnZv
+
+	The commit imported the commit 0e32a5aa8bc9 ("libiberty: Add support for
+	D `typeof(*null)' types") from the gcc repository.  That commit includes
+	an update to libiberty/testsuite/d-demangle-expected, which updates a
+	test for the exact same mangled name:
+
+	     _D8demangle4testFnZv
+	    -demangle.test(none)
+	    +demangle.test(typeof(null))
+
+	I don't know anything about D, but give that the change was made by Iain
+	Buclaw, the D language maintainer, I trust him on that.
+
+	Fix our test by updating the expected output in the same way.
+
+	Note: it's not really useful to have all these D demangling tests in the
+	GDB testsuite, since there are demangling tests in libiberty.  We should
+	consider removing them, but we first need to make sure that everything
+	that is covered in gdb/testsuite/gdb.dlang/demangle.exp is also covered
+	in libiberty/testsuite/d-demangle-expected.
+
+	Change-Id: If2b290ea8367b8e1e0b90b20d4a6e0bee517952d
+
+2022-01-14  Nils-Christian Kempke  <nils-christian.kempke@intel.com>
+
+	gdb/testsuite: enable __INTEL_LLVM_COMPILER preprocessor in get_compiler_info
+	Intel Next Gen compiler defines preprocessor __INTEL_LLVM_COMPILER and provides
+	version info in __clang_version__ e.g. value: 12.0.0 (icx 2020.10.0.1113).
+
+	gdb/testsuite/ChangeLog:
+	2020-12-07  Abdul Basit Ijaz  <abdul.b.ijaz@intel.com>
+
+		* lib/compiler.c: Add Intel next gen compiler pre-processor check.
+		* lib/compiler.cc: Ditto.
+		* lib/fortran.exp (fortran_main): Check Intel next gen compiler in
+		test_compiler_info.
+
+2022-01-14  Alan Modra  <amodra@gmail.com>
+
+	PR28751 mbind2a / mbind2b regressions on powerpc*-linux
+	include/
+		* bfdlink.h (struct bfd_link_info): Add commonpagesize_is_set.
+	ld/
+		PR 28751
+		* emultempl/elf.em (handle_option): Set commonpagesize_is_set.
+		* ldelf.c (ldelf_after_parse): Don't error when only one of
+		-z max-page-size or -z common-page-size is given, correct the
+		other value to make it sane.
+		* testsuite/ld-elf/elf.exp (mbind2a, mbind2b): Do not pass
+		-z max-page-size.
+
+2022-01-14  Jan Beulich  <jbeulich@suse.com>
+
+	x86: drop ymmxmm_mode
+	This enumerator is not used by any table entry.
+
+	x86: share yet more VEX table entries with EVEX decoding
+	On top of prior similar work more opportunities have appeared in the
+	meantime. Note that this also happens to address the prior lack of
+	decoding of EVEX.L'L for VMOV{L,H}P{S,D} and VMOV{LH,HL}PS.
+
+	x86: consistently use scalar_mode for AVX512-FP16 scalar insns
+	For some reason the original AVFX512F insns were not taken as a basis
+	here, causing unnecessary divergence. While not an active issue, it is
+	still relevant to note that OP_XMM() has special treatment of e.g.
+	scalar_mode (marking broadcast as invalid). Such would better be
+	consistent for all sufficiently similar insns.
+
+	x86: record further wrong uses of EVEX.b
+	For one EVEX.W set does not imply EVEX.b is uniformly valid. Reject it
+	for modes which occur for insns allowing for EVEX.W to be set (noticed
+	with VMOV{H,L}PD and VMOVDDUP, and only in AT&T mode, but not checked
+	whether further insns would also have been impacted; I expect e.g.
+	VCMPSD would have had the same issue). And then the present concept of
+	broadcast makes no sense at all when the memory operand of an insn is
+	the destination.
+
+2022-01-14  Jan Beulich  <jbeulich@suse.com>
+
+	x86: reduce AVX512 FP set of insns decoded through vex_w_table[]
+	Like for AVX512-FP16, there's not that many FP insns where going through
+	this table is easier / cheaper than using suitable macros. Utilize %XS
+	and %XD more to eliminate a fair number of table entries.
+
+	While doing this I noticed a few anomalies. Where lines get touched /
+	moved anyway, these are being addressed right here:
+	- vmovshdup used EXx for its 2nd operand, thus displaying seemingly
+	  valid broadcast when EVEX.b is set with a memory operand; use
+	  EXEvexXNoBcst instead just like vmovsldup already does
+	- vmovlhps used EXx for its 3rd operand, when all sibling entries use
+	  EXq; switch to EXq there for consistency (the two differ only for
+	  memory operands)
+
+2022-01-14  Jan Beulich  <jbeulich@suse.com>
+
+	x86: reduce AVX512-FP16 set of insns decoded through vex_w_table[]
+	Like already indicated during review of the original submission, there's
+	really only very few insns where going through this table is easier /
+	cheaper than using suitable macros. Utilize %XH more and introduce
+	similar %XS and %XD (which subsequently can be used for further table
+	size reduction).
+
+	While there also switch to using oappend() in 'XH' macro processing.
+
+2022-01-14  GDB Administrator  <gdbadmin@sourceware.org>
+
+	Automatic date update in version.in
+
+2022-01-13  H.J. Lu  <hjl.tools@gmail.com>
+
+	ld: Disable DT_RELR in some -z relro tests
+	Disable DT_RELR in the following -z relro tests which don't expect
+	DT_RELR in linker outputs.
+
+		* testsuite/ld-i386/pr20830.d: Pass $NO_DT_RELR_LDFLAGS to ld.
+		* testsuite/ld-x86-64/pr20830a-now.d: Likewise.
+		* testsuite/ld-x86-64/pr20830a.d: Likewise.
+		* testsuite/ld-x86-64/pr20830b-now.d: Likewise.
+		* testsuite/ld-x86-64/pr20830b.d: Likewise.
+		* testsuite/ld-x86-64/pr21038a-now.d: Likewise.
+		* testsuite/ld-x86-64/pr21038a.d: Likewise.
+		* testsuite/ld-x86-64/pr21038b-now.d: Likewise.
+		* testsuite/ld-x86-64/pr21038c-now.d: Likewise.
+		* testsuite/ld-x86-64/pr21038c.d: Likewise.
+
+2022-01-13  H.J. Lu  <hjl.tools@gmail.com>
+
+	Reapply libiberty: Pass --plugin to AR and RANLIB
+	Reapply the patch to detect GCC LTO plugin used for libiberty build to
+	support LTO build in libiberty.
+
+		* 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: Regenerate.
+
+2022-01-13  H.J. Lu  <hjl.tools@gmail.com>
+
+	elf: Remove the 1-page gap before the RELRO segment
+	The existing RELRO scheme may leave a 1-page gap before the RELRO segment
+	and align the end of the RELRO segment to the page size:
+
+	  [18] .eh_frame    PROGBITS    408fa0 008fa0 005e80 00   A  0   0  8
+	  [19] .init_array  INIT_ARRAY  410de0 00fde0 000008 08  WA  0   0  8
+	  [20] .fini_array  FINI_ARRAY  410de8 00fde8 000008 08  WA  0   0  8
+	  [21] .dynamic     DYNAMIC     410df0 00fdf0 000200 10  WA  7   0  8
+	  [22] .got         PROGBITS    410ff0 00fff0 000010 08  WA  0   0  8
+	  [23] .got.plt     PROGBITS    411000 010000 000048 08  WA  0   0  8
+
+	Instead, we can remove the 1-page gap if the maximum page size >= the
+	maximum section alignment:
+
+	  [18] .eh_frame    PROGBITS    408fa0 008fa0 005e80 00   A  0   0  8
+	  [19] .init_array  INIT_ARRAY  40fde0 00fde0 000008 08  WA  0   0  8
+	  [20] .fini_array  FINI_ARRAY  40fde8 00fde8 000008 08  WA  0   0  8
+	  [21] .dynamic     DYNAMIC     40fdf0 00fdf0 000200 10  WA  7   0  8
+	  [22] .got         PROGBITS    40fff0 00fff0 000010 08  WA  0   0  8
+	  [23] .got.plt     PROGBITS    410000 010000 000048 08  WA  0   0  8
+
+	Because the end of the RELRO segment is always aligned to the page size
+	and may not be moved, the RELRO segment size may be increased:
+
+	  [ 3] .dynstr      STRTAB      000148 000148 000001 00   A  0   0  1
+	  [ 4] .eh_frame    PROGBITS    000150 000150 000000 00   A  0   0  8
+	  [ 5] .init_array  INIT_ARRAY  200150 000150 000010 08  WA  0   0  1
+	  [ 6] .fini_array  FINI_ARRAY  200160 000160 000010 08  WA  0   0  1
+	  [ 7] .jcr         PROGBITS    200170 000170 000008 00  WA  0   0  1
+	  [ 8] .data.rel.ro PROGBITS    200180 000180 000020 00  WA  0   0 16
+	  [ 9] .dynamic     DYNAMIC     2001a0 0001a0 0001c0 10  WA  3   0  8
+	  [10] .got         PROGBITS    200360 000360 0002a8 00  WA  0   0  8
+	  [11] .bss         NOBITS      201000 000608 000840 00  WA  0   0  1
+
+	vs the old section layout:
+
+	  [ 3] .dynstr      STRTAB      000148 000148 000001 00   A  0   0  1
+	  [ 4] .eh_frame    PROGBITS    000150 000150 000000 00   A  0   0  8
+	  [ 5] .init_array  INIT_ARRAY  200b48 000b48 000010 08  WA  0   0  1
+	  [ 6] .fini_array  FINI_ARRAY  200b58 000b58 000010 08  WA  0   0  1
+	  [ 7] .jcr         PROGBITS    200b68 000b68 000008 00  WA  0   0  1
+	  [ 8] .data.rel.ro PROGBITS    200b70 000b70 000020 00  WA  0   0 16
+	  [ 9] .dynamic     DYNAMIC     200b90 000b90 0001c0 10  WA  3   0  8
+	  [10] .got         PROGBITS    200d50 000d50 0002a8 00  WA  0   0  8
+	  [11] .bss         NOBITS      201000 000ff8 000840 00  WA  0   0  1
+
+	But there is no 1-page gap.
+
+		PR ld/28743
+		* ldlang.c (lang_size_relro_segment_1): Remove the 1-page gap
+		before the RELRO segment if the maximum page size >= the maximum
+		section alignment.
+		* testsuite/ld-i386/pr20830.d: Adjusted.
+		* testsuite/ld-s390/gotreloc_64-relro-1.dd: Likewise.
+		* testsuite/ld-x86-64/pr14207.d: Likewise.
+		* testsuite/ld-x86-64/pr18176.d: Likewise.
+		* testsuite/ld-x86-64/pr20830a-now.d: Likewise.
+		* testsuite/ld-x86-64/pr20830a.d: Likewise.
+		* testsuite/ld-x86-64/pr20830b-now.d: Likewise.
+		* testsuite/ld-x86-64/pr20830b.d: Likewise.
+		* testsuite/ld-x86-64/pr21038a-now.d: Likewise.
+		* testsuite/ld-x86-64/pr21038a.d: Likewise.
+		* testsuite/ld-x86-64/pr21038b-now.d: Likewise.
+		* testsuite/ld-x86-64/pr21038c-now.d: Likewise.
+		* testsuite/ld-x86-64/pr21038c.d: Likewise.
+
+2022-01-13  Nick Clifton  <nickc@redhat.com>
+
+	Synchronize binutils libiberty sources with gcc version.
+	+2021-12-30  Lancelot SIX  <lsix@lancelotsix.com>
+	+
+	+	* cp-demangle.c (d_clone_suffix): Support digits in clone tag
+	+	names.
+	+	* testsuite/demangle-expected: Check demangling of clone symbols
+	+	with digits in name.
+	+
+	+2021-12-16  H.J. Lu  <hjl.tools@gmail.com>
+	+
+	+	Revert:
+	+	2021-12-16  H.J. Lu  <hjl.tools@gmail.com>
+	+
+	+	* Makefile.in (AR): Add @AR_PLUGIN_OPTION@
+	+	(RANLIB): Add @RANLIB_PLUGIN_OPTION@.
+	+	(configure_deps): Depend on ../config/gcc-plugin.m4.
+	+	* configure.ac: AC_SUBST AR_PLUGIN_OPTION and
+	+	RANLIB_PLUGIN_OPTION.
+	+	* aclocal.m4: Regenerated.
+	+	* configure: Likewise.
+	+
+	+2021-12-15  H.J. Lu  <hjl.tools@gmail.com>
+	+
+	+	* Makefile.in (AR): Add @AR_PLUGIN_OPTION@
+	+	(RANLIB): Add @RANLIB_PLUGIN_OPTION@.
+	+	(configure_deps): Depend on ../config/gcc-plugin.m4.
+	+	* configure.ac: AC_SUBST AR_PLUGIN_OPTION and
+	+	RANLIB_PLUGIN_OPTION.
+	+	* aclocal.m4: Regenerated.
+	+	* configure: Likewise.
+	+
+	+2021-11-29  Eric Gallager  <egallager@gcc.gnu.org>
+	+
+	+	PR other/103021
+	+	* Makefile.in: Use ETAGS variable in TAGS target.
+	+	* configure: Regenerate.
+	+	* configure.ac: Allow ETAGS variable to be overridden.
+	+
+	+2021-11-29  Andrew Pinski  <apinski@marvell.com>
+	+
+	+	* make-temp-file.c (try_dir): Check to see if the dir
+	+	is actually a directory.
+	+
+	+2021-10-22  Eric Gallager  <egallager@gcc.gnu.org>
+	+
+	+	PR other/102663
+	+	* Makefile.in: Allow dvi-formatted documentation
+	+	to be installed.
+	+
+	+2021-10-17  Lu?s Ferreira  <contact@lsferreira.net>
+	+
+	+	PR d/102618
+	+	* d-demangle.c (dlang_parse_qualified): Handle anonymous
+	+	symbols correctly.
+	+	* testsuite/d-demangle-expected: New tests to cover anonymous
+	+	symbols.
+	+
+	+2021-10-14  Lu?s Ferreira  <contact@lsferreira.net>
+	+
+	+	* testsuite/d-demangle-expected: Add test case for function literals.
+	+
+	+2021-10-14  Lu?s Ferreira  <contact@lsferreira.net>
+	+
+	+	* testsuite/d-demangle-expected: Add test cases for simple special
+	+	mangles.
+	+
+	+2021-10-12  Lu?s Ferreira  <contact@lsferreira.net>
+	+
+	+	* d-demangle.c (dlang_parse_qualified): Remove redudant parenthesis
+	+	around lhs and rhs of assignments.
+	+
+	+2021-10-01  Lu?s Ferreira  <contact@lsferreira.net>
+	+
+	+	* testsuite/d-demangle-expected: Add missing format for new test
+	+
+	+2021-09-23  Lu?s Ferreira  <contact@lsferreira.net>
+	+
+	+	* d-demangle.c (dlang_Type): Validate MANGLED is nonnull.
+	+	* testsuite/d-demangle-expected: New test.
+	+
+	+2021-09-23  Lu?s Ferreira  <contact@lsferreira.net>
+	+
+	+	* d-demangle.c (dlang_symbol_backref): Ensure strlen of
+	+	string is less than length computed by dlang_number.
+	+
+	+2021-09-01  Iain Sandoe  <iain@sandoe.co.uk>
+
+	 	* configure: Regenerate.
+	+	* configure.ac: Do not search for sbrk on Darwin.
+	+	* xmalloc.c: Do not declare sbrk unless it has been found
+	+	by configure.
+	+
+	+2021-08-29  Iain Buclaw  <ibuclaw@gdcproject.org>
+	+
+	+	* d-demangle.c (dlang_identifier): Skip over fake parent manglings.
+	+	* testsuite/d-demangle-expected: Add tests.
+	+
+	+2021-08-29  Iain Buclaw  <ibuclaw@gdcproject.org>
+	+
+	+	* d-demangle.c (dlang_parse_arrayliteral): Add 'info' parameter.
+	+	(dlang_parse_assocarray): Likewise.
+	+	(dlang_parse_structlit): Likewise.
+	+	(dlang_value): Likewise.  Handle function literal symbols.
+	+	(dlang_template_args): Pass 'info' to dlang_value.
+	+	* testsuite/d-demangle-expected: Add new test.
+	+
+	+2021-08-29  Iain Buclaw  <ibuclaw@gdcproject.org>
+	+
+	+	* d-demangle.c (dlang_attributes): Handle typeof(*null).
+	+	(dlang_type): Likewise.  Demangle 'n' as typeof(null).
+	+	* testsuite/d-demangle-expected: Update tests.
+	+
+	+2021-08-23  Iain Sandoe  <iain@sandoe.co.uk>
+	+
+	+	* simple-object-mach-o.c (simple_object_mach_o_write_segment):
+	+	Cast the first argument to set_32 as needed.
+
+	-2021-07-03  Nick Clifton  <nickc@redhat.com>
+	+2021-08-18  Iain Sandoe  <iain@sandoe.co.uk>
+
+	+	* simple-object-mach-o.c (simple_object_mach_o_write_segment):
+	+	Arrange to swap the LTO index tables where needed.
+	 # Please enter the commit message for your changes. Lines starting
+
+2022-01-13  Andrew Burgess  <aburgess@redhat.com>
+
+	gdb: don't use -Wmissing-prototypes with g++
+	This commit aims to not make use of -Wmissing-prototypes when
+	compiling with g++.
+
+	Use of -Wmissing-prototypes was added with this commit:
+
+	  commit a0761e34f054767de6d6389929d27e9015fb299b
+	  Date:   Wed Mar 11 15:15:12 2020 -0400
+
+	      gdb: enable -Wmissing-prototypes warning
+
+	Because clang can provide helpful warnings with this flag.
+	Unfortunately, g++ doesn't accept this flag, and will give this
+	warning:
+
+	  cc1plus: warning: command line option ‘-Wmissing-prototypes’ is valid for C/ObjC but not for C++
+
+	In theory the fact that this flag is not supported should be detected
+	by the configure check in gdbsupport/warning.m4, but for users of
+	ccache, this check doesn't work due to a long standing ccache issue:
+
+	  https://github.com/ccache/ccache/issues/738
+
+	The ccache problem is that -W... options are reordered on the command
+	line, and so -Wmissing-prototypes is seen before -Werror.  Usually
+	this doesn't matter, but the above warning (about the flag not being
+	valid) is issued before the -Werror flag is processed, and so is not
+	fatal.
+
+	There have been two previous attempts to fix this that I'm aware of.
+	The first is:
+
+	  https://sourceware.org/pipermail/gdb-patches/2021-September/182148.html
+
+	In this attempt, instead of just relying on a compile to check if a
+	flag is valid, the proposal was to both compile and link.  As linking
+	doesn't go through ccache, we don't suffer from the argument
+	reordering problem, and the link phase will correctly fail when using
+	-Wmissing-prototypes with g++.  The configure script will then disable
+	the use of this flag.
+
+	This approach was rejected, and the suggestion was to only add the
+	-Wmissing-prototypes flag if we are compiling with gcc.
+
+	The second attempt, attempts this approach, and can be found here:
+
+	  https://sourceware.org/pipermail/gdb-patches/2021-November/183076.html
+
+	This attempt only adds the -Wmissing-prototypes flag is the value of
+	GCC is not 'yes'.  This feels like it is doing the right thing,
+	unfortunately, the GCC flag is really a 'is gcc like' flag, not a
+	strict, is gcc check.  As such, GCC is set to 'yes' for clang, which
+	would mean the flag was not included for clang or gcc.  The entire
+	point of the original commit was to add this flag for clang, so
+	clearly the second attempt is not sufficient either.
+
+	In this new attempt I have added gdbsupport/compiler-type.m4, this
+	file defines AM_GDB_COMPILER_TYPE.  This macro sets the variable
+	GDB_COMPILER_TYPE to either 'gcc', 'clang', or 'unknown'.  In future
+	the list of values might be extended to cover other compilers, if this
+	is ever useful.
+
+	I've then modified gdbsupport/warning.m4 to only add the problematic
+	-Wmissing-prototypes flag if GDB_COMPILER_TYPE is not 'gcc'.
+
+	I've tested this with both gcc and clang and see the expected results,
+	gcc no longer attempts to use the -Wmissing-prototypes flag, while
+	clang continues to use it.
+
+	When compiling using ccache, I am no longer seeing the warning.
+
+2022-01-13  Andrew Burgess  <aburgess@redhat.com>
+
+	gdb: add some extra debug information to attach_command
+	While working on another patch I wanted to add some extra debug
+	information to the attach_command function.  This required me to add a
+	new function to convert the thread_info::state variable to a string.
+
+	The new debug might be useful to others, and the state to string
+	function might be useful in other locations, so I thought I'd merge
+	it.
+
+2022-01-13  Alan Modra  <amodra@gmail.com>
+
+	Re: gas: add visibility support using GNU syntax on XCOFF
+	tc-ppc.c: In function 'ppc_comm':
+	tc-ppc.c:4560:40: error: 'visibility' may be used uninitialized in this function [-Werror=maybe-uninitialized]
+
+	With that fixed we hit lots of segfaults in the ld testsuite.
+
+		PR 22085
+	bfd/
+		* xcofflink.c (xcoff_link_input_bfd): Don't segfault on NULL
+		sym_hash.
+	gas/
+		* config/tc-ppc.c (ppc_comm): Init visibility.
+
+2022-01-13  Alan Modra  <amodra@gmail.com>
+
+	dt-relr.exp --no-as-needed
+	Otherwise the very simple test may not be linked with libc.so at all,
+	and thus correctly have no version reference added.  Causing failure
+	of the dt-relr-glibc-1b.so test.
+
+		* testsuite/ld-elf/dt-relr.exp: Link with --no-as-needed.
+
+2022-01-13  Alan Modra  <amodra@gmail.com>
+
+	Correct .relr.dyn nocombreloc script
+		* scripttempl/elf.sc (.relr.dyn): Don't depend on $COMBRELOC.
+
+2022-01-13  Alan Modra  <amodra@gmail.com>
+
+	testsuite supports_dt_relr
+	Tidy, and fix "FAIL: Build dt-relr-glibc-1b.so" on all non-x86
+	linux targets.
+
+	binutils/
+		* binutils-common.exp (supports_dt_relr): New proc.
+	ld/
+		* testsuite/config/default.exp (DT_RELR_LDFLAGS, NO_DT_RELR_LDFLAGS),
+		(DT_RELR_CC_LDFLAGS, NO_DT_RELR_CC_LDFLAGS): Use supports_dt_relr.
+		* testsuite/ld-elf/dt-relr.exp: Don't run unless supports_dt_relr.
+		* testsuite/ld-elf/dt-relr-1a.d: Likewise.
+		* testsuite/ld-elf/dt-relr-1b.d: Likewise.
+		* testsuite/ld-elf/dt-relr-1c.d: Likewise.
+		* testsuite/ld-elf/dt-relr-2a.d: Likewise.
+		* testsuite/ld-elf/dt-relr-2b.d: Likewise.
+		* testsuite/ld-elf/dt-relr-2c.d: Likewise.
+		* testsuite/ld-elf/dt-relr-2d.d: Likewise.
+		* testsuite/ld-elf/dt-relr-2e.d: Likewise.
+		* testsuite/ld-elf/dt-relr-2f.d: Likewise.
+		* testsuite/ld-elf/dt-relr-2g.d: Likewise.
+		* testsuite/ld-elf/dt-relr-2h.d: Likewise.
+		* testsuite/ld-elf/dt-relr-3a.d: Likewise.
+		* testsuite/ld-elf/dt-relr-3b.d: Likewise.
+
+2022-01-13  Alan Modra  <amodra@gmail.com>
+
+	Don't use C++ comments in assembly
+	It might seem to work, but only if '/' is a start of comment char.
+
+		* testsuite/ld-elf/dt-relr-1.s: Use # for comment.
+		* testsuite/ld-elf/dt-relr-2.s: Likewise.
+		* testsuite/ld-elf/dt-relr-3.s: Likewise.
+
+2022-01-13  Alan Modra  <amodra@gmail.com>
+
+	Move DT_RELR tag setting to elflink.c
+	This makes the code setting DT_RELR tags generally available.  Many
+	targets will be able to use the defaults.  Those that can't should set
+	up sh_entsize for .relr.dyn output section before reaching the dynamic
+	tag code in bfd_elf_final_link.
+
+		* elflink.c (bfd_elf_final_link): Set up DT_RELR tags and sh_entsize.
+		* elfxx-x86.c (_bfd_x86_elf_finish_dynamic_sections): Don't do any
+		of that here.
+
+2022-01-13  Alan Modra  <amodra@gmail.com>
+
+	Re: Set SEC_ELF_REVERSE_COPY earlier
+	Let's not rely on .init/.fini having relocs for the size sanity check.
+	This is mainly to squash reports of "my fuzzed object made ld hang".
+
+2022-01-13  Tiezhu Yang  <yangtiezhu@loongson.cn>
+
+	gdb: testsuite: make string[] type as char in gdb.base/charset.c
+	This reverts the commit ff656e2e1cb1 ("gdb: testsuite: fix failed
+	testcases in gdb.base/charset.exp").
+
+	The original test code has no problem. On an architecture where
+	char is signed, then both 'A' and ebcdic_us_string[7] will yield
+	-63, which makes the equality true. On an architecture where char
+	is unsigned, then both 'A' and ebcdic_us_string[7] will yield 193,
+	which also makes the equality true.
+
+	The test cases only failed on LoongArch. The default type of char
+	is signed char on LoongArch, like x86-64. But when use gdb print
+	command on LoongArch, the default type of char is unsigned char,
+	this is wrong, I will look into it later, sorry for that.
+
+	On LoongArch:
+
+	  $ cat test_char.c
+	  #include <stdio.h>
+
+	  int main()
+	  {
+	          char c1 = 193;
+	          unsigned char c2 = 193;
+
+	          printf("%d\n", c1);
+	          printf("%d\n", c1 == c2);
+
+	          return 0;
+	  }
+	  $ gcc test_char.c -o test_char
+	  $ ./test_char
+	  -63
+	  0
+
+	  (gdb) set target-charset EBCDIC-US
+	  (gdb) print 'A'
+	  $1 = 193 'A'
+	  (gdb) print /c 'A'
+	  $2 = 193 'A'
+	  (gdb) print /u 'A'
+	  $3 = 193
+	  (gdb) print /d 'A'
+	  $4 = -63
+	  (gdb) print /x 'A'
+	  $5 = 0xc1
+
+2022-01-13  GDB Administrator  <gdbadmin@sourceware.org>
+
+	Automatic date update in version.in
+
+2022-01-12  Carl Love  <cel@us.ibm.com>
+
+	gdb Power 9 add test for HW watchpoint support.
+	The Power 9 processor revision 2.2 has HW watchpoint support disabled due
+	to a HW bug.  The support is fixed in Power 9 processor revision 2.3.  This
+	patch add a test to lib/gdb.exp for Power to determine if the processor
+	supports HW watchpoints or not.  If the Power processor doesn't support HW
+	watchpoints the proceedure skip_hw_watchpoint_tests will return 1 to
+	disable the various HW watchpoint tests.
+
+	The patch has been tested on Power 9, processor revesions 2.2 and 2.3.  The
+	patch has also been tested on Power 10.  No regression test failures were
+	found.
+
+2022-01-12  Andrew Burgess  <aburgess@redhat.com>
+
+	gdb/python: add gdb.host_charset function
+	We already have gdb.target_charset and gdb.target_wide_charset.  This
+	commit adds gdb.host_charset along the same lines.
+
+2022-01-12  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>
+
+	gdb/testsuite: fix gdb.python/py-events.exp for finding process id
+	When executed with --target_board=native-extended-gdbserver, the
+	gdb.python/py-events.exp test errors out with
+
+	  ERROR: tcl error sourcing /path/to/gdb/testsuite/gdb.python/py-events.exp.
+	  ERROR: can't read "process_id": no such variable
+	      while executing
+	  "lappend expected "ptid: \\($process_id, $process_id, 0\\)" "address: $addr""
+	      (file "/path/to/gdb/testsuite/gdb.python/py-events.exp" line 103)
+	      invoked from within
+	  "source /path/to/gdb/testsuite/gdb.python/py-events.exp"
+	      ("uplevel" body line 1)
+	      invoked from within
+	  "uplevel #0 source /path/to/gdb/testsuite/gdb.python/py-events.exp"
+	      invoked from within
+	  "catch "uplevel #0 source $test_file_name""
+
+	There are multiple problems around this:
+
+	1. The process_id variable is not initialized to a default value.
+
+	2. The test attempts to find the PID of the current thread, but the
+	   regexp that it uses is not tailored for the output printed by the
+	   remote target.
+
+	3. The test uses "info threads" to find the current thread PID.
+	   Using the "thread" command instead is simpler.
+
+	Fix these problems.
+
+2022-01-12  Tom Tromey  <tromey@adacore.com>
+
+	Don't mention "serial" in target remote description
+	PR remote/9177 points out that "info files" mentions "serial" a couple
+	of times:
+
+	    Remote serial target in gdb-specific protocol:
+	    Debugging a target over a serial line.
+
+	However, often the remote target isn't really a serial connection.
+
+	It seems to me that this text could be a bit clearer; and furthermore
+	since "info files" prints the target's long description,
+	remote_target::files_info doesn't really add much and can simply be
+	removed.
+
+	Regression tested on x86-64 Fedora 34.
+
+	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=9177
+
+2022-01-12  H.J. Lu  <hjl.tools@gmail.com>
+
+	ld: Add glibc dependency for DT_RELR
+	When DT_RELR is enabled, to avoid random run-time crash with older glibc
+	binaries without DT_RELR support, add a GLIBC_ABI_DT_RELR symbol version,
+	which is provided by glibc with DT_RELR support, dependency on the shared
+	C library if it provides a GLIBC_2.XX symbol version.
+
+	bfd/
+
+		* elflink.c (elf_link_add_dt_relr_dependency): New function.
+		(bfd_elf_size_dynamic_sections): Call
+		elf_link_add_dt_relr_dependency if DT_RELR is enabled.
+
+	ld/
+
+		* ld.texi: Mention GLIBC_ABI_DT_RELR in -z pack-relative-relocs
+		entry.
+		* testsuite/ld-elf/dt-relr-glibc-1.c: New file.
+		* testsuite/ld-elf/dt-relr-glibc-1a.rd: Likewise.
+		* testsuite/ld-elf/dt-relr-glibc-1b.rd: Likewise.
+		* testsuite/ld-elf/dt-relr.exp: Likewise.
+
+2022-01-12  H.J. Lu  <hjl.tools@gmail.com>
+
+	ld: Add simple DT_RELR tests
+		* testsuite/ld-elf/dt-relr-1.s: New file.
+		* testsuite/ld-elf/dt-relr-1a.d: Likewise.
+		* testsuite/ld-elf/dt-relr-1b.d: Likewise.
+		* testsuite/ld-elf/dt-relr-1c.d: Likewise.
+		* testsuite/ld-elf/dt-relr-2.s: Likewise.
+		* testsuite/ld-elf/dt-relr-2a.d: Likewise.
+		* testsuite/ld-elf/dt-relr-2b.d: Likewise.
+		* testsuite/ld-elf/dt-relr-2c.d: Likewise.
+		* testsuite/ld-elf/dt-relr-2d.d: Likewise.
+		* testsuite/ld-elf/dt-relr-2e.d: Likewise.
+		* testsuite/ld-elf/dt-relr-2f.d: Likewise.
+		* testsuite/ld-elf/dt-relr-2g.d: Likewise.
+		* testsuite/ld-elf/dt-relr-2h.d: Likewise.
+		* testsuite/ld-elf/dt-relr-3.s: Likewise.
+		* testsuite/ld-elf/dt-relr-3a.d: Likewise.
+		* testsuite/ld-elf/dt-relr-3b.d: Likewise.
+		* testsuite/ld-i386/dt-relr-1.s: Likewise.
+		* testsuite/ld-i386/dt-relr-1a.d: Likewise.
+		* testsuite/ld-i386/dt-relr-1b.d: Likewise.
+		* testsuite/ld-x86-64/dt-relr-1a-x32.d: Likewise.
+		* testsuite/ld-x86-64/dt-relr-1a.d: Likewise.
+		* testsuite/ld-x86-64/dt-relr-1b-x32.d: Likewise.
+		* testsuite/ld-x86-64/dt-relr-1b.d: Likewise.
+		* testsuite/ld-x86-64/dt-relr-1.s: Likewise.
+		* testsuite/ld-i386/i386.exp: Run dt-relr-1a and dt-relr-1b.
+		* testsuite/ld-x86-64/x86-64.exp: Run dt-relr-1a, dt-relr-1a-x32
+		dt-relr-1b and dt-relr-1b-x32.
+
+2022-01-12  H.J. Lu  <hjl.tools@gmail.com>
+
+	x86: Add DT_RELR support
+	DT_RELR is implemented with linker relaxation:
+
+	1. During linker relaxation, we scan input relocations with the same
+	logic in relocate_section to determine if a relative relocation should
+	be generated and save the relative relocation candidate information for
+	sizing the DT_RELR section later after all symbols addresses can be
+	determined.  For these relative relocations which can't be placed in
+	the DT_RELR section, they will be placed in the rela.dyn/rel.dyn
+	section.
+	2. When DT_RELR is enabled, _bfd_elf_map_sections_to_segments calls a
+	backend function to size the DT_RELR section which will compute the
+	DT_RELR section size and tell ldelf_map_segments to layout sections
+	again when the DT_RELR section size has been increased.
+	3. After regular symbol processing is finished, bfd_elf_final_link calls
+	a backend function to finish the DT_RELR section.
+
+		* elf32-i386.c (elf_i386_relocate_section): Don't generate
+		relative relocation when DT_RELR is enabled.
+		(elf_i386_finish_dynamic_symbol): Likewise.
+		* elf64-x86-64.c (elf_x86_64_relocate_section): Don't generate
+		relative relocation when DT_RELR is enabled.
+		(elf_x86_64_finish_dynamic_symbol): Likewise.
+		* elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
+		relative_r_type, relative_r_name, elf_append_reloc,
+		elf_write_addend and elf_write_addend_in_got.
+		(elf_x86_relative_reloc_record_add): New function.
+		(_bfd_x86_elf_link_relax_section): Likewise.
+		(elf64_dt_relr_bitmap_add): Likewise.
+		(elf32_dt_relr_bitmap_add): Likewise.
+		(_bfd_elf32_write_addend): Likewise.
+		(_bfd_elf64_write_addend): Likewise.
+		(elf_x86_size_or_finish_relative_reloc): Likewise.
+		(elf_x86_compute_dl_relr_bitmap): Likewise.
+		(elf_x86_write_dl_relr_bitmap): Likewise.
+		(elf_x86_relative_reloc_compare ): Likewise.
+		(_bfd_elf_x86_size_relative_relocs): Likewise.
+		(_bfd_elf_x86_finish_relative_relocs): Likewise.
+		(_bfd_x86_elf_size_dynamic_sections): Skip the .relr.dyn section.
+		(_bfd_x86_elf_finish_dynamic_sections): Convert 3 spare dynamic
+		tags to DT_RELR, DT_RELRSZ and for compact relative relocation.
+		* elfxx-x86.h (X86_64_GOT_TYPE_P): New.
+		(I386_GOT_TYPE_P): Likewise.
+		(X86_GOT_TYPE_P): Likewise.
+		(X86_64_RELATIVE_RELOC_TYPE_P): Likewise.
+		(I386_RELATIVE_RELOC_TYPE_P): Likewise.
+		(X86_RELATIVE_RELOC_TYPE_P): Likewise.
+		(X86_LOCAL_GOT_RELATIVE_RELOC_P): Likewise.
+		(I386_PCREL_TYPE_P): Likewise.
+		(X86_64_PCREL_TYPE_P): Likewise.
+		(X86_64_NEED_DYNAMIC_RELOC_TYPE_P): Rewrite.
+		(I386_NEED_DYNAMIC_RELOC_TYPE_P): Likewise.
+		(GENERATE_DYNAMIC_RELOCATION_P): Also check rel_from_abs.
+		(elf_x86_link_hash_entry): Add got_relative_reloc_done.
+		(elf_x86_relative_reloc_record): New.
+		(elf_x86_relative_reloc_data): Likewise.
+		(elf_dt_relr_bitmap): Likewise.
+		(elf_x86_link_hash_table): Add dt_relr_bitmap, relative_reloc,
+		unaligned_relative_reloc, relative_r_type, relative_r_name,
+		elf_append_reloc, elf_write_addend, elf_write_addend_in_got and
+		relative_reloc_done.
+		(elf_x86_relative_reloc_done): New.
+		(relative_reloc_packed): Likewise.
+		(_bfd_x86_elf_link_relax_section): Likewise.
+		(_bfd_elf_x86_size_relative_relocs): Likewise.
+		(_bfd_elf_x86_finish_relative_relocs): Likewise.
+		(_bfd_elf32_write_addend): Likewise.
+		(_bfd_elf64_write_addend): Likewise.
+		(bfd_elf32_bfd_relax_section): Likewise.
+		(bfd_elf64_bfd_relax_section): Likewise.
+		(elf_backend_size_relative_relocs): Likewise.
+		(elf_backend_finish_relative_relocs): Likewise.
+		(elf_x86_allocate_local_got_info): Also allocate
+		relative_reloc_done.
+
+2022-01-12  H.J. Lu  <hjl.tools@gmail.com>
+
+	elf: Support DT_RELR in linker tests
+	Allow eabling and disabling DT_RELR in linker tests.  Disable DT_RELR in
+	linker tests which don't expect DT_RELR in linker outputs.
+
+	binutils/
+
+		* testsuite/lib/binutils-common.exp (run_dump_test): Make
+		DT_RELR_LDFLAGS and NO_DT_RELR_LDFLAGS global.
+
+	ld/
+
+		* testsuite/config/default.exp (DT_RELR_LDFLAGS): New.
+		(DT_RELR_CC_LDFLAGS): Likewise.
+		(NO_DT_RELR_LDFLAGS): Likewise.
+		(NO_DT_RELR_CC_LDFLAGS): Likewise.
+		* testsuite/ld-elf/shared.exp: Pass $NO_DT_RELR_LDFLAGS to
+		linker for some tests.
+		* testsuite/ld-i386/export-class.exp: Likewise.
+		* testsuite/ld-i386/i386.exp: Likewise.
+		* testsuite/ld-i386/ibt-plt-2a.d: Pass $NO_DT_RELR_LDFLAGS to
+		linker.
+		* testsuite/ld-i386/ibt-plt-3a.d: Likewise.
+		* testsuite/ld-i386/ibt-plt-3c.d: Likewise.
+		* testsuite/ld-i386/pr26869.d: Likewise.
+		* testsuite/ld-i386/report-reloc-1.d: Likewise.
+		* testsuite/ld-ifunc/ifunc-2-i386-now.d: Likewise.
+		* testsuite/ld-ifunc/ifunc-2-local-i386-now.d: Likewise.
+		* testsuite/ld-ifunc/ifunc-2-local-x86-64-now.d: Likewise.
+		* testsuite/ld-ifunc/ifunc-2-x86-64-now.d: Likewise.
+		* testsuite/ld-ifunc/pr17154-x86-64.d: Likewise.
+		* testsuite/ld-x86-64/bnd-branch-1-now.d: Likewise.
+		* testsuite/ld-x86-64/bnd-ifunc-1-now.d: Likewise.
+		* testsuite/ld-x86-64/bnd-ifunc-2-now.d: Likewise.
+		* testsuite/ld-x86-64/bnd-ifunc-2.d: Likewise.
+		* testsuite/ld-x86-64/bnd-plt-1-now.d: Likewise.
+		* testsuite/ld-x86-64/bnd-plt-1.d: Likewise.
+		* testsuite/ld-x86-64/ibt-plt-2a-x32.d: Likewise.
+		* testsuite/ld-x86-64/ibt-plt-2a.d: Likewise.
+		* testsuite/ld-x86-64/ibt-plt-3a-x32.d: Likewise.
+		* testsuite/ld-x86-64/ibt-plt-3a.d: Likewise.
+		* testsuite/ld-x86-64/ilp32-4.d: Likewise.
+		* testsuite/ld-x86-64/load1c.d: Likewise.
+		* testsuite/ld-x86-64/load1d.d: Likewise.
+		* testsuite/ld-x86-64/pr13082-2b.d: Likewise.
+		* testsuite/ld-x86-64/pr14207.d: Likewise.
+		* testsuite/ld-x86-64/pr18176.d: Likewise.
+		* testsuite/ld-x86-64/pr19162.d: Likewise.
+		* testsuite/ld-x86-64/pr19636-2d.d: Likewise.
+		* testsuite/ld-x86-64/pr19636-2l.d: Likewise.
+		* testsuite/ld-x86-64/pr20253-1d.d: Likewise.
+		* testsuite/ld-x86-64/pr20253-1f.d: Likewise.
+		* testsuite/ld-x86-64/pr20253-1j.d: Likewise.
+		* testsuite/ld-x86-64/pr20253-1l.d: Likewise.
+		* testsuite/ld-x86-64/report-reloc-1-x32.d: Likewise.
+		* testsuite/ld-x86-64/report-reloc-1.d: Likewise.
+		* testsuite/ld-x86-64/export-class.exp (x86_64_export_class_test):
+		Pass $NO_DT_RELR_LDFLAGS to linker.
+		* testsuite/ld-x86-64/x86-64.exp: Pass $NO_DT_RELR_LDFLAGS to
+		linker for some tests.
+
+2022-01-12  H.J. Lu  <hjl.tools@gmail.com>
+
+	elf: Add size_relative_relocs and finish_relative_relocs
+	On some targets, the DT_RELR section size can be computed only after all
+	symbols addresses can be determined.  Set the preliminary DT_RELR section
+	size before mapping sections to segments and set the final DT_RELR section
+	size after regular symbol processing is done.
+
+		* elf-bfd.h (elf_backend_data): Add size_relative_relocs and
+		finish_relative_relocs.
+		* elf.c (_bfd_elf_map_sections_to_segments): Call
+		size_relative_relocs if DT_RELR is enabled.
+		* elflink.c (bfd_elf_final_link): Call finish_relative_relocs
+		after regular symbol processing is finished if DT_RELR is enabled.
+		* elfxx-target.h (elf_backend_size_relative_relocs): New.
+		(elf_backend_finish_relative_relocs): Likewise.
+		(elfNN_bed): Add elf_backend_size_relative_relocs and
+		elf_backend_finish_relative_relocs.
+
+2022-01-12  H.J. Lu  <hjl.tools@gmail.com>
+
+	ld: Initial DT_RELR support
+	Add a -z pack-relative-relocs option to enable DT_RELR and create a
+	relr.dyn section for DT_RELR.  DT_RELR is implemented with the linker
+	relaxation infrastructure, but it doesn't require the --relax option
+	enabled.  -z pack-relative-relocs implies -z combreloc.  -z nocombreloc
+	implies -z nopack-relative-relocs.
+
+	-z pack-relative-relocs is chosen over the similar option in lld,
+	--pack-dyn-relocs=relr, to implement a glibc binary lockout mechanism
+	with a special glibc version symbol, to avoid random crashes of DT_RELR
+	binaries with the existing glibc binaries.
+
+	bfd/
+
+		* elf-bfd.h (elf_link_hash_table): Add srelrdyn.
+		* elflink.c (_bfd_elf_link_create_dynamic_sections): Create a
+		.relr.dyn section for DT_RELR.
+
+	include/
+
+		* bfdlink.h (bfd_link_info): Add enable_dt_relr.
+
+	ld/
+
+		* News: Mention -z pack-relative-relocs and
+		-z nopack-relative-relocs.
+		* ld.texi: Document -z pack-relative-relocs and
+		-z nopack-relative-relocs.
+		* ldelf.c (ldelf_after_parse): Disable DT_RELR if not building
+		PIE nor shared library.  Add 3 spare dynamic tags for DT_RELR,
+		DT_RELRSZ and DT_RELRENT.
+		* ldlang.c (lang_relax_sections): Also enable relaxation if
+		DT_RELR is enabled.
+		* emulparams/elf32_x86_64.sh: Source dt-relr.sh.
+		* emulparams/elf_i386.sh: Likewise.
+		* emulparams/elf_x86_64.sh: Likewise.
+		* emulparams/dt-relr.sh: New file.
+		* scripttempl/elf.sc: Support .relr.dyn.
+
+2022-01-12  H.J. Lu  <hjl.tools@gmail.com>
+
+	elf: Pass need_layout to _bfd_elf_map_sections_to_segments
+	On some targets, the DT_RELR section size can be computed only after all
+	symbols addresses can be determined.  Update ldelf_map_segments to pass
+	need_layout to _bfd_elf_map_sections_to_segments which will size DT_RELR
+	section and set need_layout to true if the DT_RELR section size is changed.
+
+	bfd/
+
+		* elf-bfd.h (_bfd_elf_map_sections_to_segments): Add a bool
+		pointer argument.
+		* elf.c (_bfd_elf_map_sections_to_segments): Add a bool pointer
+		argument to indicate if section layout needs update.
+		(assign_file_positions_for_load_sections): Pass NULL to
+		_bfd_elf_map_sections_to_segments.
+		* elflink.c (_bfd_elf_strip_zero_sized_dynamic_sections): Pass
+		NULL to _bfd_elf_map_sections_to_segments.
+
+	ld/
+
+		* ldelfgen.c (ldelf_map_segments): Pass &need_layout to
+		_bfd_elf_map_sections_to_segments.
+
+2022-01-12  H.J. Lu  <hjl.tools@gmail.com>
+
+	elf: Add .relr.dyn to special_sections_r
+		* elf.c (special_sections_r): Add .relr.dyn.
+
+2022-01-12  Andrew Burgess  <aburgess@redhat.com>
+
+	gdb: add 'maint set/show gnu-source-highlight enabled' command
+	In a later commit I want to address an issue with the Python pygments
+	based code styling solution.  As this approach is only used when the
+	GNU Source Highlight library is not available, testing bugs in this
+	area can be annoying, as it requires GDB to be rebuilt with use of GNU
+	Source Highlight disabled.
+
+	This commit adds a pair of new maintenance commands:
+
+	  maintenance set gnu-source-highlight enabled on|off
+	  maintenance show gnu-source-highlight enabled
+
+	these commands can be used to disable use of the GNU Source Highlight
+	library, allowing me, in a later commit, to easily test bugs that
+	would otherwise be masked by GNU Source Highlight being used.
+
+	I made this a maintenance command, rather than a general purpose
+	command, as it didn't seem like this was something a general user
+	would need to adjust.  We can always convert the maintenance command
+	to a general command later if needed.
+
+	There's no test for this here, but this feature will be used in a
+	later commit.
+
+2022-01-12  Andrew Burgess  <aburgess@redhat.com>
+
+	gdb: erase items from the source_cache::m_offset_cache
+	The source_cache class has two member variables m_source_map, which
+	stores the file contents, and m_offset_cache, which stores offsets
+	into the file contents.
+
+	As source files are read the contents of the file, as well as the
+	offset data, are stored in the cache using these two member variables.
+
+	Whenever GDB needs either the files contents, or the offset data,
+	source_cache::ensure is called.  This function looks for the file in
+	m_source_map, and if it's found then this implies the file is also in
+	m_offset_cache, and we're done.
+
+	If the file is not in m_source_map then GDB calls
+	source_cache::get_plain_source_lines to open the file and read its
+	contents.  ::get_plain_source_lines also calculates the offset data,
+	which is then inserted into m_offset_cache.
+
+	Back in ::ensure, the file contents are added into m_source_map.  And
+	finally, if m_source_map contains more than MAX_ENTRIES, an entry is
+	removed from m_source_map.
+
+	The problem is entries are not removed from m_offset_cache at the same
+	time.
+
+	This means that if a program contains enough source files, GDB will
+	hold at most MAX_ENTRIES cached source file contents, but can contain
+	offsets data for every source file.
+
+	Now, the offsets data is going to be smaller than the cached file
+	contents, so maybe there's no harm here.  But, when we reload the file
+	contents we always recalculate the offsets data.  And, when we
+	::get_line_charpos asking for offset data we still call ::ensure which
+	will ends up loading and caching the file contents.
+
+	So, given the current code does the work of reloading the offset data
+	anyway, we may as well save memory by capping m_offset_cache to
+	MAX_ENTRIES just like we do m_source_map.
+
+	That's what this commit does.
+
+	There should be no user visible changes after this commit, except for
+	ever so slightly lower memory usage in some cases.
+
+2022-01-12  Andrew Burgess  <aburgess@redhat.com>
+
+	gdb: new 'maint flush source-cache' command
+	This commit adds a new 'maint flush source-cache' command, this
+	flushes the cache of source file contents.
+
+	After flushing GDB is forced to reread source files the next time any
+	source lines are to be displayed.
+
+	I've added a test for this new feature.  The test is a little weird,
+	in that it modifies a source file after compilation, and makes use of
+	the cache flush so that the changes show up when listing the source
+	file.  I'm not sure when such a situation would ever crop up in real
+	life, but maybe we can imagine such cases.
+
+	In reality, this command is useful for testing the syntax highlighting
+	within GDB, we can adjust the syntax highlighting settings, flush the
+	cache, and then get the file contents re-highlighted using the new
+	settings.
+
+2022-01-12  Andrew Burgess  <aburgess@redhat.com>
+
+	gdb: rename lin-lwp to linux-nat in set/show debug
+	Rename 'set debug lin-lwp' to 'set debug linux-nat' and 'show debug
+	lin-lwp' to 'show debug linux-nat'.
+
+	I've updated the documentation and help text to match, as well as
+	making it clear that the debug that is coming out relates to all
+	aspects of Linux native inferior support, not just the LWP aspect of
+	it.
+
+	The boundary between general "native" target debug, and the lwp
+	specific part of that debug was always a little blurry, but the actual
+	debug variable inside GDB is debug_linux_nat, and the print routine
+	linux_nat_debug_printf, is used throughout the linux-nat.c file, not
+	just for lwp related debug, so the new name seems to make more sense.
+
+2022-01-12  Clément Chigot  <clement.chigot@atos.net>
+
+	ld: add hidden and internal visibility support for XCOFF
+	This patch adds a primary support for hidden and internal visibility in
+	GNU linker for XCOFF format.
+	The protected visibility isn't yet supported.
+
+	PR 22085
+
+	bfd/ChangeLog:
+
+		* xcofflink.c (xcoff_dynamic_definition_p): Add hidden
+		  and internal visibility support.
+		(xcoff_link_add_symbols): Likewise.
+		(xcoff_auto_export_p): Likewise.
+		(bfd_xcoff_export_symbol): Likewise.
+		(xcoff_link_input_bfd): Likewise.
+
+	ld/ChangeLog:
+
+		* testsuite/ld-vsb/main.c: Adapt for XCOFF.
+		* testsuite/ld-vsb/sh1.c: Likewse.
+		* testsuite/ld-vsb/vsb.exp: Likewise.
+		* testsuite/ld-vsb/visibility-1-xcoff-32.d: New test.
+		* testsuite/ld-vsb/visibility-1-xcoff-64.d: New test.
+		* testsuite/ld-vsb/visibility-2-xcoff-32.d: New test.
+		* testsuite/ld-vsb/visibility-2-xcoff-64.d: New test.
+		* testsuite/ld-vsb/xcoffvsb.dat: New test.
+
+2022-01-12  Clément Chigot  <clement.chigot@atos.net>
+
+	ld/testsuite: prepare ld-elfvsb to support XCOFF
+	A following patch will add visibility support in ld for XCOFF. Thus,
+	ld-elfvsb is renamed ld-vsb and a suffix is added to files targeting only
+	ELF format.
+
+	ld/ChangeLog:
+
+		* testsuite/ld-elfvsb: rename as ld-vsb.
+		* testsuite/ld-elfvsb/hidden0.d: move to ld-vsb and rename with
+		  suffix -elf.d.
+		* testsuite/ld-elfvsb/hidden1.d: Likewise.
+		* testsuite/ld-elfvsb/hidden2.d: Likewise.
+		* testsuite/ld-elfvsb/internal0.d: Likewise.
+		* testsuite/ld-elfvsb/internal1.d: Likewise.
+		* testsuite/ld-elfvsb/protected0.d: Likewise.
+		* testsuite/ld-elfvsb/protected1.d: Likewise.
+
+2022-01-12  Clément Chigot  <clement.chigot@atos.net>
+
+	gas: add visibility support using GNU syntax on XCOFF
+	In order to ease port of GNU assembly code and especially ld testsuite,
+	this patch allows XCOFF to accept the usual GNU syntax for visibility.
+
+	PR 22085
+
+	gas/ChangeLog:
+
+		* config/tc-ppc.c (ppc_GNU_visibility): New function.
+		* testsuite/gas/ppc/aix.exp: Add new tests.
+		* testsuite/gas/ppc/xcoff-visibility-2-32.d: New test.
+		* testsuite/gas/ppc/xcoff-visibility-2-64.d: New test.
+		* testsuite/gas/ppc/xcoff-visibility-2.s: New test.
+
+2022-01-12  Clément Chigot  <clement.chigot@atos.net>
+
+	gas: add visibility support for XCOFF
+	XCOFF assembly defines the visibility using an additional argument
+	on several pseudo-ops: .globl, .weak, .extern and .comm.
+	This implies that .globl and .weak syntax is different than the
+	usual GNU syntax. But we want to provide compatibility with AIX
+	assembler, especially because GCC is generating the visibility
+	using this XCOFF syntax.
+
+	PR 22085
+
+	bfd/ChangeLog:
+
+	        * coffcode.h (coff_write_object_contents): Change XCOFF header
+	        vstamp field to 2.
+	        * coffgen.c (coff_print_symbol): Increase the size for n_type.
+
+	gas/ChangeLog:
+
+	        * config/tc-ppc.c (ppc_xcoff_get_visibility): New function.
+	        (ppc_globl): New function.
+	        (ppc_weak): New function.
+	        (ppc_comm): Add visibility field support.
+	        (ppc_extern): Likewise.
+	        * testsuite/gas/all/cofftag.d: Adjust to new n_type size
+	        providing by objdump.
+	        * testsuite/gas/ppc/test1xcoff32.d: Likewise.
+	        * testsuite/gas/ppc/aix.exp: Add new tests.
+	        * testsuite/gas/ppc/xcoff-visibility-1-32.d: New test.
+	        * testsuite/gas/ppc/xcoff-visibility-1-64.d: New test.
+	        * testsuite/gas/ppc/xcoff-visibility-1.s: New test.
+
+	include/ChangeLog:
+
+	        * coff/internal.h (SYM_V_INTERNAL, SYM_V_HIDDEN,
+	        SYM_V_PROTECTED, SYM_V_EXPORTED, SYM_V_MASK): New defines.
+	        * coff/xcoff.h (struct xcoff_link_hash_entry): Add visibility
+	        field.
+
+	ld/ChangeLog:
+
+	        * testsuite/ld-pe/pr19803.d: Adjust to new n_type size
+	        providing by objdump.
+
+2022-01-12  Hans-Peter Nilsson  <hp@axis.com>
+
+	objdump, readelf: Emit "CU:" format only when wide output is requested
+	As pre-approved by Alan in
+	https://sourceware.org/pipermail/binutils/2021-September/118019.html
+	and I believe people have run into getting testsuite failures for
+	test-environments with "long" directory names, at least once more
+	since that time.  Enough.  I grepped the gas, binutils and ld
+	testsuites for "CU:" to catch target-specific occurrences, but I
+	noticed none.  I chose to remove "CU:" on the objdump tests instead of
+	changing options to get the wide format, so as to keep the name of the
+	test consistent with actual options; but added it to the readelf
+	options for the gas test as I believe the "CU:" format is preferable.
+
+	Tested for cris-elf and native x86_64-pc-linux-gnu.
+
+	binutils:
+		* dwarf.c (display_debug_lines_decoded): Don't check the
+		string length of the directory, instead emit the "CU: dir/name"
+		format only if wide output is requested.
+		* testsuite/binutils-all/dw5.W, testsuite/binutils-all/objdump.WL:
+		Adjust accordingly.
+
+	gas:
+		* testsuite/gas/elf/dwarf-5-loc0.d: Add -W to readelf options.
+
+2022-01-12  Alan Modra  <amodra@gmail.com>
+
+	Set SEC_ELF_REVERSE_COPY earlier
+	For the sake of DT_RELR.
+
+	bfd/
+		* elflink.c (elf_link_input_bfd): Don't set SEC_ELF_REVERSE_COPY
+		here.  Move sanity checks to reverse copying code.
+	ld/
+		* ldlang.c (lang_add_section): Set SEC_ELF_REVERSE_COPY for
+		.ctors/.dtors in .init_array/.fini_array.
+
+2022-01-12  Tiezhu Yang  <yangtiezhu@loongson.cn>
+
+	gdb: testsuite: fix wrong comment in gdb.base/charset.c
+	In gdb/testsuite/gdb.base/charset.c, use "IBM1047" instead of "EBCDIC"
+	to fix the wrong comment.
+
+2022-01-12  Tiezhu Yang  <yangtiezhu@loongson.cn>
+
+	gdb: testsuite: fix failed testcases in gdb.base/charset.exp
+	In gdb/testsuite/gdb.base/charset.c, the last argument is greater than 127
+	when call fill_run() in EBCDIC-US and IBM1047, but the type of string[] is
+	char, this will change the value due to sign extension.
+
+	For example, ebcdic_us_string[7] will be -63 instead of the original 193 in
+	EBCDIC-US.
+
+	Make the type of string[] as unsigned char to fix the following six failed
+	testcases:
+
+	  $ grep FAIL gdb/testsuite/gdb.sum
+	  FAIL: gdb.base/charset.exp: check value of parsed character literal in EBCDIC-US
+	  FAIL: gdb.base/charset.exp: check value of parsed string literal in EBCDIC-US
+	  FAIL: gdb.base/charset.exp: check value of escape that doesn't exist in EBCDIC-US
+	  FAIL: gdb.base/charset.exp: check value of parsed character literal in IBM1047
+	  FAIL: gdb.base/charset.exp: check value of parsed string literal in IBM1047
+	  FAIL: gdb.base/charset.exp: check value of escape that doesn't exist in IBM1047
+
+2022-01-12  GDB Administrator  <gdbadmin@sourceware.org>
+
+	Automatic date update in version.in
+
+2022-01-11  Fangrui Song  <maskray@google.com>
+
+	ar: Add --thin for creating thin archives
+	In many ar implementations (FreeBSD, elfutils, etc), -T has the X/Open
+	System Interface specified semantics. Therefore -T for thin archives is
+	not recommended for portability. -T is deprecated without diagnostics.
+
+	    PR binutils/28759
+	    * ar.c (long_options): Add --thin.
+	    (usage) Add --thin. Deprecate -T without diagnostics.
+	    * doc/binutils.texi: Add doc.
+	    * NEWS: Mention --thin.
+	    * binutils/testsuite/binutils-all/ar.exp: Add tests.
+
+2022-01-11  Martin Storsj  <martin@martin.st>
+
+	Fix multiple problems with DLL generation.
+	ld	* pe-dll.c (make_head): Prefix the symbol name with the dll name.
+		(make_tail, make_one, make_singleton_name_thunk): Likewise.
+		(make_import_fixup_entry, make_runtime_pseudo_reloc): Likewise.
+		(pe_create_runtime_relocator_reference): Likewise.
+		(pe_dll_generate_implib): Set dll_symname_len.
+		(pe_process_import_defs): Likewise.
+
+	binutils
+		* dlltool.c (main): If a prefix has not been provided, attempt to
+		use a deterministic one based upon the dll name.
+
+2022-01-11  Jan Beulich  <jbeulich@suse.com>
+
+	gas/doc: mention quoted symbol names
+
+2022-01-11  Andrew Burgess  <aburgess@redhat.com>
+
+	gdbsupport: regenerate Makefile.in
+	I had cause to regenerate gdbsupport/Makefile.in, and noticed some
+	unexpected changes in the copyright header dates.
+
+	I suspect that this was caused by the end of year date range update
+	process.
+
+	The Makefile.in contains two date ranges.  The first range appears to
+	be the date range for the version of automake being used, that is the
+	range runs up to 2017 only, when automake 1.15.1 was released.
+
+	The second date range in Makefile.in represents the date range for the
+	generated file, and so, now runs up to 2022.
+
+	Anyway, this is the result of running autoreconf (using automake
+	1.15.1) in the gdbsupport directory.
+
+2022-01-11  GDB Administrator  <gdbadmin@sourceware.org>
+
+	Automatic date update in version.in
+
+2022-01-10  Clément Chigot  <clement.chigot@atos.net>
+
+	XCOFF: add support for TLS relocations on hidden symbols
+	This patch adds support for TLS relocation targeting C_HIDEXT symbols.
+	In gas, TLS relocations, except R_TLSM and R_TLMSL, must keep the value
+	of their target symbol.
+	In ld, it simply ensures that internal TLS symbols are added to the
+	linker hash table for xcoff_reloc_type_tls.
+
+	It also improves the tests made by both.
+
+	bfd/ChangeLog:
+
+		* coff-rs6000.c (xcoff_howto_table): Fix name of R_TLSML.
+		(xcoff_reloc_type_tls): Replace the error when h is NULL by
+		an assert.
+		(xcoff_complain_overflow_unsigned_func): Adjust comments.
+		* coff64-rs6000.c (xcoff64_howto_table): Fix name of R_TLSML.
+		* xcofflink.c (xcoff_link_add_symbols_to_hash_table): New
+		function.
+		(xcoff_link_add_symbols): Add C_HIDEXT TLS symbols to the linker
+		hash table.
+
+	gas/ChangeLog:
+
+		* config/tc-ppc.c (md_apply_fix): Enable support for TLS
+		relocation over internal symbols.
+		* testsuite/gas/ppc/aix.exp: Replace xcoff-tlms by xcoff-tls.
+		* testsuite/gas/ppc/xcoff-tlsm-32.d: Removed.
+		* testsuite/gas/ppc/xcoff-tlsm-64.d: Removed.
+		* testsuite/gas/ppc/xcoff-tlsm.s: Removed.
+		* testsuite/gas/ppc/xcoff-tls-32.d: New test.
+		* testsuite/gas/ppc/xcoff-tls-64.d: New test.
+		* testsuite/gas/ppc/xcoff-tls.s: New test.
+
+	ld/ChangeLog:
+
+		* testsuite/ld-powerpc/aix52.exp: Improve aix-tls-reloc test.
+		* testsuite/ld-powerpc/aix-tls-reloc.s: Likewise.
+		* testsuite/ld-powerpc/aix-tls-reloc-32.d: Removed.
+		* testsuite/ld-powerpc/aix-tls-reloc-64.d: Removed.
+		* testsuite/ld-powerpc/aix-tls-reloc-32.dd: New test.
+		* testsuite/ld-powerpc/aix-tls-reloc-32.dt: New test.
+		* testsuite/ld-powerpc/aix-tls-reloc-64.dd: New test.
+		* testsuite/ld-powerpc/aix-tls-reloc-64.dt: New test.
+
+2022-01-10  Tiezhu Yang  <yangtiezhu@loongson.cn>
+
+	gdb: add Tiezhu Yang to MAINTAINERS
+
+2022-01-10  Tom Tromey  <tom@tromey.com>
+
+	Reduce use of unfiltered output in Darwin code
+	The Darwin code uses unfiltered output liberally.  This patch changes
+	this code to send some output to gdb_stdlog (in some cases via the use
+	of debug_prefixed_printf_cond_nofunc), or to gdb_stderr, or to simply
+	switch to filtered output.
+
+	Note that I didn't switch inferior_debug to use
+	debug_prefixed_printf_cond_nofunc, because that would affect the
+	output by removing the information about the inferior.  I wasn't sure
+	if this was important or not, so I left it in.
+
+	v2 of this patch uses warning rather than prints to gdb_stderr, and
+	removes some trailing whitespace.
+
+	I can't compile this patch, so it's "best effort".
+
+2022-01-10  GDB Administrator  <gdbadmin@sourceware.org>
+
+	Automatic date update in version.in
+
+2022-01-09  GDB Administrator  <gdbadmin@sourceware.org>
+
+	Automatic date update in version.in
+
+2022-01-08  Andrew Burgess  <aburgess@redhat.com>
+
+	gdb/hurd: handle inferiors exiting
+	While testing on GNU/Hurd (i386) I noticed that GDB crashes when an
+	inferior exits, with this error:
+
+	  inferior.c:293: internal-error: inferior* find_inferior_pid(process_stratum_target*, int): Assertion `pid != 0' failed.
+
+	The problem appears to be in gnu_nat_target::wait.
+
+	We always set inferior_ptid to null_ptid before calling target_wait,
+	this has been the case since the multi-target changes were made to GDB
+	in commit:
+
+	  commit 5b6d1e4fa4fc6827c7b3f0e99ff120dfa14d65d2
+	  Date:   Fri Jan 10 20:06:08 2020 +0000
+
+	      Multi-target support
+
+	With follow up changes in commit:
+
+	  commit 24ed6739b699f329c2c45aedee5f8c7d2f54e493
+	  Date:   Thu Jan 30 14:35:40 2020 +0000
+
+	      gdb/remote: Restore support for 'S' stop reply packet
+
+	Unfortunately, the GNU/Hurd target is still relying on the value of
+	inferior_ptid in the case where an inferior exits - we return the
+	value of inferior_ptid as the pid of the process that exited.  This
+	was fine in the single target world, where inferior_ptid identified
+	the one running inferior, but this is no longer good enough.
+
+	Instead, we should return a ptid containing the pid of the process
+	that exited, as obtained from the wait event, and this is what this
+	commit does.
+
+	I've not run the full testsuite on GNU/Hurd as there appear to be lots
+	of other issues with this target that makes running the full testsuite
+	very painful, but I think this looks like a small easy improvement.
+
+2022-01-08  Tom Tromey  <tom@tromey.com>
+
+	Add explicit check for nullptr to target_announce_attach
+	Lancelot pointed out that target_announce_attach was missing an
+	explicit check against nullptr.  This patch adds it.
+
+2022-01-08  Hannes Domani  <ssbssa@yahoo.de>
+
+	Add _sigsys info to siginfo struct
+	This patch adds information about _sigsys structure from newer
+	kernels, so that $_siginfo decoding can show information about
+	_sigsys, making it easier for developers to debug seccomp failures.
+	Requested in PR gdb/24283.
+
+	Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=24283
+
+2022-01-08  Tiezhu Yang  <yangtiezhu@loongson.cn>
+
+	gdb: testsuite: show print array-indexes after set in arrayidx.exp
+	Add "show print array-indexes" testcases after set print array-indexes
+	to off or on.
+
+	Without this patch:
+
+	    PASS: gdb.base/arrayidx.exp: set print array-indexes to off
+	    PASS: gdb.base/arrayidx.exp: print array with array-indexes off
+	    PASS: gdb.base/arrayidx.exp: set print array-indexes to on
+	    PASS: gdb.base/arrayidx.exp: print array with array-indexes on
+
+	With this patch:
+
+	    PASS: gdb.base/arrayidx.exp: set print array-indexes to off
+	    PASS: gdb.base/arrayidx.exp: show print array-indexes is off
+	    PASS: gdb.base/arrayidx.exp: print array with array-indexes off
+	    PASS: gdb.base/arrayidx.exp: set print array-indexes to on
+	    PASS: gdb.base/arrayidx.exp: show print array-indexes[...]

[diff truncated at 100000 bytes]


More information about the Binutils-cvs mailing list