[binutils-gdb/binutils-2_44-branch] This is the 2.44 release
Nick Clifton
nickc@sourceware.org
Sun Feb 2 11:50:26 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=815d9a14cbbb3b81843f7566222c87fb22e7255d
commit 815d9a14cbbb3b81843f7566222c87fb22e7255d
Author: Nick Clifton <nickc@redhat.com>
Date: Sun Feb 2 11:50:17 2025 +0000
This is the 2.44 release
Diff:
---
ChangeLog.git | 243923 ++++++++++++++++++++++++++++++++++++++
bfd/configure | 20 +-
bfd/development.sh | 4 +-
bfd/po/bfd.pot | 316 +-
bfd/version.m4 | 2 +-
binutils/configure | 20 +-
gas/configure | 20 +-
gas/po/gas.pot | 546 +-
gprof/configure | 20 +-
gprofng/configure | 20 +-
gprofng/doc/version.texi | 4 +-
gprofng/libcollector/configure | 20 +-
ld/configure | 20 +-
ld/po/ld.pot | 2 +-
libiberty/functions.texi | 18 +-
opcodes/configure | 20 +-
opcodes/po/opcodes.pot | 2 +-
src-release.sh | 2 +-
18 files changed, 244457 insertions(+), 522 deletions(-)
diff --git a/ChangeLog.git b/ChangeLog.git
new file mode 100644
index 00000000000..57d20c0541a
--- /dev/null
+++ b/ChangeLog.git
@@ -0,0 +1,243923 @@
+2025-02-02 Nick Clifton <nickc@redhat.com>
+
+ Import AArch64 commits:
+ 0fad7627cf8 aarch64: Fix overly lax +frintts dependency
+ 99b90c46110 aarch64: Fix fp8 feature dependencies
+ 71e59ebefc2 aarch64: Support +sme+nosve permissively
+
+ PR 32580: Partial fix for problems with the ksh shell and the elf linker script
+
+2025-02-02 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2025-02-01 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2025-01-31 Lulu Cai <cailulu@loongson.cn>
+
+ LoongArch: Do not relax against __[start|stop]_SECNAME symbol
+
+2025-01-31 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2025-01-30 Nick Clifton <nickc@redhat.com>
+
+ Remove a couple of entries in the binutils MAINTAINERS file
+
+2025-01-30 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2025-01-29 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2025-01-28 Nick Clifton <nickc@redhat.com>
+
+ Updated translations for various sub-directories
+
+2025-01-28 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2025-01-27 Alan Modra <amodra@gmail.com>
+
+ loongson buffer overflow
+ bfd_elfNN_loongarch_set_data_segment_info can be called from the target
+ after_allocation function with a non-ELF hash table. This is seen in
+ the ld-elf pr21884 testcase. Fix the problem by first checking the
+ hash table type before writing to a loongarch_elf_hash_table field.
+
+ (cherry picked from commit 59ba00f21f7d48780e92a9fb66ed4abbedc3bd28)
+
+2025-01-27 Alan Modra <amodra@gmail.com>
+
+ PR32599, objcopy -I ihex: invalid operation
+ Restores ihex get_symtab_upper_bound to what it was prior to commit
+ 394a3f4f8d. This will enable objcopy of other no-sym formats too.
+
+ PR 32599
+ * libbfd-in.h (_bfd_nosymbols_get_symtab_upper_bound): Define
+ as _bfd_long_bfd_0.
+ * libbfd.h: Regenerate.
+
+ (cherry picked from commit fd45211245d0f1027a0c3ab606e3253eda779e68)
+
+2025-01-27 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2025-01-26 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2025-01-25 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2025-01-24 Richard Earnshaw <rearnsha@arm.com>
+
+ aarch64: Fix PLT fixups when BTI is used [PR32572]
+ PR ld/32572
+
+ There are two problems addressed in this PR. Firstly, the choice of
+ whether or not a PLT stub needs a BTI on entry was too strict,
+ resulting in non-pie executables not having a BTI on their stub. But
+ secondly, the logic to handle each stub types did not agree across the
+ various places where this information is used.
+
+ The first issue is fixed by using bfd_link_executable rather than
+ bfd_link_pde. The second is addressed by recording a delta for PLT
+ stub alongside the stub itself. This is then used without needing
+ additional logic later on since it has been pre-calculated.
+
+ A more comprehensive fix would involve creating a data structure to
+ describe each fixup, including a call-back function to apply any
+ relocations. But that's a fairly large change and not appropriate for
+ backporting.
+
+2025-01-24 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2025-01-23 Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
+ Guillaume VACHERIAS <guillaume.vacherias@st.com>
+
+ ld: fix alignment issue for ARM thumb long branch stub using PureCode section
+ When pure-code option is activated. The linker creates for M-profile architecures
+ a 2-bytes branch instruction. This causes the section alignment to be set to 2-byte
+ alignment instead of 4-byte alignment. This is a problem for long branch stub
+ without pure-code section as it contains a 32-bit address as data, which is expected
+ to be 4-byte aligned. Hence creating a long branch stub for PureCode section followed
+ by a long branch stub will result in a misalignment for the 32-bit address.
+
+ An easy fix is to add a nop instruction after the branch to keep the section alignment
+ to 4 bytes.
+
+ (cherry picked from commit 014a7c0fa36ecc41918e5793052dd3ae8372efe5)
+
+2025-01-23 Sam James <sam@gentoo.org>
+
+ ld: fix bashism in scripttempl/elf.sc
+ ld/
+ PR ld/32580
+
+ * scripttempl/elf.sc: Fix '==' bashism.
+
+ (cherry picked from commit 6999916e6c7fe6ba3a7661d852757f59223416a3)
+
+2025-01-23 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2025-01-22 Andrew Burgess <aburgess@redhat.com>
+
+ bfd/doc: use abs_srcdir when creating symlinks
+ After commit:
+
+ commit bd32be01c997f686ab0b53f0640eaa0aeb61fbd3
+ Date: Fri Dec 3 00:23:20 2021 -0500
+
+ bfd: merge doc subdir up a level
+
+ And the follow-up commit:
+
+ commit 98b1464bdf6306a8ab4614b5e9f76cdb2dd00b33
+ Date: Wed Oct 2 22:58:08 2024 +0300
+
+ bfd: fix unnecessary bfd.info regen
+
+ There is still a problem building the bfd docs from a release tar
+ file.
+
+ As the release tar file contains the pre-generated .texi files we
+ expect the bfd/doc build stage to symlink to the pre-existing .texi
+ files in the source tree.
+
+ However, this is still not working as expected if $(srcdir) is
+ relative. The problem is this line in REGEN_TEXI:
+
+ test -e $$texi || test ! -f $(srcdir)/$$texi || $(LN_S) $(srcdir)/$$texi $$texi; \
+
+ This is executed from the build/bfd/ directory, so if $(srcdir) is
+ relative, then this will get you from the bfd/ directory in the build
+ tree to the corresponding bfd/ directory in the src tree. However,
+ the symlink is created in the bfd/doc/ build directory. The relative
+ path will then fail to take you to the bfd/ directory in the src
+ tree.
+
+ Fix this by using $(abs_srcdir) when creating the symlink.
+
+ Approved-By: Nick Clifton <nickc@redhat.com>
+
+2025-01-22 Jan Beulich <jbeulich@suse.com>
+
+ x86/Solaris: correct support for Sun form of CMOV<size>.S
+ PR gas/32579
+
+ The deprecated .s (swapped operand encoding) functionality got in the
+ way of properly recognizing this specific form. Move the Solaris-
+ specific code ahead of that.
+
+2025-01-22 timhu2011 <hudi2011@163.com>
+
+ x86: Add missing @tab to separate columns in c-i386.texi
+ I have missed @tab for .gmiccs and .padlockphe2, so fix this doc error.
+
+ gas/ChangeLog:
+
+ * doc/c-i386.texi: Add the missing @tab for .gmiccs and
+ .padlockphe2
+
+2025-01-22 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2025-01-21 Alan Modra <amodra@gmail.com>
+
+ Support broken gcc test for gas string merge support
+ On casual reading of older gcc configure scripts it might be supposed
+ that the test for gas string merge support tries with %progbits after
+ a fail on ARM with @progbits. It doesn't succeed due to a bug. So to
+ support building of older gcc's for ARM without users having to edit
+ gcc sources, add a hack to gas. The hack can disappear in a few years
+ when building older gcc's likely requires other work too.
+
+ I've changed the docs to reflect what we actually allow for .section
+ syntax prior to this patch. (No way should this hack be documented as
+ allowed!)
+
+ PR 32491
+ * config/obj-elf.c (obj_elf_section): Allow missing entsize
+ for ARM gcc configure bug.
+ * doc/as.texi: Correct syntax of ELF .section directive.
+ * testsuite/gas/elf/string.s,
+ * testsuite/gas/elf/string.d: Test it.
+
+ (cherry picked from commit 6427e777b99ec6505509a68de6d460ff772bee6a)
+
+2025-01-21 Alan Modra <amodra@gmail.com>
+
+ run_dump_test warning/error regexp
+ This allows you to specify a run_dump_test warning that may or may not
+ be present using
+ warning: (warning_text_goes_here)?
+ ie. the regexp matches an empty string.
+
+ (cherry picked from commit 592819f7188509713f3db6dbe6bc7d0b7e3af89e)
+
+2025-01-21 Nick Clifton <nickc@redhat.com>
+
+ More updated translations
+
+2025-01-21 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2025-01-20 Maciej W. Rozycki <macro@redhat.com>
+
+ LD: Remove duplicate 2.44 NEWS marker
+ Delete an extra 2.44 NEWS marker that has crept in by chance.
+
+ (cherry picked from commit 17973a4feeec604307e915f1df9e5593bfd09717)
+
+2025-01-20 Nick Clifton <nickc@redhat.com>
+
+ Update translations for various sub-directories
+
+2025-01-20 Richard Earnshaw <rearnsha@arm.com>
+
+ gas: elf: Relax rules for SHF_STRING sections
+ Commit af3394d97a8c5187085c0eec5fb03e8da88db5fb allowed sections
+ declared with "S" (SHF_STRING) to specify the entity size, but then
+ would warn if the entity size was omitted, as with the old syntax.
+
+ Unfortunately, since specifying the entity size is incompatible with
+ binutils 2.43 or earlier, this makes it impossible to specify a
+ strings section in source code without generating an assembly warning
+ (the new syntax isn't supported in older assemblers and the old syntax
+ generates warnings).
+
+ Nevertheless, the old code was wrong in that it did not set the entity
+ size at all, in contravention of the ELF specification (though to date
+ there are no known cases where this mattered outside of mergeable
+ sections).
+
+ Fix this by permitting the original syntax without a warning again,
+ but by defaulting the entity size to 1. This is compatible with the
+ most common case of strings being byte-based.
+
+ Added some tests for the various flavours of declaration that we
+ support.
+
+2025-01-20 Lulu Cai <cailulu@loongson.cn>
+
+ gas/NEWS,ld/NEWS: Announce LoongArch changes in 2.44
+
+2025-01-20 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2025-01-19 Nick Clifton <nickc@redhat.com>
+
+ Update version to 2.43.90 and regenerate files
+
+ Add name of 2.44 branch
+
+ Add markers for bihnutils 2.44 branch
+
+2025-01-19 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2025-01-18 Alan Modra <amodra@gmail.com>
+
+ Re: binary outsymbols
+ The "of course to free outsymbols" turned out to be wrong. outsymbols
+ belongs to objcopy which frees them, so commit 6ca01b0bdd59 introduced
+ a double free.
+
+ * srec.c (srec_write_symbols): Don't free outsymbols.
+ * tekhex.c (tekhex_write_object_contents): Likewise.
+
+2025-01-18 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2025-01-17 Tom Tromey <tromey@adacore.com>
+
+ Simplify get_frame_unwind_table
+ This simplifies get_frame_unwind_table, changing it to use the
+ registry 'emplace' method and to pass the initialization iterators to
+ the constructor. This fixes a build problem on x86 -- reported by the
+ auto-builder -- as a side effect.
+
+ Tested-By: Guinevere Larsen <guinevere@redhat.com>
+
+2025-01-17 Guinevere Larsen <guinevere@redhat.com>
+
+ gdb/reverse: Fix recording vmov[u|a]p[s|d] instructions
+ Tom de Vries reported that some of the test for the vmov[u|a]p[s|d] were
+ failing. In my machine xmm3 was consistently set to 0x54, but apparently
+ that is different depending on the system. This commit zeroes out xmm3
+ at the start of the test instead.
+
+ While debugging the test failures, I also noticed an issue where the
+ recording wasn't saving all the required memory. That happened because
+ vmovs[s|d] shares its opcode with vmovap[s|d], meaning they seem to
+ share code paths, but the latter encodes memory modification size on
+ VEX.L whereas the former encodes in VEX.pp. So this commit fixed that,
+ and made the relevant tests more robust and complete.
+
+ Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32561
+ Approved-By: Guinevere Larsen <guinevere@redhat.com>
+
+2025-01-17 Tom Tromey <tromey@adacore.com>
+
+ Fix self-test crash
+ My earlier changes introduced a self-test crash. This patch fixes the
+ bug by introducing a new method overload into mock_mapped_index.
+
+2025-01-17 Andrew Burgess <aburgess@redhat.com>
+
+ gdb/doc: some more details in the README file
+ After some recent discussions on the mailing list, I've made some
+ changes to the README to (I hope) provide more clarity.
+
+ The changes I made are:
+
+ 1. Removed the use of a lone 'HOST' on the configure line. I tried
+ this and 'configure' gave me a warning:
+
+ configure: WARNING: you should use --build, --host, --target
+
+ So I don't think this is approved practice any more. We should
+ encourage users to use `--host` instead.
+
+ 2. Added and reworded the --host, --target, and --enable-targets
+ descriptions in the 'configure options' section. My goals here are
+ to clarify that 'cross-debugging' is really the same as 'remote
+ debugging', and also to make it clearer what the defaults are.
+
+ 3. Added some additional text to the 'Remote debugging' section
+ mentioning that 'remote debugging' is basically the same as 'cross
+ debugging', given that we use 'cross-debugging' in the text above.
+
+ Reviewed-By: Keith Seitz <keiths@redhat.com>
+
+2025-01-17 Andrew Burgess <aburgess@redhat.com>
+
+ gdb: quote inferior arguments, if needed, when opening a core file
+ This commit fixes an issue with the commit:
+
+ commit d3d13bf876aae425ae0eff2ab0f1af9f7da0264a
+ Date: Thu Apr 25 09:36:43 2024 +0100
+
+ gdb: add gdbarch method to get execution context from core file
+
+ The above commit improves GDB's ability to display inferior arguments
+ when opening a core file, however, if an argument includes white
+ space, then this is not displayed as well as it should be. For
+ example:
+
+ (gdb) core-file /tmp/corefile-exec-context.2.core
+ [New LWP 4069711]
+ Reading symbols from /tmp/corefile-exec-context...
+ Core was generated by `/tmp/corefile-exec-context aaaaa bbbbb ccccc ddddd e e e e e'.
+ Program terminated with signal SIGABRT, Aborted.
+ #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
+ 50 return ret;
+ (gdb) show args
+ Argument list to give program being debugged when it is started is "aaaaa bbbbb ccccc ddddd e\ e\ e\ e\ e".
+ (gdb)
+
+ Notice the 'Core was generated by ...' line. In this case it is not
+ clear if the "e e e e e" is a single argument containing white space,
+ or 5 single arguments.
+
+ But when we 'show args' it is immediately clear that this is a single
+ argument, as the white space is now escaped.
+
+ This problem was caused by the above commit building the argument
+ string itself, and failing to consider white space escaping.
+
+ This commit changes things around, first we place the arguments into
+ the inferior, then, to print the 'Core was generated by ...' line, we
+ ask the inferior for the argument string. In this way the quoting is
+ handled just as it is for 'show args'. The initial output is now:
+
+ (gdb) core-file /tmp/corefile-exec-context.2.core
+ [New LWP 4069711]
+ Reading symbols from /tmp/corefile-exec-context...
+ Core was generated by `/tmp/corefile-exec-context aaaaa bbbbb ccccc ddddd e\ e\ e\ e\ e'.
+ Program terminated with signal SIGABRT, Aborted.
+ #0 0x00007f4f007af625 in raise () from /lib64/libc.so.6
+ (gdb)
+
+ Much better. The existing test is extended to cover this case.
+
+ Reviewed-By: Guinevere Larsen <guinevere@redhat.com>
+ Approved-By: Tom Tromey <tom@tromey.com>
+
+2025-01-17 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+
+ gprofng: update binutils/NEWS for 2.44
+ ChangeLog
+ 2025-01-16 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+
+ * binutils/NEWS: Updated.
+
+2025-01-17 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+
+ gprofng: fix Segmentation Fault in DbeInstr::mapPCtoLine
+ The bug was filed against gprofng-gui (https://savannah.gnu.org/bugs/?66560).
+
+ gprofng/ChangeLog
+ 2025-01-16 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+
+ * src/Hist_data.cc (DbeInstr::mapPCtoLine): Check for null pointer.
+
+2025-01-17 Andrew Carlotti <andrew.carlotti@arm.com>
+
+ aarch64: Fix sve2p1 gating and add missing instructions
+ Many FEAT_SVE2p1 instructions need to be enabled by either of two
+ different features (one for streaming mode, and one for non-streaming
+ mode). This patch adds correct gating conditions for these
+ instructions.
+
+ There were also a few sve2p1 instructions missing altogether, so add
+ those as well.
+
+ The testsuite is modified to check for all alternative enablement
+ conditions. In many cases this is done by adding an alternative
+ assembler commands to existing test files. For some SME/SME2 tests,
+ only some of the instructions are enabled by +sve2p1, so these are
+ copied into a separate test. For original SVE2p1 tests, the non-SME2p1
+ instructions have been moved to a separate test file.
+
+ There are also new tests for the newly added instructions. These
+ include a couple of fixme comments relating to bad error reporting,
+ which should be investigated later.
+
+2025-01-17 Tom Tromey <tromey@adacore.com>
+
+ Remove mapped_index_base
+ The base class mapped_index_base is no longer needed. Previously it
+ was used by both the .gdb_index and .debug_names readers, but the
+ latter now uses the cooked index instead.
+
+ This patch removes mapped_index_base, merging it into
+ mapped_gdb_index. Supporting code that is specific to .gdb_index is
+ also moved into read-gdb-index.c. This shrinks dwarf2/read.c a bit,
+ which is nice.
+
+ Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32504
+ Approved-By: Andrew Burgess <aburgess@redhat.com>
+
+2025-01-17 Tom Tromey <tromey@adacore.com>
+
+ Remove gdb_index_unpack
+ gdb_index_unpack is not used and can be removed. The include of
+ extract-store-integer.h is also no longer needed by this file.
+
+ Approved-By: Andrew Burgess <aburgess@redhat.com>
+
+2025-01-17 Tom Tromey <tromey@adacore.com>
+
+ Add missing includes of extract-store-integer.h
+ I found a number of .c files that need to include
+ extract-store-integer.h but that were only including it indirectly.
+ This patch adds the missing includes. This change enables the next
+ patch.
+
+ Approved-By: Andrew Burgess <aburgess@redhat.com>
+
+2025-01-17 Guinevere Larsen <guinevere@redhat.com>
+
+ gdb/testsuite: Test for a backtrace through object without debuginfo
+ Fedora has been carrying this test since back in the Project Archer
+ days. A change back then caused GDB to stop being able to backtrace when
+ only some of the object files had debug information. Even though the
+ changed code never seems to have made its way into the main GDB project,
+ I think it makes sense to bring the test along to ensure something like
+ this doesn't pass unnoticed.
+
+ Co-Authored-By: Jan Kratochvil <jan@jankratochvil.net>
+ Reviewed-by: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
+ Approved-By: Andrew Burgess <aburgess@redhat.com>
+
+2025-01-17 Guinevere Larsen <guinevere@redhat.com>
+
+ gdb: introduce ability to disable frame unwinders
+ Sometimes, in the GDB testsuite, we want to test the ability of specific
+ unwinders to handle some piece of code. Usually this is done by trying
+ to outsmart GDB, or by coercing the compiler to remove information that
+ GDB would rely on. Both approaches have problems as GDB gets smarter
+ with time, and that compilers might differ in version and behavior, or
+ simply introduce new useful information. This was requested back in 2003
+ in PR backtrace/8434.
+
+ To improve our ability to thoroughly test GDB, this patch introduces a
+ new maintenance command that allows a user to disable some unwinders,
+ based on either the name of the unwinder or on its class. With this
+ change, it will now be possible for GDB to not find any frame unwinders
+ for a given frame, which would previously cause GDB to assert. GDB will
+ now check if any frame unwinder has been disabled, and if some has, it
+ will just error out instead of asserting.
+
+ Unwinders can be disabled or re-enabled in 3 different ways:
+ * Disabling/enabling all at once (using '-all').
+ * By specifying an unwinder class to be disabled (option '-class').
+ * By specifying the name of an unwinder (option '-name').
+
+ If you give no options to the command, GDB assumes the input is an
+ unwinder class. '-class' would make no difference if used, is just here
+ for completeness.
+
+ This command is meant to be used once the inferior is already at the
+ desired location for the test. An example session would be:
+
+ (gdb) start
+ Temporary breakpoint 1, main () at omp.c:17
+ 17 func();
+ (gdb) maint frame-unwinder disable ARCH
+ (gdb) bt
+ \#0 main () at omp.c:17
+ (gdb) maint frame-unwinder enable ARCH
+ (gdb) cont
+ Continuing.
+
+ This commit is a more generic version of commit 3c3bb0580be0,
+ and so, based on the final paragraph of the commit message:
+ gdb: Add switch to disable DWARF stack unwinders
+ <...>
+ If in the future we find ourselves adding more switches to disable
+ different unwinders, then we should probably move to a more generic
+ solution, and remove this patch.
+ this patch also reverts 3c3bb0580be0
+
+ Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=8434
+ Co-Authored-By: Andrew Burgess <aburgess@redhat.com>
+ Reviewed-By: Eli Zaretskii <eliz@gnu.org>
+ Reviewed-by: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
+ Approved-By: Andrew Burgess <aburgess@redhat.com>
+
+ temp adding completion
+
+2025-01-17 Guinevere Larsen <guinevere@redhat.com>
+
+ gdb: Migrate frame unwinders to use C++ classes
+ Frame unwinders have historically been a structure populated with
+ callback pointers, so that architectures (or other specific unwinders)
+ could install their own way to handle the inferior. However, since
+ moving to C++, we could use polymorphism to get the same functionality
+ in a more readable way. Polymorphism also makes it simpler to add new
+ functionality to all frame unwinders, since all that's required is
+ adding it to the base class.
+
+ As part of the changes to add support to disabling frame unwinders,
+ this commit makes the first baby step in using polymorphism for the
+ frame unwinders, by making frame_unwind a virtual class, and adds a
+ couple of new classes. The main class added is frame_unwind_legacy,
+ which works the same as the previous structs, using function pointers
+ as callbacks. This class was added to allow the transition to happen
+ piecemeal. New unwinders should instead follow the lead of the other
+ classes implemented.
+
+ 2 of the others, frame_unwind_python and frame_unwind_trampoline, were added
+ because it seemed simpler at the moment to do that instead of reworking
+ the dynamic allocation to work with the legacy class, and can be used as
+ an example to future implementations.
+
+ Finally, the cygwin unwinder was converted to a class since it was most
+ of the way there already.
+
+ Reviewed-by: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
+ Approved-By: Simon Marchi <simon.marchi@efficios.com>
+ Approved-By: Andrew Burgess <aburgess@redhat.com>
+
+2025-01-17 Guinevere Larsen <guinevere@redhat.com>
+
+ gdb: add "unwinder class" to frame unwinders
+ A future patch will add a way to disable certain unwinders based on
+ different characteristics. This patch aims to make it more convenient
+ to disable related unwinders in bulk, such as architecture specific
+ ones, by identifying all unwinders by which part of the code adds it.
+ The classes, and explanations, are as follows:
+
+ * GDB: An internal unwinder, added by GDB core, such as the unwinder
+ for dummy frames;
+ * EXTENSION: Unwinders added by extension languages;
+ * DEBUGINFO: Unwinders installed by the debug info reader;
+ * ARCH: Unwinders installed by the architecture specific code.
+
+ Reviewed-By: Eli Zaretskii <eliz@gnu.org>
+ Reviewed-by: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
+ Approved-By: Simon Marchi <simon.marchi@efficios.com>
+ Approved-By: Andrew Burgess <aburgess@redhat.com>
+
+2025-01-17 Guinevere Larsen <guinevere@redhat.com>
+
+ gdb: make gdbarch store a vector of frame unwinders
+ Before this commit, all frame unwinders would be stored in the obstack
+ of a gdbarch and accessed by using the registry system. This made for
+ unwieldy code, and unnecessarily complex logic in the frame_unwinder
+ implementation, along with making frame_unwind structs be unable to have
+ non-trivial destructors.
+
+ Seeing as a future patch of this series wants to refactor the
+ frame_unwind struct to use inheritance, and we'd like to not restrict
+ the future derived classes on what destructors are allowed. In
+ preparation for that change, this commit changes the registry in gdbarch
+ to instead store an std::vector, which doesn't require using an obstack
+ and doesn't rely on a linked list.
+
+ There should be no user-visible changes.
+
+ Reviewed-by: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
+ Approved-By: Andrew Burgess <aburgess@redhat.com>
+
+2025-01-17 MayShao-oc <MayShao-oc@zhaoxin.com>
+
+ x86: Add CpuGMISM2 and CpuGMICCS
+ There are separate CPUID feature bits for SM2 and CCS instructions.
+ CCS is the acronym of Chinese Cipher System, it includes SM3 and SM4
+ instructions. This patch adds CpuGMISM2 and CpuGMICCS to replace CpuGMI on
+ corresponding instructions.
+
+ gas/ChangeLog:
+
+ * config/tc-i386.c: Add gmism2 and gmiccs to replace gmi.
+ * doc/c-i386.texi: Ditto.
+
+ opcodes/ChangeLog:
+
+ * i386-gen.c: Add GMISM2 and GMICCS to replace GMI.
+ * i386-opc.h (enum i386_cpu): Add CpuGMISM2 and CpuGMICCS to
+ replace CpuGMI.
+ * i386-opc.tbl: Replace GMI with GMISM2 on sm2 instruction. Replace GMI
+ with GMICCS on sm3 and sm4 instructions.
+ * i386-tbl.h: Regenerated.
+ * i386-mnem.h: Ditto.
+ * i386-init.h: Ditto.
+
+2025-01-17 Lulu Cai <cailulu@loongson.cn>
+
+ LoongArch: Allocate GOT entry for TLS DESC when -mno-relax is enabled
+ The type transition of TLSDESC is only done when -mrelax is enabled.
+ So when -mno-relax is enabled, keep GOT_TLS_GDESC to allocate the
+ GOT entry instead of just keeping GOT_TLS_IE.
+
+2025-01-17 Nick Clifton <nickc@redhat.com>
+
+ Sync config.guess and config.sub with latest versions from the config project.
+
+2025-01-17 Jan Beulich <jbeulich@suse.com>
+
+ x86/APX: convert runtime special case to build-time one
+ cpu_flags_match() is a hot path. Move the special casing that
+ b7267244a355 ("Support Intel AMX-MOVRS") added there to i386-gen, thus
+ affecting only build time performance.
+
+ x86: have .insn correctly consider AVX10.2's 256-bit embedded rounding
+ Deriving operand size may no longer assume 512-bit vector size when
+ embedded rounding is in use. In fact it was apparently wrong to do so
+ in the first place, as that's not correct for scalar insns. Drop the
+ rounding type check altogether; we fall back to EVEX.LIG when no
+ suitable operand was specified anyway, later in the function (and, btw,
+ similarly for VEX encodings).
+
+2025-01-17 Nelson Chu <nelson@rivosinc.com>
+
+ RISC-V: PR32499, Fix PR18841 segfault caused by ifunc relocation ordering
+ Even though the relocation isn't IRELATIVE, it still should be come last if
+ refering to ifunc symbol. In order to get the ifunc relocs properly sorted
+ the correct class needs to be returned. The code mimics what has been done
+ for x86, sparc, aarch64 and arm32.
+
+ bfd/
+ PR 18841
+ PR 32499
+ * elfnn-riscv.c (riscv_reloc_type_class): Handle ifunc relocation
+ ordering, even though it's not IRELATIVE, it still should be come
+ last if refering ifunc symbol.
+
+2025-01-17 Alan Modra <amodra@gmail.com>
+
+ cmdline_add_object_only_section leak
+ Free ofilename on error path. Don't bother testing "if (foo)" before
+ "free (foo)".
+
+2025-01-17 Alan Modra <amodra@gmail.com>
+
+ buffer overflow in cmdline_add_object_only_section
+ Seen running ld-plugin/lto-4r-c on x86_64-w64-mingw32
+
+ * ldlang.c (cmdline_add_object_only_section): Allocate one more
+ for output symbol buffer.
+
+2025-01-17 Alan Modra <amodra@gmail.com>
+
+ Silence asan warnings in resolve_symbol_value
+ The ".quad with division (fwdref)" gas test fails with asan warning
+ negation of -9223372036854775808 cannot be represented in type 'long int'
+ Fix this and another similar case.
+
+ * symbols.c (resolve_symbol_value): Cast "left" to valueT
+ before negating.
+
+2025-01-17 H.J. Lu <hjl.tools@gmail.com>
+
+ ld: Load the object only section when opening the mixed object file
+ Load the object only section when opening the mixed object file, instead
+ of loading it after all other input files have been loaded. This fixed
+
+ .../ld/collect-ld: /tmp/ccZAoUIW.obj-only.o: in function `main':
+ .../ld/testsuite/ld-plugin/lto-10a.c:4: multiple definition of `main'; /usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/libmingw32.a(lib64_libmingw32_a-crtexewin.o):(.text.startup+0x0): first defined here
+ .../ld/collect-ld: /usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/libmingw32.a(lib64_libmingw32_a-crtexewin.o):(.text.startup+0xc5): undefined reference to `WinMain'
+ collect2: error: ld returned 1 exit status
+ ...
+ FAIL: LTO 10
+
+ for x86_64-w64-mingw32 so that mixing LTO and non-LTO relocatable files
+ for "ld -r" works for both ELF and non-ELF platforms.
+
+ * ld.texi: Remove "On ELF platforms" from documentation of mixing
+ LTO and non-LTO relocatable files for "ld -r".
+ * ldlang.c (cmdline_load_object_only_section): New.
+ (cmdline_check_object_only_section): Call it.
+ * testsuite/ld-plugin/lto.exp: Enable mixed LTO and non-LTO
+ relocatable output tests for all.
+
+2025-01-17 Alan Modra <amodra@gmail.com>
+
+ buffer overflow in score_elf_create_dynamic_relocation
+ score_elf_create_dynamic_relocation sets up three output dynamic
+ relocs from rel[0], rel[1] and rel[2]. When rel[0] is the last reloc
+ in a section this of course results in a buffer overflow. It's a
+ weird thing to do given that only one relocation is output.
+
+ * elf32-score.c (score_elf_create_dynamic_relocation): Do not
+ set up three dynamic relocations when only one is output.
+ * elf32-score7.c: Likewise.
+
+2025-01-17 Alan Modra <amodra@gmail.com>
+
+ buffer overflow in mmix_elf_relocate_section
+ * elf64-mmix.c (mmix_elf_relocate_section): Correct size of
+ relocs shuffled by memmove.
+
+2025-01-17 Alan Modra <amodra@gmail.com>
+
+ xtensa unnecessary free
+ No path to "cleanup" label has internal_relocs malloc'd.
+
+ * emultempl/xtensaelf.em (replace_insn_sec_with_prop_sec): Don't
+ free internal_relocs in cleanup.
+
+2025-01-17 Nelson Chu <nelson@rivosinc.com>
+
+ RISC-V: Added lost zcmt in gas imply testcase.
+
+ gas/NEWS: Updated risc-v assembler support in 2.44.
+
+2025-01-17 Kito Cheng <kito.cheng@sifive.com>
+
+ RISC-V: Use t2 for tail if Zicfilp enabled
+ This change is to make tail conform with software guarded jump of Zicfilp. The
+ reason to not choose t1 as the label register is that t1 is also as .got.plt
+ offset of _dl_runtime_resolve in PLT.
+
+ See more: https://github.com/riscv-non-isa/riscv-asm-manual/pull/93
+
+2025-01-17 Monk Chiang <monk.chiang@sifive.com>
+
+ RISC-V: Support CFI Zicfiss and Zicfilp instructions and CSR.
+ https://github.com/riscv/riscv-cfi/releases/tag/v1.0
+
+ This patch only support the CFI instructions and CSR in assembler.
+
+2025-01-17 Nelson Chu <nelson@rivosinc.com>
+
+ RISC-V: Support ssctr/smctr extensions with version 1.0.
+ https://github.com/riscv/riscv-control-transfer-records/releases/tag/v1.0
+
+ The privileged spec v1.10 already removed the sfence.vm instruction, and the
+ encoding of sfence.vm instruction is overlapped with the sctrclr instruction
+ of ssctr/smctr. But since the privileged spec v1.10 already removed the
+ sfence.vm, and we no longer support the privileged spec v1.9.1 for now, we
+ had to remove the sfence.vm.
+
+ bfd/
+ * elfxx-riscv.c (riscv_implicit_subsets): Imply zicsr for ssctr/smctr.
+ (riscv_supported_std_s_ext): Added ssctr/smctr with version 1.0.
+ (riscv_multi_subset_supports): Handle INSN_CLASS for ssctr/smctr.
+ (riscv_multi_subset_supports_ext): Likewise.
+ gas/
+ * config/tc-riscv.c (enum riscv_csr_class, riscv_csr_address):
+ Added and handle CSR_CLASS_SSCTR and CSR_CLASS_SMCTR.
+ (riscv_is_priv_insn): Removed SFENCE_VM check.
+ * testsuite/gas/riscv/attribute-14e.d: Removed since sfence.vm is no
+ longer supported since privileged spec v1.10.
+ * testsuite/gas/riscv/attribute-14.s: Likewise.
+ * testsuite/gas/riscv/csr-version-1p10.d: Updated for ssctr/smctr CSRs.
+ * testsuite/gas/riscv/csr-version-1p10.l: Likewise.
+ * testsuite/gas/riscv/csr-version-1p11.d: Likewise.
+ * testsuite/gas/riscv/csr-version-1p11.l: Likewise.
+ * testsuite/gas/riscv/csr-version-1p12.d: Likewise.
+ * testsuite/gas/riscv/csr-version-1p12.l: Likewise.
+ * testsuite/gas/riscv/csr.s: Likewise.
+ * testsuite/gas/riscv/csr-dw-regnums.d: Likewise.
+ * testsuite/gas/riscv/csr-dw-regnums.s: Likewise.
+ * testsuite/gas/riscv/march-help.l: Updated for ssctr/smctr.
+ * testsuite/gas/riscv/smctr-ssctr.d: New testcase for sctr instruction.
+ * testsuite/gas/riscv/smctr-ssctr.s: Likewise.
+ include/
+ * opcode/riscv-opc.h: Added encoding macro for sctrclr, but removed
+ encoding macro for sfence.vm since encoding conflict. Added CSR
+ numbers for ssctr/smctr CSRs.
+ * opcode/riscv.h (enum riscv_insn_class): Added
+ INSN_CLASS_SMCTR_OR_SSCTR for sctrclr.
+ opcodes/
+ * riscv-opc.c (riscv_opcodes): Added sctrclr, but removed sfence.vm
+ since encoding conflict.
+
+2025-01-17 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+
+ gprofng: don't check Elf when file is in archive
+ map.xml contains a checksum for all Elf files.
+ gprofng-archive archives a file only with the same checksum.
+ In gprofng-display-text no additional check is required.
+
+ gprofng/ChangeLog
+ 2025-01-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+
+ * src/parse.cc: Don't check Elf when file is in archive.
+
+2025-01-17 Alan Modra <amodra@gmail.com>
+
+ Re: ld parser buffer leak
+ Apparently reflex doesn't have yyalloc.
+
+ * ldlex.l (yy_create_string_buffer): Revert last change.
+
+2025-01-17 Haochen Jiang <haochen.jiang@intel.com>
+
+ x86: Ignore rounding for vcvt[,u]si2sd under r32 and vcvt[,u]dq2pd instead of reporting bad for disassembler
+ According to SDM, vcvt[,u]si2sd under r32 and vcvt[,u]dq2pd treat
+ Rounding as Ignored when trying to using them. Thus, disassembler
+ should accept bytecode with rounding instead of reporting bad.
+
+ For assembler, it needs some more time to decide how to deal
+ with that.
+
+ gas/ChangeLog:
+
+ * testsuite/gas/i386/evex.d: Add new testcase for vcvt[,u]dq2pd.
+ Change the output for vcvt[,u]si2sd.
+ * testsuite/gas/i386/evex.s: Ditto.
+ * testsuite/gas/i386/x86-64-evex.d: Ditto.
+
+ opcodes/ChangeLog:
+
+ * i386-dis-evex-w.h: Add EXxEVexR64 for vcvt[,u]dq2pd.
+ * i386-dis.c (OP_Rounding): Mark EVEX_b as used to change the handle
+ for ignored rounding.
+
+2025-01-17 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2025-01-16 Alan Modra <amodra@gmail.com>
+
+ plugin_get_ir_dummy_bfd leak
+ * plugin.c (plugin_get_ir_dummy_bfd): Free bfd filename.
+
+ ld parser buffer leak
+ * ldlex.l (<<EOF>>): yy_delete_buffer current.
+ (yy_create_string_buffer): Use yyalloc.
+
+2025-01-16 Alan Modra <amodra@gmail.com>
+
+ write_build_id and write_package_metadata leaks
+ There isn't much sense in stashing contents in sec->contents
+ after those contents have been written.
+
+ * ldelf.c (write_build_id): Don't assign sec->contents.
+ Free contents if malloc'd here.
+ (write_package_metadata): Likewise.
+
+2025-01-16 Alan Modra <amodra@gmail.com>
+
+ ldelf_search_needed leak
+ * ldelf.c (ldelf_search_needed): Free filename before returning.
+
+ free ldfile search paths
+ * ldfile.c (ldfile_remap_input_free): Make static, call from..
+ (ldfile_free): ..here. New function.
+ (ldfile_library_path_free, ldfile_script_free),
+ ( ldfile_arch_free): New functions.
+ (ldfile_find_command_file): Free script_dir. Move
+ script_search to file scope.
+ (ldfile_open_command_file_1): Delete FIXME comment.
+ * ldfile.h (ldfile_remap_input_free): Delete.
+ (ldfile_free): Declare.
+ * ldlang.c (lang_finish): Update.
+
+2025-01-16 Alan Modra <amodra@gmail.com>
+
+ output_section_statement leak
+ This frees output_section_statement data, which is currently only used
+ by elf targets but doing so for all targets is simpler and more
+ future proof than adding ths to ldelf_finish. (Doing it there
+ requires moving the function to ldelfgen.c.)
+
+ * ldemul.c (finish_default): Free os->data.
+
+2025-01-16 H.J. Lu <hjl.tools@gmail.com>
+
+ NEWS: Mention mixed LTO and non-LTO output support for ld -r
+
+2025-01-16 Nick Clifton <nickc@redhat.com>
+
+ Copy gcc commit e76df3586417d645dd84e8a1ab165605a8924796 to sourceware
+
+ Have readelf sanitize the program interpreter string before displaying it.
+
+2025-01-16 Tom de Vries <tdevries@suse.de>
+
+ [gdb/testsuite] Fix gdb.dwarf2/implptr.exp regression
+ When running test-case gdb.dwarf2/implptr.exp on target board unix/-m32, we
+ get:
+ ...
+ (gdb) PASS: gdb.dwarf2/implptr.exp: print ***l in implptr:bar
+ break implptr.c:34^M
+ No compiled code for line 34 in file "implptr.c".^M
+ Make breakpoint pending on future shared library load? (y or [n]) n^M
+ (gdb) FAIL: $exp: set baz breakpoint for implptr (got interactive prompt)
+ ...
+
+ This is a regression since commit dcaa85e58c4 ("gdb: reject inserting
+ breakpoints between functions").
+
+ The .debug_line info does not contain an entry with a line number lower than
+ 36, so gdb cannot map it to an address.
+
+ Fix this by setting a breakpoint at the function containing line 34 instead.
+
+ Tested on x86_64-linux.
+
+ PR testsuite/32477
+ Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32477
+
+2025-01-16 MayShao-oc <MayShao-oc@zhaoxin.com>
+
+ x86: Support x86 Zhaoxin PadLock PHE2 instructions
+ The CPUID EDX bit[26] indicates its enablement, and it includes REP
+ XSHA384 and REP XSHA512.
+
+ gas/ChangeLog:
+
+ * NEWS: Support Zhaoxin PadLock PHE2 instructions.
+ * config/tc-i386.c (add_branch_prefix_frag_p): Don't add prefix to
+ PadLockPHE2 instructions.
+ (output_insn): Handle PadLockPHE2 instructions.
+ * doc/c-i386.texi: Document PadLockPHE2.
+ * testsuite/gas/i386/i386.exp: Add PadLockPHE2 test.
+ * testsuite/gas/i386/padlock_phe2.d: Ditto.
+ * testsuite/gas/i386/padlock_phe2.s: Ditto.
+
+ opcodes/ChangeLog:
+
+ * i386-dis.c: Add PadLockPHE2.
+ * i386-gen.c: Ditto
+ * i386-opc.h (CpuPadLockPHE2): New.
+ * i386-opc.tbl: Add Zhaoxin PadLock PHE2 instructions.
+ * i386-tbl.h: Regenerated.
+ * i386-mnem.h: Ditto.
+ * i386-init.h: Ditto.
+
+2025-01-16 Alan Modra <amodra@gmail.com>
+
+ disassemble_free_powerpc
+ This fixes leaks in a ppc disassembler buffer. I'm not sure now why I
+ used a private buffer for section contents, but I'm not going to
+ change that just now.
+
+ * disassemble.h (disassemble_free_powerpc): Declare.
+ * disassemble.c (disassemble_free_target): Call it.
+ * ppc-dis.c (disassemble_free_powerpc): New function.
+
+2025-01-16 Alan Modra <amodra@gmail.com>
+
+ ppc plt sym memory leak
+ * elf32-ppc.c (add_stub_sym): Alloc the sym name.
+
+ gas ppc .machine leak
+ * config/tc-ppc.c (ppc_machine): Free cpu_string.
+
+2025-01-16 Alan Modra <amodra@gmail.com>
+
+ elf64-ppc.c memory leaks
+ I've freed htab->relr in two places, first when we're done with it
+ in ppc64_elf_build_stubs, and also when freeing the hasn table to
+ catch cases where the linker exits early due to errors.
+
+ * elf64-ppc.c (ppc64_elf_link_hash_table_free): Free htab->relr.
+ (ppc64_elf_build_stubs): Also free it here.
+ (ppc_add_stub): Copy stub_name when creating..
+ (ppc64_elf_size_stubs): ..and always free stub_name.
+ (opd_entry_value): Free sym.
+ (ppc_build_one_stub): bfd_alloc stub sym name.
+ (build_global_entry_stubs_and_plt): Likewise.
+ (ppc64_elf_setup_section_lists): bfd_zalloc htab->sec_info.
+
+2025-01-16 Alan Modra <amodra@gmail.com>
+
+ gas HANDLE_ALIGN and frag_alloc
+ This adds the section to HANDLE_ALIGN args, so that the frag created
+ by the ppc backend can be properly allocated on the frag obstack.
+ I've added an extra param to frag_alloc too, for cases where we know
+ the frag requires at least some bytes in fr_literal. This simplifies
+ some existing code, for example in compress_debug and relax_segment.
+ In the case of the relax_segment code, I think we may have had a bug
+ there in using obstack_blank_fast, which doesn't check that the frag
+ has room.
+
+ * config/tc-ppc.c (ppc_handle_align): Add section param,
+ use frag obstack to allocate frag.
+ * config/tc-ppc.h (HANDLE_ALIGN, ppc_handle_align): Add extra
+ param.
+ * config/tc-aarch64.h (HANDLE_ALIGN): Add extra param.
+ * config/tc-alpha.h: Likewise.
+ * config/tc-arc.h: Likewise.
+ * config/tc-arm.h: Likewise.
+ * config/tc-avr.h: Likewise.
+ * config/tc-epiphany.h: Likewise.
+ * config/tc-frv.h: Likewise.
+ * config/tc-i386.h: Likewise.
+ * config/tc-ia64.h: Likewise.
+ * config/tc-kvx.h: Likewise.
+ * config/tc-loongarch.h: Likewise.
+ * config/tc-m32c.h: Likewise.
+ * config/tc-m32r.h: Likewise.
+ * config/tc-metag.h: Likewise.
+ * config/tc-mips.h: Likewise.
+ * config/tc-mn10300.h: Likewise.
+ * config/tc-nds32.h: Likewise.
+ * config/tc-riscv.h: Likewise.
+ * config/tc-rl78.h: Likewise.
+ * config/tc-rx.h: Likewise.
+ * config/tc-sh.h: Likewise.
+ * config/tc-sparc.h: Likewise.
+ * config/tc-spu.h: Likewise.
+ * config/tc-tilegx.h: Likewise.
+ * config/tc-tilepro.h: Likewise.
+ * config/tc-v850.h: Likewise.
+ * config/tc-visium.h: Likewise.
+ * config/tc-wasm32.h: Likewise.
+ * config/tc-xtensa.h: Likewise.
+ * frags.h (frag_alloc): Update prototype.
+ * frags.c (frag_alloc): Add extra size param, allocate extra.
+ (frag_new): Update.
+ * subsegs.c (subseg_set_rest): Update frag_alloc call.
+ * write.c: Formatting.
+ (cvt_frag_to_fill): Pass sec to HANDLE_ALIGN.
+ (compress_frag): Update frag_alloc call.
+ (compress_debug): Use new frag_alloc to simplify frag sizing.
+ (relax_segment): Likewise.
+
+2025-01-16 Alan Modra <amodra@gmail.com>
+
+ binary outsymbols
+ This fixes leaks of outsymbols for various targets that use the
+ generic linker. The key fix here is to not generate output symbols
+ for targets that won't ever write symbols, and of course to free
+ outsymbols after they've been written in targets that do. Target
+ vector object_flags and section_flags are updated to better reflect
+ target capabilities, in particular not setting HAS_SYMS or SEC_RELOC
+ when the target does not support symbols or relocs.
+
+ * binary.c (binary_vec): Update section_flags.
+ * linker.c (generic_add_output_symbol): Don't add to
+ outsymbols if !HAS_SYMS.
+ * srec.c (srec_write_symbols): Free outsymbols on return.
+ (srec_vec): Update object_flags and section_flags.
+ (symbolsrec_vec): Likewise.
+ * tekhex.c (tekhex_write_object_contents): Free outsymbols on
+ return.
+ (tekhex_vec): Update object_flags and section_flags.
+ * verilog.c (verilog_vec): Likewise.
+
+2025-01-16 Alan Modra <amodra@gmail.com>
+
+ tidy binary, ihex and verilog
+ * binary.c (binary_sizeof_headers): Delete function. Define
+ instead.
+ * ihex.c (ihex_sizeof_headers): Likewise.
+ (ihex_vec): Use _bfd_nosymbols for BFD_JUMP_TABLE_SYMBOLS. Delete
+ now unused defines.
+ * verilog.c: Delete unused defines.
+
+2025-01-16 Alan Modra <amodra@gmail.com>
+
+ genlink tidy
+ Some of the declarations in genlink.h are not used in current sources
+ apart from needing them in linker.c, so delete and/or move them there.
+ The patch also fixes a FIXME. It's actually quite easy to return
+ a failure from a hash traversal function.
+
+ * genlink.h (_bfd_generic_link_hash_newfunc): Delete.
+ (_bfd_generic_link_output_symbols),
+ (generic_write_global_symbol_info),
+ (_bfd_generic_link_write_global_symbol): Move to..
+ * linker.c: ..here, making functions static.
+ (generic_write_global_symbol_info): Add "failed".
+ (_bfd_generic_final_link): Handle wginfo.failed.
+ (_bfd_generic_link_write_global_symbol): Set wginfo->failed
+ on memory failures and return false rather than aborting.
+
+2025-01-16 Tom de Vries <tdevries@suse.de>
+
+ [gdb/testsuite] Fix timeouts in gdb.threads/step-over-thread-exit.exp
+ Once in a while, I run into a timeout in test-case
+ gdb.threads/step-over-thread-exit.exp:
+ ...
+ (gdb) continue^M
+ Continuing.^M
+ [New Thread 0xfffff7cff1a0 (LWP 2874854)]^M
+ ^M
+ Thread 97 "step-over-threa" hit Breakpoint 2, 0x0000000000410314 in \
+ my_exit_syscall () at gdb/testsuite/lib/my-syscalls.S:74^M
+ 74 SYSCALL (my_exit, __NR_exit)^M
+ (gdb) [Thread 0xfffff7cff1a0 (LWP 2874853) exited]^M
+ FAIL: $exp: step_over_mode=displaced: non-stop=on: target-non-stop=on: \
+ schedlock=off: cmd=continue: ns_stop_all=0: iter 95: continue (timeout)
+ ...
+
+ I can reproduce it more frequently by running with taskset -c <slow core id>.
+
+ Fix this by using -no-prompt-anchor.
+
+ This requires us to add -no-prompt-anchor to proc gdb_test_multiple.
+
+ Tested on aarch64-linux.
+
+ PR testsuite/32489
+ Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32489
+
+2025-01-16 Tom de Vries <tdevries@suse.de>
+
+ [gdb/python] Run black on gdb/gdbarch_components.py
+ The sourceware buildbot reported "python black formatter ( failure )" at
+ commit b034bb38772 ("[gdb] Add gdbarch_dwarf2_reg_piece_offset hook").
+
+ Fix this by running the precommit hooks in a container with Python 3.11 using:
+ ...
+ $ pre-commit run --files gdb*/*
+ ...
+
+2025-01-16 Sergio Durigan Junior <sergiodj@sergiodj.net>
+
+ gdbserver: Fix build on MIPS
+ Commit 3470a0e144df6c01f8479fa649f43aa907936e7e inadvertently broke
+ the build on MIPS because it's passing a non-existent "pid" argument
+ to "proc->for_each_thread". This commit fixes the problem by removing
+ the argument from the call.
+
+2025-01-16 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2025-01-15 Alan Modra <amodra@gmail.com>
+
+ x86 relr memory leaks
+ This fixes some x86 memory leaks. I think it would be possible to
+ free the relr data in _bfd_elf_x86_finish_relative_relocs if we
+ wanted to reclaim some memory earlier, but for tidying after errors we
+ likely would need to free in the hash_table_free function anyway.
+
+ _bfd_x86_elf_link_relax_section is called via bfd_relax_section,
+ ie. whenever relaxation is enabled. This is a waste of time if
+ dt_relr relocs are not enabled since the function is there only to
+ handle relr.
+
+ * elfxx-x86.c (elf_x86_link_hash_table_free): Free relr data.
+ (_bfd_x86_elf_link_relax_section): Return early
+ if !info->enable_dt_relr. Do set "again" false before early
+ returns.
+
+2025-01-15 Alan Modra <amodra@gmail.com>
+
+ Tidy elf_mmap_section_contents
+ It is simpler to clear the buffer pointer in the caller than pass
+ a param that controls clearing.
+
+ * elf.c (elf_mmap_section_contents): Remove final_link param.
+ (_bfd_elf_mmap_section_contents): Instead set *buf to NULL here.
+ (_bfd_elf_link_mmap_section_contents): Adjust.
+
+2025-01-15 Alan Modra <amodra@gmail.com>
+
+ elf_x86_64_scan_relocs error paths
+ Fix some memory leaks.
+
+ * elf64-x86-64.c (elf_x86_64_scan_relocs): Ensure error return
+ paths that should free relocs go via error_return.
+
+2025-01-15 Martin Storsjö <martin@martin.st>
+
+ Add support for IMPORT_CONST in ILF (MSVC style) import libraries
+ This is a very strange and obsolete kind of import type; it is
+ used for imported data just like IMPORT_DATA - but with an extra
+ odd caveat.
+
+ The behaviour is explained at [1]; generating such import libraries
+ with current MSVC tools produces "warning LNK4087: CONSTANT keyword is
+ obsolete; use DATA".
+
+ While obsolete, some import libraries within the Microsoft WDK (Windows
+ Driver Kit) do contain such symbols, which currently are ignored by
+ binutils and produce warnings about "file format not recognized".
+
+ For IMPORT_CONST for a DLL exported symbol "foo", we should provide
+ the import library symbols "__imp_foo" and "foo". For IMPORT_DATA, we
+ only provide "__imp_foo", and for IMPORT_CODE, "foo" points at a thunk.
+ The odd/surprising thing for IMPORT_CONST is that the "foo" symbol also
+ points at the same thing as "__imp_foo", i.e. directly at the IAT
+ entry.
+
+ [1] https://learn.microsoft.com/en-us/cpp/build/importing-using-def-files
+
+2025-01-15 Matthieu Longo <matthieu.longo@arm.com>
+
+ aarch64: GCS tests for linking issues with dynamic objects
+
+2025-01-15 Matthieu Longo <matthieu.longo@arm.com>
+
+ aarch64: check GCS feature in GNU properties of input dynamic objects
+ The Guarded Control Stack (GCS) feature requires that two things:
+ - at static link time, all the input objects of a link unit have to
+ be compatible with GCS.
+ - at runtime, the executable and the shared libraries which it
+ depends on have to be compatible with GCS.
+ Both of those criteria are checked with the GCS feature stored in
+ the GNU property note.
+
+ The previous patch, adding support for the GCS feature check in GNU
+ note properties for input objects, ignored the input dynamic objects.
+ Although this support was better than no check, it was still
+ delaying the detection of compatibility issues up to the runtime
+ linker.
+
+ In order to help the developer in detecting such an incompatibility
+ issue as early as possible, this patch adds a check for input dynamic
+ objects lacking the GCS marking. This check can be controlled via the
+ linker option '-z gcs-report-dynamic[=none|warning|error]'. By default,
+ if the option is omitted, it inherits the value from '-z gcs-report'.
+ However, the inherited value is capped to 'warning' as a user might
+ want to only report errors in the currently built module, and not the
+ shared dependencies. If a user also wants to error on GCS issues in
+ the shared libraries, '-z gcs-report-dynamic=error' will have to be
+ specified explicitly.
+
+2025-01-15 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
+
+ gdb: boolify the 'in_g_packet' field of remote's 'packet_reg'
+ Boolify the 'in_g_packet' of the 'packet_reg' struct that is used in
+ remote.c.
+
+2025-01-15 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
+
+ gdbserver: remove an obsolete comment in tracepoint.cc
+ The comment
+
+ /* Functions local to this file. */
+
+ has somehow been positioned above struct definitions, not functions.
+ Some static function declarations are given after the structs, to
+ where the comment could be moved, but the comment is not really
+ helpful. Therefore remove it.
+
+2025-01-15 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
+
+ gdbserver: remove forward declaration of struct tracepoint_hit_ctx
+ Remove the unnecessary forward declaration for `struct tracepoint_hit_ctx`.
+
+2025-01-15 Tom de Vries <tdevries@suse.de>
+
+ [gdb/tdep] Fix gdb.base/store.exp on s390x
+ On s390x-linux, I get:
+ ...
+ (gdb) print l^M
+ $29 = 0^M
+ (gdb) FAIL: gdb.base/store.exp: var doublest l; print old l, expecting -1
+ ...
+
+ So, we're in wack_doublest trying to print l, which is a copy of parameter u:
+ ...
+ register doublest l = u, r = v;
+ ...
+ which does have the expected value:
+ ...
+ (gdb) p u
+ $1 = -1
+ ...
+ which is a long double, 16 bytes and looks like this:
+ ...
+ (gdb) p /x u
+ $3 = 0xbfff0000000000000000000000000000
+ ...
+
+ Parameter u is passed in two registers:
+ ...
+ <2><6a5>: Abbrev Number: 15 (DW_TAG_formal_parameter)
+ <6a6> DW_AT_name : v
+ <69e> DW_AT_location : 6 byte block: 50 93 8 51 93 8 \
+ (DW_OP_reg0 (r0); DW_OP_piece: 8; DW_OP_reg1 (r1); DW_OP_piece: 8)
+ ...
+ and indeed we find the msw in r0 and the lsw in r1:
+ ...
+ (gdb) p /x $r0
+ $4 = 0xbfff000000000000
+ (gdb) p /x $r1
+ $5 = 0x0
+ (gdb)
+ ...
+
+ Likewise, variable l consists of two registers:
+ ...
+ <2><6b5>: Abbrev Number: 13 (DW_TAG_variable)
+ <6b6> DW_AT_name : l
+ <6be> DW_AT_location : 6 byte block: 68 93 8 69 93 8 \
+ (DW_OP_reg24 (f8); DW_OP_piece: 8; DW_OP_reg25 (f10); DW_OP_piece: 8)
+ ...
+ and we find the same values there:
+ ...
+ (gdb) p /x $f8
+ $6 = 0xbfff000000000000
+ (gdb) p /x $f10
+ $7 = 0x0
+ ...
+
+ So, we get the expected results when fetching the value from two gprs, but not
+ when fetching the value from two fprs.
+
+ When fetching the values from the two fprs, we stumble upon a particularity of
+ the DWARF register numbers as defined by the s390x ABI [1]: dwarf register 24
+ maps to both floating-point register f8 (8 bytes), and vector register v8
+ (16 bytes).
+
+ In s390_dwarf_reg_to_regnum, it's determined which of the two is chosen, and
+ if available vector registers are preferred over floating-point registers, so
+ v8 is chosen, and used to fetch the value.
+
+ Since the size of the DW_OP_piece is 8 bytes, and the register size is 16
+ bytes, this bit in rw_pieced_value is activated:
+ ...
+ /* If the piece is located in a register, but does not
+ occupy the entire register, the placement of the piece
+ within that register is defined by the ABI. */
+ bits_to_skip
+ += 8 * gdbarch_dwarf2_reg_piece_offset (arch, gdb_regnum,
+ p->size / 8);
+ ...
+ but since the default implemention default_dwarf2_reg_piece_offset does not
+ match the s390x ABI, we get the wrong answer.
+
+ This is a known problem, see FOSDEM 2018 presentation "DWARF Pieces And Other
+ DWARF Location Woes" [2].
+
+ Fix this by adding s390_dwarf2_reg_piece_offset, roughly implementing the same
+ logic as in s390_value_from_register.
+
+ Tested on s390x-linux.
+
+ Approved-By: Tom Tromey <tom@tromey.com>
+
+ [1] https://github.com/IBM/s390x-abi
+ [2] https://archive.fosdem.org/2018/schedule/event/dwarfpieces
+
+2025-01-15 Tom de Vries <tdevries@suse.de>
+
+ [gdb] Add gdbarch_dwarf2_reg_piece_offset hook
+ In rw_pieced_value, when reading/writing part of a register, DW_OP_piece and
+ DW_OP_bit_piece are handled the same, but the standard tells us:
+ - DW_OP_piece: if the piece is located in a register, but does not occupy the
+ entire register, the placement of the piece within that register is defined
+ by the ABI.
+ - DW_OP_bit_piece: if the location is a register, the offset is from the least
+ significant bit end of the register.
+
+ Add a new hook gdbarch_dwarf2_reg_piece_offset that allows us to define the
+ ABI-specific behaviour for DW_OP_piece.
+
+ The default implementation of the hook is the behaviour of DW_OP_bit_piece, so
+ there should not be any functional changes.
+
+ Tested on s390x-linux.
+
+ Approved-By: Tom Tromey <tom@tromey.com>
+
+2025-01-15 Tom de Vries <tdevries@suse.de>
+
+ [gdb/symtab] Add dwarf_expr_piece.op
+ Add a new field "dwarf_location_atom op" to dwarf_expr_piece to keep track of
+ which dwarf_location_atom caused a dwarf_expr_piece to be added.
+
+ This is used in the following patch.
+
+ Tested on s390x-linux.
+
+ Approved-By: Tom Tromey <tom@tromey.com>
+
+2025-01-15 Tom Tromey <tromey@adacore.com>
+
+ Fix help formatting for string and filename options
+ I happened to notice that "help add-inferior" said:
+
+ -execFILENAME
+ FILENAME is the file name of the executable to use as the
+ main program.
+
+ This is missing a space after "-exec". This patch fixes the bug.
+
+ If ok'd on time I plan to check this in to the gdb-16 branch as well.
+
+ Approved-by: Kevin Buettner <kevinb@redhat.com>
+
+2025-01-15 Hui Li <lihui@loongson.cn>
+
+ gdbserver: LoongArch: Add hardware watchpoint/breakpoint support
+ LoongArch defines hardware watchpoint functions for fetch and load/store
+ operations, the related support for gdb was added in the following two
+
+ commit c1cdee0e2c17 ("gdb: LoongArch: Add support for hardware watchpoint")
+ commit 6ced1278fc00 ("gdb: LoongArch: Add support for hardware breakpoint")
+
+ Now, add hardware watchpoint and breakpoint support for gdbserver on
+ LoongArch.
+
+ Here is a simple example
+
+ $ cat test.c
+ #include <stdio.h>
+ int a = 0;
+ int b = 0;
+ int main()
+ {
+ printf("start test\n");
+ a = 1;
+ printf("a = %d\n", a);
+ a = 2;
+ printf("a = %d\n", a);
+ b = 2;
+ printf("b = %d\n", b);
+ return 0;
+ }
+ $ gcc -g test.c -o test
+
+ Execute on the target machine:
+
+ $ gdbserver 192.168.1.100:1234 ./test
+
+ Execute on the host machine:
+
+ $ gdb ./test
+ ...
+ (gdb) target remote 192.168.1.100:1234
+ ...
+ (gdb) b main
+ Breakpoint 1 at 0x1200006b8: file test.c, line 6.
+ (gdb) c
+ Continuing.
+ ...
+ Breakpoint 1, main () at test.c:6
+ 6 printf("start test\n");
+ (gdb) watch a
+ Hardware watchpoint 2: a
+ (gdb) hbreak 11
+ Hardware assisted breakpoint 3 at 0x120000700: file test.c, line 11.
+ (gdb) c
+ Continuing.
+
+ Hardware watchpoint 2: a
+
+ Old value = 0
+ New value = 1
+ main () at test.c:8
+ 8 printf("a = %d\n", a);
+ (gdb) c
+ Continuing.
+
+ Hardware watchpoint 2: a
+
+ Old value = 1
+ New value = 2
+ main () at test.c:10
+ 10 printf("a = %d\n", a);
+ (gdb) c
+ Continuing.
+
+ Breakpoint 3, main () at test.c:11
+ 11 b = 2;
+ (gdb) c
+ Continuing.
+ [Inferior 1 (process 696656) exited normally]
+
+ Output on the target machine:
+
+ Process ./test created; pid = 696708
+ Listening on port 1234
+ Remote debugging from host 192.168.1.200, port 60742
+ start test
+ a = 1
+ a = 2
+ b = 2
+
+ Child exited with status 0
+
+2025-01-15 Hui Li <lihui@loongson.cn>
+
+ gdb: LoongArch: Adjust loongarch_stopped_data_address()
+ loongarch_stopped_data_address() is a common function and will be used by
+ gdb and gdbserver, so move its definition from gdb/loongarch-linux-nat.c
+ to gdb/nat/loongarch-hw-point.c. This is preparation for later gdbserver
+ patch on LoongArch and is no effect for the current code.
+
+ gdb: LoongArch: Adjust loongarch_{get,remove}_debug_reg_state()
+ loongarch_{get,remove}_debug_reg_state() are used as helper functions
+ by loongarch_linux_nat_target. We should move their definitions from
+ gdb/nat/loongarch-linux-hw-point.c to gdb/loongarch-linux-nat.c.
+
+ gdb: LoongArch: Remove loongarch_lookup_debug_reg_state()
+ loongarch_lookup_debug_reg_state() is a unused function, so we
+ can remove it.
+
+2025-01-15 H.J. Lu <hjl.tools@gmail.com>
+
+ ld: Update gld${EMULATION_NAME}_place_orphan for PE/PEP
+ Similar to ldelf_place_orphan, initialize hold from orig_hold at run-time
+ in PE and PEP gld${EMULATION_NAME}_place_orphan.
+
+ * emultempl/pe.em (orphan_init_done): Make it file scope.
+ (gld${EMULATION_NAME}_finish): Set orphan_init_done to false for
+ the object-only output.
+ (gld${EMULATION_NAME}_place_orphan): Rename hold to orig_hold.
+ Initialize hold from orig_hold at run-time.
+ * emultempl/pep.em (orphan_init_done): Make it file scope.
+ (gld${EMULATION_NAME}_finish): Set orphan_init_done to false for
+ the object-only output.
+ (gld${EMULATION_NAME}_place_orphan): Rename hold to orig_hold.
+ Initialize hold from orig_hold at run-time.
+
+2025-01-15 H.J. Lu <hjl.tools@gmail.com>
+
+ ld: Correct ldelf_place_orphan
+ Remove the extra for loop and if statement in ldelf_place_orphan.
+
+ * ldelf.c (ldelf_place_orphan): Remove the extra for loop and if
+ statement.
+
+2025-01-15 Jan Vrany <jan.vrany@labware.com>
+
+ gdb/testsuite: make gdb.reverse/i386-avx-reverse.exp require also avx2
+ The test gdb.reverse/i386-avx-reverse.exp requires CPU to have AVX
+ instructions but it actually also uses AVX2 instructions (like
+ vpcmpeqd). This caused the test to fail on CPUs that have AVX but not
+ AVX2.
+
+ This commit adds check for AVX2.
+
+ Tested on Intel Xeon CPU E3-1265L (no AVX2) and Intel Core i7-1355U
+ (has AVX2).
+
+2025-01-15 Alan Modra <amodra@gmail.com>
+
+ bfd_get_unique_section_name leak
+ The name returned by this function is used in asection->name, so
+ needs to persist until a bfd is closed.
+
+ * section.c (bfd_get_unique_section_name): Return an alloc'd
+ string.
+
+2025-01-15 Alan Modra <amodra@gmail.com>
+
+ Free symtab_hdr.contents and a cache_size correction
+ symtab_hdr.contents looks to be malloc'd memory, except in one case.
+ Change that one case to also be malloc'd and free when we are done.
+
+ * elf.c (swap_out_syms): bfd_malloc outbound_syms.
+ (_bfd_elf_free_cached_info): Free symtab_hdr.contents.
+ * elflink.c (init_reloc_cookie): Correct cache_size. locsyms
+ is an array of Elf_Internal_Sym.
+
+2025-01-15 Alan Modra <amodra@gmail.com>
+
+ elflink.c memory leaks
+ Many targets leaked parts of the elf_link_hash_table. Fix that by
+ making _bfd_elf_link_hash_table_init set up hash_table_free correctly,
+ so that targets that extend elf_link_hash_table without adding
+ anything that needs freeing, will use _bfd_elf_link_hash_table_free.
+
+ * elflink.c (elf_link_add_object_symbols): Always free
+ nondeflt_vers. Don't return false without freeing.
+ (_bfd_elf_link_hash_table_init): Set hash_table_free here..
+ (_bfd_elf_link_hash_table_create): ..rather than here.
+ (elf_link_swap_symbols_out): Don't free strtab here..
+ (elf_link_add_object_symbols): ..do so here instead. Don't
+ omit freeing on some error return paths.
+
+2025-01-15 Alan Modra <amodra@gmail.com>
+
+ sframe memory leak
+ This is another case where an array isn't freed anywhere and needs to
+ persist a while, so allocate it with bfd_alloc.
+
+ * elf-sframe.c (sframe_decoder_init_func_bfdinfo): Add abfd
+ param. bfd_zalloc std_func_bfdinfo.
+ (_bfd_elf_parse_sframe): Adjust to suit.
+
+2025-01-15 Alan Modra <amodra@gmail.com>
+
+ eh-frame memory leaks
+ The set_loc array attached to eh-frame sec_info isn't freed, and is
+ used in _bfd_elf_eh_frame_section_offset. Rather than finding a
+ suitable late stage of linking past any b_e_e_f_s_o use, I decided
+ this might as well persist until the bfd is closed.
+ Some memory is freed in _bfd_elf_discard_section_eh_frame_hdr, but
+ the function isn't always called, so fix that too.
+
+ * elf-eh-frame.c (_bfd_elf_parse_eh_frame): bfd_alloc the
+ set_loc array.
+ (find_merged_cie): Use bfd_malloc rather than malloc.
+ (_bfd_elf_discard_section_eh_frame_hdr): Move condition under
+ which this function does anything except free memory from..
+ * elflink.c (bfd_elf_discard_info): ..here.
+
+2025-01-15 Alan Modra <amodra@gmail.com>
+
+ Fix known minor objdump leak
+ * objdump.c (main): Free disassembler_options.
+
+2025-01-15 Andrew Burgess <aburgess@redhat.com>
+
+ gdbserver: convert program_args to a single string
+ This commit changes how gdbserver stores the inferior arguments from
+ being a vector of separate arguments into a single string with all of
+ the arguments combined together.
+
+ Making this change might feel a little strange; intuitively it feels
+ like we would be better off storing the arguments as a vector, but
+ this change is part of a larger series of work that aims to improve
+ GDB's inferior argument handling. The full series was posted here:
+
+ https://inbox.sourceware.org/gdb-patches/cover.1730731085.git.aburgess@redhat.com
+
+ But asking people to review a 14 patch series in unreasonable, so I'm
+ instead posting the patches in smaller batches. This patch can stand
+ alone, and I do think this change makes sense on its own:
+
+ First, GDB already stores the inferior arguments as a single string,
+ so doing this moves gdbserver into line with GDB. The common code
+ into which gdbserver calls requires the arguments to be a single
+ string, so currently each target's create_inferior implementation
+ merged the arguments anyway, so all this commit really does is move
+ the merging up the call stack, and store the merged result rather than
+ storing the separate parts.
+
+ However, the biggest reason for why this commit is needed, is an issue
+ with passing arguments from GDB to gdbserver when starting a new
+ inferior.
+
+ Consider:
+
+ (gdb) set args $VAR
+ (gdb) run
+ ...
+
+ When using a native target the inferior will see the value of $VAR
+ expanded by the shell GDB uses to start the inferior. However, if
+ using an extended-remote target the inferior will see literally $VAR,
+ the unexpanded name of the variable, the reason for this is that,
+ although GDB sends '$VAR' to gdbserver, when gdbserver receives this,
+ it converts this to '\$VAR', which prevents the variable from being
+ expanded by the shell.
+
+ The reason for this is that construct_inferior_arguments escapes all
+ special shell characters within its arguments, and it is
+ construct_inferior_arguments that is used to combine the separate
+ arguments into a single string.
+
+ In the future I will change construct_inferior_arguments so that
+ it can apply different escaping strategies. When this happens we will
+ want to escape arguments coming from the gdbserver command line
+ differently than arguments coming from GDB (via a vRun packet), which
+ means we need to call construct_inferior_arguments earlier, at the
+ point where we know if the arguments came from the gdbserver command
+ line, or from the vRun packet.
+
+ This argument escaping issue is discussed in PR gdb/28392.
+
+ This commit doesn't fix any issues, nor does it change
+ construct_inferior_arguments to actually do different escaping, that
+ will all come later. This is purely a restructuring.
+
+ There should be no user visible changes after this commit.
+
+ Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28392
+
+ Tested-By: Guinevere Larsen <guinevere@redhat.com>
+ Approved-By: Simon Marchi <simon.marchi@efficios.com>
+
+2025-01-15 Alan Modra <amodra@gmail.com>
+
+ PR32560 stack-buffer-overflow at objdump disassemble_bytes
+ There's always someone pushing the boundaries.
+
+ PR 32560
+ * objdump.c (MAX_INSN_WIDTH): Define.
+ (insn_width): Make it an unsigned long.
+ (disassemble_bytes): Use MAX_INSN_WIDTH to size buffer.
+ (main <OPTION_INSN_WIDTH>): Restrict size of insn_width.
+
+2025-01-15 Tom de Vries <tdevries@suse.de>
+
+ [gdb/symtab] Require current language before symbol lookups
+ Test-case gdb.python/py-symbol.exp fails with various target boards, including
+ fission and gold-gdb-index.
+
+ The problem here is that, in this test, the current language is still
+ unset (i.e., lazy) when the symbol lookup is done. It is eventually
+ set deep in the lookup -- but this then requires a reentrant symbol
+ lookup, which fails. (DWARF symbol lookup is not reentrant.)
+
+ Fix this by:
+ - detecting symbol lookup reentrance using an assert, and
+ - requiring the current language to be set when entering symbol lookup.
+
+ Tested on x86_64-linux.
+
+ Co-Authored-By: Tom Tromey <tom@tromey.com>
+ Approved-By: Tom Tromey <tom@tromey.com>
+
+ PR symtab/32490
+ Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32490
+
+2025-01-15 Alan Modra <amodra@gmail.com>
+
+ Re: elf: Add GNU_PROPERTY_MEMORY_SEAL gnu property
+ Don't run tests on targets without required support. Supply an
+ explicit -z nomemory-seal rather then relying on the harness default,
+ to lessen confusion for people looking at the test. Don't use numeric
+ labels for the sake of hppa64*-hpux, and run the tests there. Remove
+ incorrect comment about source editing. Also, xfail rather than
+ notarget failing tests with a list of target triples so we check that
+ the list is correct.
+
+ Re: ld: Add --enable-memory-seal configure option
+ Commit 80dc29527ff9 accidentally removed an assignment to board_flags,
+ resulting in tcl errors 'can't read "board_flags": no such variable'
+ on sh4-linux-gnu. Fix that by calling [get_board_flags] in the
+ condition rather than reinstating the removed line since it seems most
+ configurations don't have a null STATIC_LDFLAGS. Do the same in
+ another similar test too.
+
+2025-01-15 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2025-01-14 Tom Tromey <tom@tromey.com>
+
+ Use bool in decode_line_2_item
+ This changes decode_line_2_item::selected to bool. There was no
+ benefit to keeping this as a bitfield, so I removed that. Note that
+ the constructor already uses bool here.
+
+ Approved-By: Simon Marchi <simon.marchi@efficios.com>
+
+2025-01-14 Tom Tromey <tom@tromey.com>
+
+ Use bool for parameter of add_sal_to_sals
+ This changes add_sal_to_sals to use 'bool' rather than 'int'.
+
+ Approved-By: Simon Marchi <simon.marchi@efficios.com>
+
+2025-01-14 Tom Tromey <tom@tromey.com>
+
+ Use filename style in "show" commands
+ I found a few filename-related "show" commands that do not use the
+ filename style when displaying the file. This patch fixes the
+ oversight.
+
+ Approved-By: Andrew Burgess <aburgess@redhat.com>
+
+2025-01-14 H.J. Lu <hjl.tools@gmail.com>
+
+ ld: Parse linker script only once
+ Parsing linker script twice caused
+
+ FAIL: ld-plugin/lto-3r
+ FAIL: ld-plugin/lto-5r
+ FAIL: PR ld/19317 (2)
+
+ for x86_64-w64-mingw32 with the linker error:
+
+ ./ld-new:built in linker script:27 assignment to location counter invalid outside of SECTIONS
+
+ ldscripts/i386pep.xr has
+
+ 24 .rdata :
+ 25 {
+ 26 *(.rdata)
+ 27 . = ALIGN(4);
+ 28 /* .ctors & .dtors */
+ 29 /* .CRT */
+ 30 /* ___crt_xl_end__ is defined in the TLS Directory support code */
+ 31 }
+
+ Remove ld_parse_linker_script to parse linker script only once.
+
+ * ldlang.c (cmdline_emit_object_only_section): Don't call
+ ld_parse_linker_script.
+ * ldmain.c (main): Fold ld_parse_linker_script.
+ (ld_parse_linker_script): Removed.
+
+2025-01-14 H.J. Lu <hjl.tools@gmail.com>
+
+ ld: Call cmdline_check_object_only_section only if plugin is enabled
+ * ldmain.c (add_archive_element): Call
+ cmdline_check_object_only_section only if BFD_SUPPORTS_PLUGINS
+ is defined.
+
+2025-01-14 Yang Liu <liuyang22@iscas.ac.cn>
+
+ gdb/jit: fix jit-reader linetable integrity
+ The custom linetable functionality in GDB's JIT Interface has been broken
+ since commit 1acc9dca423f78e44553928f0de839b618c13766.
+
+ In that commit, linetables were made independent from the objfile, which
+ requires objfile->section_offsets to be initialized. However, section_offsets
+ were never initialized in objfiles generated by GDB's JIT Interface
+ with custom jit-readers, leading to GDB crashes when stepping into JITed code
+ blocks with the following command already executed:
+
+ jit-reader-load libmygdbjitreader.so
+
+ This patch fixes the issue by initializing the minimum section_offsets required
+ for linetable parsing procedures.
+
+ A minimal test is included. The test sets up some very simple line
+ table information, which is enough to trigger the bug. However, the
+ line table information is crafted such that none of the line table
+ entries will end up being displayed in GDB's output when the test is
+ run, as such, none of the expected output actually changes.
+
+ It might be nice in the future to extend some of the jit tests to
+ actually test hitting line table entries added via the jit reader.
+
+ Approved-By: Tom Tromey <tom@tromey.com>
+
+2025-01-14 Guinevere Larsen <guinevere@redhat.com>
+
+ gdb/record: add support for AVX floating point arithmetic instructions
+ This commit adds support for the following types of instructions
+ relating to floating poitn values: add, mul, sub, min, div, max.
+ These are supported with packed or single values, and single or double
+ precision.
+
+ Some of the instructions had opcode clashes, however, considering the
+ mechanics of recording the registers is the same on both instructions,
+ this is just marked with a comment.
+
+ Approved-By: Guinevere Larsen <guinevere@redhat.com>
+
+2025-01-14 Guinevere Larsen <guinevere@redhat.com>
+
+ gdb/record: add support for floating point vunpck instructions
+ This commit adds support for the AVX instructions vunpck[l|h][ps|pd]
+ instructions, which was pretty straightforward.
+
+ This commit also fixes a mistake in the test, where "record stop" was
+ used after the recording was already stopped, if it failed during
+ vpunpck_test recording. It also improved the documentation at the start
+ of the relevant .c function.
+
+ Approved-By: Guinevere Larsen <guinevere@redhat.com>
+
+2025-01-14 Guinevere Larsen <guinevere@redhat.com>
+
+ gdb/record: add support for floating point vmov instructions
+ This commit updates GDB's record-full to be able to record vmov[ss|sd]
+ and vmov [u|a] [ps|pd] AVX instructions, and tests for them.
+
+ Unlike the vmovdq[u|a] instructions, the aligned and unalgined versions
+ of vmov?[ps|pd] have different opcodes. The mechanics of recording them
+ is the same, but the aligned version has opcodes 0x28 and 0x29, while
+ the unaligned has the same opcode as vmov[ss|sd] instruction, 0x10 and
+ 0x11.
+
+ Approved-By: Guinevere Larsen <guinevere@redhat.com>
+
+2025-01-14 Sam James <sam@gentoo.org>
+
+ ld: regenerate
+ 80dc29527ff9b5179741c360418e77e5064f2b69 contained some changes from
+ non-vanilla autoconf. Regenerate.
+
+ ChangeLog:
+
+ * config.in: Regenerate.
+ * configure: Regenerate.
+
+2025-01-14 Adhemerval Zanella <adhemerval.zanella@linaro.org>
+
+ ld: Add --enable-memory-seal configure option
+ Add --enable-memory-seal linker configure option to enable memory
+ sealing (GNU_PROPERTY_MEMORY_SEAL) by default.
+
+ Change-Id: I4ce4ff33657f0f09b1ceb06210b6fcaa501f1799
+
+2025-01-14 Adhemerval Zanella <adhemerval.zanella@linaro.org>
+
+ elf: Add GNU_PROPERTY_MEMORY_SEAL gnu property
+ The GNU_PROPERTY_MEMORY_SEAL gnu property is a way to mark binaries
+ to be memory sealed by the loader, to avoid further changes of
+ PT_LOAD segments (such as unmapping or change permission flags).
+ This is done along with Linux kernel (the mseal syscall [1]), and
+ C runtime supports to instruct the kernel on the correct time during
+ program startup (for instance, after RELRO handling). This support
+ is added along the glibc support to handle the new gnu property [2].
+
+ This is a opt-in security features, like other security hardening
+ ones like NX-stack or RELRO.
+
+ The new property is ignored if present on ET_REL objects, and only
+ added on ET_EXEC/ET_DYN if the linker option is used. A gnu property
+ is used instead of DT_FLAGS_1 flag to allow memory sealing to work
+ with ET_EXEC without PT_DYNAMIC support (at least on glibc some ports
+ still do no support static-pie).
+
+ [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8be7258aad44b5e25977a98db136f677fa6f4370
+ [2] https://sourceware.org/pipermail/libc-alpha/2024-September/160291.html
+
+ Change-Id: Id47fadabecd24be0e83cff45653f7ce9a900ecf4
+
+2025-01-14 Ella MA <xutong.ma@inria.fr>
+
+ Fix a syntax error in sim/common/cgen-mem.h
+
+2025-01-14 H.J. Lu <hjl.tools@gmail.com>
+
+ ld: Update mixed LTO and non-LTO relocatable output tests
+ Since mixed LTO and non-LTO relocatable output is only supported on ELF
+ platforms, limit these tests to ELF targets. Since powerpc64 elfv1
+ defines a function symbol on its procedure descriptor, which is in a
+ data section, rather than on the code for that function, allow both D
+ and T for nm test on mixed object.
+
+ * testsuite/ld-plugin/lto.exp: Limits mixed LTO and non-LTO
+ relocatable output tests to ELF targets. Allow both D and T for
+ nm test on mixed object.
+
+2025-01-14 Matthieu Longo <matthieu.longo@arm.com>
+
+ aarch64 SFrame: skip with warning new CFI directive used with pauth_lr
+ Today, SFrame v2 specification does not describe how to encode the
+ information corresponding to the PAuth_LR PAC signing method (it only
+ supports PAuth PAC signing method).
+ SFrame v3 specification should hopefully specify it.
+
+ In the meantime, if the GNU assembler finds .cfi_negate_ra_state_with_pc
+ and --gsframe is specified, it will output a warning to the user and
+ will fail to generate the FDE entry.
+
+ A new SFrame test for .cfi_negate_ra_state_with_pc is also added to
+ reflect this issue.
+
+ Approved-by: Indu Bhagat <indu.bhagat@oracle.com>
+
+2025-01-14 Matthieu Longo <matthieu.longo@arm.com>
+
+ aarch64 DWARF: add new CFI directive for PAuth_LR
+ This patch adds a new CFI directive (cfi_negate_ra_state_with_pc) which
+ set an additional bit in the RA state to inform that RA was signed with
+ SP but also PC as an additional diversifier.
+
+ RA state | Description
+ 0b00 | Return address not signed (default if no cfi_negate_ra_state*)
+ 0b01 | Return address signed with SP (cfi_negate_ra_state)
+ 0b10 | Invalid state
+ 0b11 | Return address signed with SP+PC (cfi_negate_ra_state_with_pc)
+
+ Approved-by: Indu Bhagat <indu.bhagat@oracle.com>
+ Approved-by: Jan Beulich <jbeulich@suse.com>
+
+2025-01-14 Matthieu Longo <matthieu.longo@arm.com>
+
+ aarch64 SFrame: use preferred CFI directive for AArch64 PAC
+ ARMv8.3 addded support for a new security feature named Pointer
+ Authentication. Support for this feature in SFrame already exists.
+
+ In GCC 14 and older, the Sparc DWARF extension .cfi_gnu_window_save
+ is emitted instead of .cfi_negate_ra_state.
+ GCC 15 fixed this issue, but this behavior is preserved for backward
+ compatibility.
+
+ The existing sframe test for AArch64 PAC was using .cfi_gnu_window_save.
+ This patch replaces this CFI in the existing test by the preferred one,
+ and adds a new test to check for backward compatibility when using
+ .cfi_gnu_window_save.
+
+ Approved-by: Indu Bhagat <indu.bhagat@oracle.com>
+
+2025-01-14 Matthieu Longo <matthieu.longo@arm.com>
+
+ aarch64: make explicit that CFI gnu_window_save is for Sparc, not AArch64
+ - add a detailed comment when parsing DW_CFA_GNU_window_save in SFrame to
+ explain why we are checking whether the targeted architecture is AArch64,
+ whereas this CFI is a Sparc extension.
+ - replace .cfi_gnu_window_save by .cfi_negate_ra_state in existing AArch64
+ DWARF tests as this is the preferred directive since GCC 15.
+ - add a new AArch64 test to check backward compatibility with old GCC
+ versions that emits .cfi_gnu_window_save.
+
+ Approved-by: Indu Bhagat <indu.bhagat@oracle.com>
+ Approved-by: Richard Earnshaw <richard.earnshaw@arm.com>
+
+2025-01-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
+
+ gdbserver: remove handling of the 'L' tracepoint action
+ Now that static tracepoint support is removed from gdbserver, it makes
+ sense to remove handling of the 'L' tracepoint action, too. The code
+ that checks received actions already has a default case that tolerates
+ unrecognized actions:
+
+ default:
+ trace_debug ("unknown trace action '%c', ignoring...", *act);
+
+ In case 'L' is unexpectedly received, we would at least be able to see
+ this in the logs.
+
+ Approved-By: Simon Marchi <simon.marchi@efficios.com>
+
+2025-01-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
+
+ gdbserver: remove the static_tracepoint enum value
+ As a continuation of the previous patches that remove UST from
+ gdbserver, remove the `static_tracepoint` enum value from
+ `tracepoint_type` and all the associated code.
+
+ Now that the last use of `write_e_static_tracepoints_not_supported`
+ is gone, also remove that function.
+
+ The handling of the 'S' option, where the `static_tracepoint` enum
+ value was being used, is removed completely, because recognizing that
+ option makes sense only when static tracepoint support is announced.
+
+ This patch is easier to view with "git show -w".
+
+ Approved-By: Simon Marchi <simon.marchi@efficios.com>
+
+2025-01-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
+
+ gdbserver: do not announce static tracepoint support
+ Remove the announcement that `qXfer:statictrace:read` and
+ `StaticTracepoints` are supported. Associated to this, remove the
+ handling of "qTfSTM", "qTsSTM", and "qTSTMat" packets and the
+ qXfer:statictrace:read handling.
+
+ Approved-By: Simon Marchi <simon.marchi@efficios.com>
+
+2025-01-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
+
+ gdbserver: remove UST (static tracepoint) support (part 2)
+ With the removal of UST, the `in_process_agent_supports_ust` query
+ would essentially always be false. Remove the function and adjust
+ the uses, comments, and warning/error messages.
+
+ Approved-By: Simon Marchi <simon.marchi@efficios.com>
+
+2025-01-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
+
+ gdbserver: remove UST (static tracepoint) support (part 1)
+ UST support in gdbserver is substantially outdated. Simon says:
+
+ ...[having HAVE_UST defined] never happens nowadays because it used
+ a version of lttng-ust that has been deprecated for a loooong time
+ (the 0.x series). So everything in HAVE_UST just bitrots. It might
+ be possible to update all this code to use lttng-ust 2.x (1.x never
+ existed), but I don't think it's going to happen unless somebody
+ specifically asks for it. I would suggest removing support for UST
+ from gdbserver. ...If we ever want to resurrect the support for UST
+ and port to 2.x, we can get the code from the git history.
+
+ This patch removes the support, mostly mechanically by deleting code
+ guarded by `#ifdef HAVE_UST`. After these removals, `struct
+ static_tracepoint_ctx` becomes unused. So, remove it, too.
+
+ The following patches remove more code.
+
+ Reviewed-By: Eli Zaretskii <eliz@gnu.org>
+ Approved-By: Simon Marchi <simon.marchi@efficios.com>
+
+2025-01-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
+
+ gdb, doc: describe the 'L' tracepoint action
+ I noticed that 'L' is a tracepoint action but it is not defined in the
+ document. Add the description.
+
+ Reviewed-By: Eli Zaretskii <eliz@gnu.org>
+
+2025-01-14 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
+
+ gdb, doc: mention the 'S' option for the QTDP packet
+ I noticed that gdbserver accepts an 'S' option for the QTDP packet to
+ create a static tracepoint, but this is not mentioned in the document.
+ Update the document.
+
+ I first thought about updating the argument as `[:Flen|:S]`, but then
+ opted for `[:Flen][:S]`. Although it is odd that ':F' and ':S' are
+ allowed to co-exist, the implementation at the gdbserver side allows
+ this and handles the packet arguments so that the right-most
+ positioned ':F' or ':S' overwrites the final tracepoint type. When
+ the documentation is missing, the implementation usually determines
+ the behavior.
+
+ Reviewed-By: Eli Zaretskii <eliz@gnu.org>
+
+2025-01-14 H.J. Lu <hjl.tools@gmail.com>
+
+ ld: Call cmdline_check_object_only_section only if plugin is enabled
+ * ldfile.c (ldfile_try_open_bfd): Call
+ cmdline_check_object_only_section only if BFD_SUPPORTS_PLUGINS
+ is defined.
+
+2025-01-14 Haochen Jiang <haochen.jiang@intel.com>
+
+ x86: Remove "NE" in mnemonics for convert insns related to AI data types
+ NE is quite ambiguous and misleading in mnemonics since it should be
+ Rounding to Nearest Even, but could be mis-interpretated to No
+ Exception.
+
+ Under its correct meaning, which means rounding, it should only be used
+ in down-convert, since up-convert is always exact for normal values
+ It could be difficult to judge which kind of convert it is if we have
+ the convert between same bit float types.
+
+ For all AI data types including BF16 and FP8, the default rounding is
+ Rounding to Nearest Even. So removing them in mnemonics would reduce
+ burden for programmers to consider whether it should be added or not
+ in mnemonics and stop the ambiguous meaning on "NE" itself.
+
+ If the convert itself is using a rounding mode other than RNE, it would
+ be explicitly added in mnemonics (e.g., Long used "T" and "BIAS"
+ introduced in AVX10.2).
+
+ gas/ChangeLog:
+
+ * testsuite/gas/i386/avx10_2-256-cvt-intel.d: Refine testcases
+ according to mnemonics change.
+ * testsuite/gas/i386/avx10_2-256-cvt.d: Ditto.
+ * testsuite/gas/i386/avx10_2-256-cvt.s: Ditto.
+ * testsuite/gas/i386/avx10_2-256-satcvt-intel.d: Ditto.
+ * testsuite/gas/i386/avx10_2-256-satcvt.d: Ditto.
+ * testsuite/gas/i386/avx10_2-256-satcvt.s: Ditto.
+ * testsuite/gas/i386/avx10_2-512-cvt-intel.d: Ditto.
+ * testsuite/gas/i386/avx10_2-512-cvt.d: Ditto.
+ * testsuite/gas/i386/avx10_2-512-cvt.s: Ditto.
+ * testsuite/gas/i386/avx10_2-512-satcvt-intel.d: Ditto.
+ * testsuite/gas/i386/avx10_2-512-satcvt.d: Ditto.
+ * testsuite/gas/i386/avx10_2-512-satcvt.s: Ditto.
+ * testsuite/gas/i386/x86-64-avx10_2-256-cvt-intel.d: Ditto.
+ * testsuite/gas/i386/x86-64-avx10_2-256-cvt.d: Ditto.
+ * testsuite/gas/i386/x86-64-avx10_2-256-cvt.s: Ditto.
+ * testsuite/gas/i386/x86-64-avx10_2-256-satcvt-intel.d: Ditto.
+ * testsuite/gas/i386/x86-64-avx10_2-256-satcvt.d: Ditto.
+ * testsuite/gas/i386/x86-64-avx10_2-256-satcvt.s: Ditto.
+ * testsuite/gas/i386/x86-64-avx10_2-512-cvt-intel.d: Ditto.
+ * testsuite/gas/i386/x86-64-avx10_2-512-cvt.d: Ditto.
+ * testsuite/gas/i386/x86-64-avx10_2-512-cvt.s: Ditto.
+ * testsuite/gas/i386/x86-64-avx10_2-512-satcvt-intel.d: Ditto.
+ * testsuite/gas/i386/x86-64-avx10_2-512-satcvt.d: Ditto.
+ * testsuite/gas/i386/x86-64-avx10_2-512-satcvt.s: Ditto.
+
+ opcodes/ChangeLog:
+
+ * i386-dis-evex-prefix.h: Remove ne in mnemonics for
+ convert insns.
+ * i386-opc.tbl: Ditto.
+ * i386-mnem.h: Regenerated.
+ * i386-tbl.h: Ditto.
+
+2025-01-14 Haochen Jiang <haochen.jiang@intel.com>
+
+ x86: Rename VCOMSBF16 to VCOMISBF16
+ The functionality for VCOMSBF16 is exactly the same as the VCOMISD/S/H.
+ The only difference is the bf16 type. Thus, it should be VCOMISBF16.
+ This patch would fix that.
+
+ gas/ChangeLog:
+
+ * testsuite/gas/i386/avx10_2-256-bf16-intel.d: Refine testcase
+ according to mnemonics change.
+ * testsuite/gas/i386/avx10_2-256-bf16.d: Ditto.
+ * testsuite/gas/i386/avx10_2-256-bf16.s: Ditto.
+ * testsuite/gas/i386/x86-64-avx10_2-256-bf16-intel.d: Ditto.
+ * testsuite/gas/i386/x86-64-avx10_2-256-bf16.d: Ditto.
+ * testsuite/gas/i386/x86-64-avx10_2-256-bf16.s: Ditto.
+
+ opcodes/ChangeLog:
+
+ * i386-dis-evex-prefix.h: Rename VCOMSBF16 to VCOMISBF16.
+ * i386-opc.tbl: Ditto.
+ * i386-mnem.h: Regenerated.
+ * i386-tbl.h: Ditto.
+
+2025-01-14 Haochen Jiang <haochen.jiang@intel.com>
+
+ x86: Remove "P" and "NE" in mnemonics for BF16 arithmetic insns
+ Since the bf16 is an AI data types, it will be implicitly packed. Thus,
+ "P" (for packed) is omitted in mnemonics from its introduction. AVX10.2
+ BF16 arithmetic insns are introduced with "P" in mnemonics with packed.
+ This patch will remove them for consistency.
+
+ NE is quite ambiguous and misleading in mnemonics since it should be
+ Rounding to Nearest Even, but could be mis-interpretated to No
+ Exception. While AI data types like BF16 and FP8 are using Rounding to
+ Nearest Even as default rounding modes. There is no need to use the
+ ambiguous mnemonics in AVX10.2 insns. This patch will also remove them.
+
+ For convert insns, it will be handled in the upcoming patch.
+
+ gas/ChangeLog:
+
+ * testsuite/gas/i386/avx10_2-256-bf16-intel.d: Refine testcase
+ according to new mnemonics.
+ * testsuite/gas/i386/avx10_2-256-bf16.d: Ditto.
+ * testsuite/gas/i386/avx10_2-256-bf16.s: Ditto.
+ * testsuite/gas/i386/avx10_2-256-miscs-intel.d: Ditto.
+ * testsuite/gas/i386/avx10_2-256-miscs.d: Ditto.
+ * testsuite/gas/i386/avx10_2-256-miscs.s: Ditto.
+ * testsuite/gas/i386/avx10_2-512-bf16-intel.d: Ditto.
+ * testsuite/gas/i386/avx10_2-512-bf16.d: Ditto.
+ * testsuite/gas/i386/avx10_2-512-bf16.s: Ditto.
+ * testsuite/gas/i386/avx10_2-512-miscs-intel.d: Ditto.
+ * testsuite/gas/i386/avx10_2-512-miscs.d: Ditto.
+ * testsuite/gas/i386/avx10_2-512-miscs.s: Ditto.
+ * testsuite/gas/i386/x86-64-avx10_2-256-bf16-intel.d: Ditto.
+ * testsuite/gas/i386/x86-64-avx10_2-256-bf16.d: Ditto.
+ * testsuite/gas/i386/x86-64-avx10_2-256-bf16.s: Ditto.
+ * testsuite/gas/i386/x86-64-avx10_2-256-miscs-intel.d: Ditto.
+ * testsuite/gas/i386/x86-64-avx10_2-256-miscs.d: Ditto.
+ * testsuite/gas/i386/x86-64-avx10_2-256-miscs.s: Ditto.
+ * testsuite/gas/i386/x86-64-avx10_2-512-bf16-intel.d: Ditto.
+ * testsuite/gas/i386/x86-64-avx10_2-512-bf16.d: Ditto.
+ * testsuite/gas/i386/x86-64-avx10_2-512-bf16.s: Ditto.
+ * testsuite/gas/i386/x86-64-avx10_2-512-miscs-intel.d: Ditto.
+ * testsuite/gas/i386/x86-64-avx10_2-512-miscs.d: Ditto.
+ * testsuite/gas/i386/x86-64-avx10_2-512-miscs.s: Ditto.
+
+ opcodes/ChangeLog:
+
+ * i386-dis-evex-prefix.h: Remove p and ne in bf16 mnemonics.
+ * i386-opc.tbl: Ditto.
+ * i386-mnem.h: Regenerated.
+ * i386-tbl.h: Ditto.
+
+2025-01-14 Haochen Jiang <haochen.jiang@intel.com>
+
+ Support Intel AMX-AVX512
+ This patch will support AMX-AVX512. In disassmbler, we pull out all
+ GPR mode out of the vex length switch to make it more general.
+
+ gas/ChangeLog:
+
+ * NEWS: Mention the full support on DMR AMX ISAs.
+ * config/tc-i386.c: Add amx_avx512.
+ * doc/c-i386.texi: Document .amx_avx512.
+ * testsuite/gas/i386/x86-64.exp: Run AMX-AVX512 tests.
+ * testsuite/gas/i386/x86-64-amx-avx512-intel.d: New test.
+ * testsuite/gas/i386/x86-64-amx-avx512.d: Ditto.
+ * testsuite/gas/i386/x86-64-amx-avx512.s: Ditto.
+
+ opcodes/ChangeLog:
+
+ * i386-dis-evex-len.h: Add EVEX_LEN_0F384A_X86_64_W_0,
+ EVEX_LEN_0F386D_X86_64_W_0, EVEX_LEN_0F3A07_X86_64_W_0,
+ EVEX_LEN_0F3A77_X86_64_W_0.
+ * i386-dis-evex-prefix.h: Add PREFIX_EVEX_0F384A_W_0_L_2,
+ PREFIX_EVEX_0F386D_W_0_L_2, PREFIX_EVEX_0F3A07_W_0_L_2,
+ PREFIX_EVEX_0F3A77_W_0_L_2.
+ * i386-dis-evex-w.h: Add EVEX_W_0F384A_X86_64, EVEX_W_0F386D_X86_64,
+ EVEX_W_0F3A07_X86_64, EVEX_W_0F3A77_X86_64.
+ * i386-dis-evex-x86-64.h: Add X86_64_EVEX_0F384A, X86_64_EVEX_0F386D,
+ X86_64_EVEX_0F3A07, X86_64_EVEX_0F3A77.
+ * i386-dis-evex.h: Ditto.
+ * i386-dis.c (EVEX_LEN_0F384A_X86_64_W_0): New.
+ (EVEX_LEN_0F386D_X86_64_W_0): Ditto.
+ (EVEX_LEN_0F3A07_X86_64_W_0): Ditto.
+ (EVEX_LEN_0F3A77_X86_64_W_0): Ditto.
+ (MOD_EVEX_0F384A_X86_64_W_0): Ditto.
+ (MOD_EVEX_0F386D_X86_64_W_0): Ditto.
+ (MOD_EVEX_0F3A07_X86_64_W_0): Ditto.
+ (MOD_EVEX_0F3A77_X86_64_W_0): Ditto.
+ (PREFIX_EVEX_0F384A_W_0_L_2): Ditto.
+ (PREFIX_EVEX_0F386D_W_0_L_2): Ditto.
+ (PREFIX_EVEX_0F3A07_W_0_L_2): Ditto.
+ (PREFIX_EVEX_0F3A77_W_0_L_2): Ditto.
+ (EVEX_W_0F384A_X86_64): Ditto.
+ (EVEX_W_0F386D_X86_64): Ditto.
+ (EVEX_W_0F3A07_X86_64): Ditto.
+ (EVEX_W_0F3A77_X86_64): Ditto.
+ (X86_64_EVEX_0F384A): Ditto.
+ (X86_64_EVEX_0F386D): Ditto.
+ (X86_64_EVEX_0F3A07): Ditto.
+ (X86_64_EVEX_0F3A77): Ditto.
+ (OP_VEX): Pull out all GPR mode out of the vector length switch.
+ * i386-gen.c (isa_dependencies): Add AMX-AVX512.
+ (cpu_flags): Ditto.
+ * i386-init.h: Regenerated.
+ * i386-mnem.h: Ditto.
+ * i386-opc.h (CpuAMX_AVX512): New.
+ (i386_cpu_flags): Add cpuamx_avx512.
+ * i386-opc.tbl: Add AMX-AVX512 instructions.
+ * i386-tbl.h: Regenerated.
+
+2025-01-14 Hu, Lin1 <lin1.hu@intel.com>
+ Haochen Jiang <haochen.jiang@intel.com>
+
+ Support Intel AMX-MOVRS
+ This patch will support AMX-MOVRS feature. Unlike all the other
+ AMX insns in vector space where we pass vex_len_table before
+ vex_w_table, we first pass vex_w_table for tileloaddrs[,t1] to
+ align with the order in EVEX space. The reason why we first pass
+ vex_w_table in EVEX space is due to AMX-AVX512, where tcvtrowd2ps
+ and tilemovrow with r32 shares the same opcode with tileloaddrs[,t1].
+ All of them have evex.w = 0 but with different evex.length. Re-doing
+ that shortly is not ideal.
+
+ APX_F extension is also implemented in this patch. The encoding will
+ be:
+ - EVEX.128.NP/66.MAP5.W0 F8/F9 !(11):rrr:100 for
+ T2RPNTLVW[Z0,Z1]RS[,T1] with NF=0.
+ - EVEX.128.F2/66.0F38.W0 4A !(11):rrr:100 FOR TILELOADDRS[,T1] with
+ NF=0.
+
+ For APX_F extension, we could not use APX_F(AMX_TRANSPOSE&AMX_MOVRS)
+ since the transformation could not be done. Instead, we will use
+ AMX_TRANSPOSE & APX_F(AMX_MOVRS). Thus, we should set AMX_TRANSPOSE
+ for "any" for cpu_flags in assembler. Since it will only affect the
+ cpu_flags_match, handle that there.
+
+ gas/ChangeLog:
+
+ * config/tc-i386.c (cpu_arch): Add amx_movrs.
+ (cpu_flags_match): Set any bitfield for multiple cpuid
+ enabled insns.
+ * doc/c-i386.texi: Document .amx_movrs.
+ * testsuite/gas/i386/x86-64.exp: Run AMX-MOVRS tests.
+ * testsuite/gas/i386/x86-64-amx-movrs-intel.d: New test.
+ * testsuite/gas/i386/x86-64-amx-movrs-inval.l: Ditto.
+ * testsuite/gas/i386/x86-64-amx-movrs-inval.s: Ditto.
+ * testsuite/gas/i386/x86-64-amx-movrs.d: Ditto.
+ * testsuite/gas/i386/x86-64-amx-movrs.s: Ditto.
+
+ opcodes/ChangeLog:
+
+ * i386-dis-evex-len.h (EVEX_LEN_0F384A_X86_64_W_0): New.
+ * i386-dis-evex-w.h (EVEX_W_0F384A_X86_64): Ditto.
+ * i386-dis-evex-x86-64.h (X86_64_EVEX_0F384A): Ditto.
+ * i386-dis-evex.h: New entry for AMX-MOVRS.
+ * i386-dis.c:
+ (PREFIX_VEX_0F384A_X86_64_L_0_W_0): New.
+ (PREFIX_VEX_MAP5_F8_X86_64_L_0_W_0): Ditto.
+ (PREFIX_VEX_MAP5_F9_X86_64_L_0_W_0): Ditto.
+ (X86_64_VEX_0F384A): Ditto.
+ (X86_64_VEX_MAP5_F8): Ditto.
+ (X86_64_VEX_MAP5_F9): Ditto.
+ (X86_64_EVEX_0F384A): Ditto.
+ (VEX_LEN_0F384A_X86_64_W_0): Ditto.
+ (VEX_LEN_MAP5_F8_X86_64): Ditto.
+ (VEX_LEN_MAP5_F9_X86_64): Ditto.
+ (EVEX_LEN_0F384A_X86_64_W_0): Ditto.
+ (VEX_W_0F384A_X86_64): Ditto.
+ (VEX_W_MAP5_F8_X86_64): Ditto.
+ (VEX_W_MAP5_F9_X86_64): Ditto.
+ (EVEX_W_0F384A_X86_64): Ditto.
+ (prefix_table): New entry for AMX-MOVRS.
+ (x86_64_table): Ditto.
+ (vex_len_table): Ditto.
+ (vex_w_table): Ditto.
+ (map5_f8_opcode): New.
+ (map5_f9_opcode): Ditto.
+ (get_valid_dis386): Handle VEX_MAP5 opcode for AMX-MOVRS.
+ * i386-gen.c (isa_dependencies): Add AMX_MOVRS.
+ (cpu_flags): Ditto.
+ * i386-init.h: Regenerated.
+ * i386-mnem.h: Ditto.
+ * i386-opc.h (CpuAMX_MOVRS): New.
+ (i386_cpu_flags): Add cpuamx_movrs.
+ * i386-opc.tbl: Add AMX-MOVRS instructions.
+ * i386-tbl.h: Regenerated.
+
+2025-01-14 Hu, Lin1 <lin1.hu@intel.com>
+ Haochen Jiang <haochen.jiang@intel.com>
+ Lili Cui <lili.cui@intel.com>
+
+ Support Intel MOVRS
+ This patch focus on supporting MOVRS ISA. We could take this full ISA
+ as four part: PREFETCHRST2, MOVRS, MOVRS APX_F extension and MOVRS AVX10.2
+ extension.
+
+ The APX_F extension for MOVRS will be:
+ - EVEX.LLZ.NP.MAP4.WIG 8A !(11):rrr:bbb for r8/m8 with NF=0 and
+ ND=0
+ - EVEX.LLZ.NP/66.MAP4.SCALABLE 8B !(11):rrr:bbb for rv/mv with NF=0
+ and ND=0
+
+ We did not merge the table together for APX_F since there is an explicit
+ x64 for movrs insn. The current APX_F() did not support the combination
+ between CPUIDs. Also, the space is different for legacy and apx_f forms.
+
+ gas/ChangeLog:
+
+ * NEWS: Support Intel MOVRS.
+ * config/tc-i386.c: Add MOVRS.
+ * doc/c-i386.texi: Document .movrs.
+ * testsuite/gas/i386/i386.exp: Run MOVRS tests.
+ * testsuite/gas/i386/x86-64.exp: Ditto.
+ * testsuite/gas/i386/x86-64-apx-evex-promoted-intel.d: Add MOVRS
+ tests.
+ * testsuite/gas/i386/x86-64-apx-evex-promoted-wig.d: Ditto.
+ * testsuite/gas/i386/x86-64-apx-evex-promoted.d: Ditto.
+ * testsuite/gas/i386/x86-64-apx-evex-promoted.s: Ditto.
+ * testsuite/gas/i386/lfence-load.d: Add prefetchrst2.
+ * testsuite/gas/i386/lfence-load.s: Ditto.
+ * testsuite/gas/i386/nops-8.d: Ditto.
+ * testsuite/gas/i386/prefetch-intel.d: Ditto.
+ * testsuite/gas/i386/prefetch.d: Ditto.
+ * testsuite/gas/i386/x86-64-lfence-load.d: Ditto.
+ * testsuite/gas/i386/x86-64-lfence-load.s: Ditto.
+ * testsuite/gas/i386/x86-64-prefetch-intel.d: Ditto.
+ * testsuite/gas/i386/x86-64-prefetch.d: Ditto.
+ * testsuite/gas/i386/movrs-intel.d: New test.
+ * testsuite/gas/i386/movrs-inval.l: Ditto.
+ * testsuite/gas/i386/movrs-inval.s: Ditto.
+ * testsuite/gas/i386/movrs.d: Ditto.
+ * testsuite/gas/i386/movrs.s: Ditto.
+ * testsuite/gas/i386/x86-64-movrs-avx10_2-256-intel.d: Ditto.
+ * testsuite/gas/i386/x86-64-movrs-avx10_2-256.d: Ditto.
+ * testsuite/gas/i386/x86-64-movrs-avx10_2-256.s: Ditto.
+ * testsuite/gas/i386/x86-64-movrs-avx10_2-512-intel.d: Ditto.
+ * testsuite/gas/i386/x86-64-movrs-avx10_2-512.d: Ditto.
+ * testsuite/gas/i386/x86-64-movrs-avx10_2-512.s: Ditto.
+ * testsuite/gas/i386/x86-64-movrs-intel.d: Ditto.
+ * testsuite/gas/i386/x86-64-movrs.d: Ditto.
+ * testsuite/gas/i386/x86-64-movrs.s: Ditto.
+ * testsuite/gas/i386/x86-64-movrs-intel-suffix.d: Ditto.
+ * testsuite/gas/i386/x86-64-movrs-suffix.d: Ditto.
+ * testsuite/gas/i386/x86-64-movrs-suffix.s: Ditto.
+
+ opcodes/ChangeLog:
+
+ * i386-dis-evex-prefix.h: Add PREFIX_EVEX_MAP5_6F_X86_64.
+ * i386-dis-evex-x86.h: Add X86_64_EVEX_MAP5_6F.
+ * i386-dis-evex.h (evex_table): New entry for movrs.
+ * i386-dis.c (MOD_0F18_REG_4): New.
+ (PREFIX_EVEX_MAP5_6F_X86_64): Ditto.
+ (X86_64_0F388A): Ditto.
+ (X86_64_0F388B): Ditto.
+ (X86_64_EVEX_MAP5_6F): Ditto.
+ (three_byte_table): New entry for MOVRS.
+ (reg_table): Ditto.
+ (mod_table): Ditto.
+ (x86_64_table): Ditto. Also include i386-dis-evex-x86.h.
+ * i386-gen.c (cpu_flags): Add MOVRS.
+ * i386-init.h: Regenerated.
+ * i386-mnem.h: Ditto.
+ * i386-opc.h (i386_cpu_flags): Add cpumovrs.
+ * i386-opc.tbl: Add MOVRS instrctions.
+ * i386-tbl.h: Regenerated.
+
+2025-01-14 Haochen Jiang <haochen.jiang@intel.com>
+
+ x86: Remove mod_table pass for MVexSIBMEM
+ When using MVexSIBMEM, OP_M will help check modrm. Thus, no need
+ to pass mod_table.
+
+ Since we have OP_M do the work, from now on, mod_table[] should
+ not gain any new entries, unless both slots of them are populated,
+ e.g., different modrm leading to different insns could not be
+ combined (Bad_Opcode is not the case since OP_M could handle that).
+
+ opcodes/ChangeLog:
+
+ * i386-dis.c: Remove mod_table pass for MVexSIBMEM.
+
+2025-01-14 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2025-01-13 H.J. Lu <hjl.tools@gmail.com>
+
+ h8300: Handle .gnu_object_only section
+ PR ld/12291
+ PR ld/12430
+ PR ld/13298
+ * config/tc-h8300.c (h8300_elf_section): Handle .gnu_object_only
+ section.
+
+ ld: Document mixing LTO and non-LTO objects for -r
+ * ld.texi: Document mixing LTO and non-LTO relocatable files for
+ "ld -r".
+
+2025-01-13 H.J. Lu <hjl.tools@gmail.com>
+
+ ld: Add LTO and none-LTO output support for ld -r
+ Link with mixed IR/non-IR objects
+
+ * 2 kinds of object files
+ o non-IR object file has
+ * non-IR sections
+ o IR object file has
+ * IR sect[...]
[diff truncated at 100000 bytes]
More information about the Binutils-cvs
mailing list