[binutils-gdb/binutils-2_43-branch] this-is-the-2.43-release
Nick Clifton
nickc@sourceware.org
Sun Aug 4 13:24:08 GMT 2024
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=57f3676f3e5266829a91880d61143ab9ecd617bd
commit 57f3676f3e5266829a91880d61143ab9ecd617bd
Author: Nick Clifton <nickc@redhat.com>
Date: Sun Aug 4 14:23:51 2024 +0100
this-is-the-2.43-release
Diff:
---
ChangeLog.git | 213988 ++++++++++++++++++++++++++++++++++++++
bfd/configure | 20 +-
bfd/development.sh | 4 +-
bfd/po/bfd.pot | 184 +-
bfd/version.m4 | 2 +-
binutils/configure | 20 +-
gas/configure | 20 +-
gas/po/gas.pot | 2 +-
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 | 14 +-
opcodes/configure | 20 +-
opcodes/po/opcodes.pot | 2 +-
src-release.sh | 2 +-
18 files changed, 214191 insertions(+), 173 deletions(-)
diff --git a/ChangeLog.git b/ChangeLog.git
new file mode 100644
index 00000000000..2c017a55c0d
--- /dev/null
+++ b/ChangeLog.git
@@ -0,0 +1,213988 @@
+2024-08-04 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2024-08-03 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2024-08-02 Nick Clifton <nickc@redhat.com>
+
+ Updated Bulgarian translation for the binutils/ directory
+
+2024-08-02 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2024-08-01 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+
+ gprofng: 32018 Compilation of binutils 2.43 failed on CentOS 6
+ strchr is redefined as a macro in /usr/include/bits/string.h on CentOS 6/7.
+ In this case, we may not use our CALL_UTIL macro for strchr.
+ Use __collector_strchr instead of "CALL_UTIL (strchr)".
+
+ gprofng/ChangeLog
+ 2024-07-28 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+
+ PR 32018
+ * libcollector/hwprofile.c (open_experiment): Use __collector_strchr.
+
+2024-08-01 Nick Alcock <nick.alcock@oracle.com>
+
+ libctf: fix ctf_archive_count return value on big-endian
+ This failed to properly byteswap its return value.
+
+ The ctf_archive format predates the idea of "just write natively and
+ flip on open", and byteswaps all over the place. It's too easy to
+ forget one. The next revision of the archive format (not versioned,
+ so we just tweak the magic number instead) should be native-endianned
+ like the dicts inside it are.
+
+ libctf/
+ * ctf-archive.c (ctf_archive_count): Byteswap return value.
+
+2024-08-01 Nick Alcock <nick.alcock@oracle.com>
+
+ libctf: dump: fix small leak
+ If you asprintf something and then use it only as input to another asprintf,
+ it helps to free it afterwards.
+
+ libctf/
+ * ctf-dump.c (ctf_dump_header): Free the flagstr after use.
+ (ctf_dump): Make a NULL return slightly clearer.
+
+2024-08-01 Nick Alcock <nick.alcock@oracle.com>
+
+ libctf: fix ref leak of names of newly-inserted non-root-visible types
+ A bug in ctf_dtd_delete led to refs in the string table to the
+ names of non-root-visible types not being removed when the DTD
+ was. This seems harmless, but actually it would lead to a write
+ down a pointer into freed memory if such a type was ctf_rollback()ed
+ over and then the dict was serialized (updating all the refs as the
+ strtab was serialized in turn).
+
+ Bug introduced in commit fe4c2d55634c700ba527ac4183e05c66e9f93c62
+ ("libctf: create: non-root-visible types should not appear in name tables")
+ which is included in binutils 2.35.
+
+ libctf/
+ * ctf-create.c (ctf_dtd_delete): Remove refs for all types
+ with names, not just root-visible ones.
+
+2024-08-01 Nick Alcock <nick.alcock@oracle.com>
+
+ libctf: clean up hashtab error handling mess
+ The dict and archive opening code in libctf is somewhat unusual, because
+ unlike everything else, it cannot report errors by setting an error on the
+ dict, because in case of error there isn't one. They get passed an error
+ integer pointer that is set on error instead.
+
+ Inside ctf_bufopen this is implemented by calling ctf_set_open_errno and
+ passing it a positive error value. In turn this means that most things it
+ calls (including init_static_types) return zero on success and a *positive*
+ ECTF_* or errno value on error.
+
+ This trickles down to ctf_dynhash_insert_type, which is used by
+ init_static_types to add newly-detected types to the name tables. This was
+ returning the error value it received from a variety of functions without
+ alteration. ctf_dynhash_insert conformed to this contract by returning a
+ positive value on error (usually OOM), which is unfortunate for multiple
+ reasons:
+
+ - ctf_dynset_insert returns a *negative* value
+ - ctf_dynhash_insert and ctf_dynset_insert don't take an fp, so the value
+ they return is turned into the errno, so it had better be right, callers
+ don't just check for != 0 here
+ - more or less every single caller of ctf_dyn*_insert in libctf other than
+ ctf_dynhash_insert_type (and there are a *lot*, mostly in the
+ deduplicator) assumes that ctf_dynhash_insert returns a negative value
+ on error, even though it doesn't. In practice the only possible error is
+ OOM, but if OOM does happen we end up with a nonsense error value.
+
+ The simplest fix for this seems to be to make ctf_dynhash_insert and
+ ctf_dynset_insert conform to the usual interface contract: negative
+ values are errors. This in turn means that ctf_dynhash_insert_type
+ needs to change: let's make it consistent too, returning a negative
+ value on error, putting the error on the fp in non-negated form.
+
+ init_static_types_internal adapts to this by negating the error return from
+ ctf_dynhash_insert_type, so the value handed back to ctf_bufopen is still
+ positive: the new call site in ctf_track_enumerator does not need to change.
+
+ (The existing tests for this reliably detect when I get it wrong.
+ I know, because they did.)
+
+ libctf/
+ * ctf-hash.c (ctf_dynhash_insert): Negate return value.
+ (ctf_dynhash_insert_type): Set de-negated error on the dict:
+ return negated error.
+ * ctf-open.c (init_static_types_internal): Adapt to this change.
+
+2024-08-01 Nick Alcock <nick.alcock@oracle.com>
+
+ libctf, include: add ctf_dict_set_flag: less enum dup checking by default
+ The recent change to detect duplicate enum values and return ECTF_DUPLICATE
+ when found turns out to perturb a great many callers. In particular, the
+ pahole-created kernel BTF has the same problem we historically did, and
+ gleefully emits duplicated enum constants in profusion. Handling the
+ resulting duplicate errors from BTF -> CTF converters reasonably is
+ unreasonably difficult (it amounts to forcing them to skip some types or
+ reimplement the deduplicator).
+
+ So let's step back a bit. What we care about mostly is that the
+ deduplicator treat enums with conflicting enumeration constants as
+ conflicting types: programs that want to look up enumeration constant ->
+ value mappings using the new APIs to do so might well want the same checks
+ to apply to any ctf_add_* operations they carry out (and since they're
+ *using* the new APIs, added at the same time as this restriction was
+ imposed, there is likely to be no negative consequence of this).
+
+ So we want some way to allow processes that know about duplicate detection
+ to opt into it, while allowing everyone else to stay clear of it: but we
+ want ctf_link to get this behaviour even if its caller has opted out.
+
+ So add a new concept to the API: dict-wide CTF flags, set via
+ ctf_dict_set_flag, obtained via ctf_dict_get_flag. They are not bitflags
+ but simple arbitrary integers and an on/off value, stored in an unspecified
+ manner (the one current flag, we translate into an LCTF_* flag value in the
+ internal ctf_dict ctf_flags word). If you pass in an invalid flag or value
+ you get a new ECTF_BADFLAG error, so the caller can easily tell whether
+ flags added in future are valid with a particular libctf or not.
+
+ We check this flag in ctf_add_enumerator, and set it around the link
+ (including on child per-CU dicts). The newish enumerator-iteration test is
+ souped up to check the semantics of the flag as well.
+
+ The fact that the flag can be set and unset at any time has curious
+ consequences. You can unset the flag, insert a pile of duplicates, then set
+ it and expect the new duplicates to be detected, not only by
+ ctf_add_enumerator but also by ctf_lookup_enumerator. This means we now
+ have to maintain the ctf_names and conflicting_enums enum-duplication
+ tracking as new enums are added, not purely as the dict is opened.
+ Move that code out of init_static_types_internal and into a new
+ ctf_track_enumerator function that addition can also call.
+
+ (None of this affects the file format or serialization machinery, which has
+ to be able to handle duplicate enumeration constants no matter what.)
+
+ include/
+ * ctf-api.h (CTF_ERRORS) [ECTF_BADFLAG]: New.
+ (ECTF_NERR): Update.
+ (CTF_STRICT_NO_DUP_ENUMERATORS): New flag.
+ (ctf_dict_set_flag): New function.
+ (ctf_dict_get_flag): Likewise.
+
+ libctf/
+ * ctf-impl.h (LCTF_STRICT_NO_DUP_ENUMERATORS): New flag.
+ (ctf_track_enumerator): Declare.
+ * ctf-dedup.c (ctf_dedup_emit_type): Set it.
+ * ctf-link.c (ctf_create_per_cu): Likewise.
+ (ctf_link_deduplicating_per_cu): Likewise.
+ (ctf_link): Likewise.
+ (ctf_link_write): Likewise.
+ * ctf-subr.c (ctf_dict_set_flag): New function.
+ (ctf_dict_get_flag): New function.
+ * ctf-open.c (init_static_types_internal): Move enum tracking to...
+ * ctf-create.c (ctf_track_enumerator): ... this new function.
+ (ctf_add_enumerator): Call it.
+ * libctf.ver: Add the new functions.
+ * testsuite/libctf-lookup/enumerator-iteration.c: Test them.
+
+2024-08-01 Nick Alcock <nick.alcock@oracle.com>
+
+ include, libctf: improve ECTF_DUPLICATE error message
+ It applies to enums now, so it should mention them.
+
+ include/
+ * ctf-api.h (_CTF_ERRORS) ECTF_DUPLICATE]: Mention enums.
+
+2024-08-01 Nick Alcock <nick.alcock@oracle.com>
+
+ libctf: link: remember to turn off the LCTF_LINKING flag after ctf_link_write
+ We set this flag at the top of ctf_link_write (to tell ctf_serialize, way
+ down under the archive file writing functions, to do the various link- time
+ serialization things like symbol filtering and the like), but we never
+ remember to clear it except on error. This is probably bad if you want to
+ serialize the dict yourself directly in the future after linking it (which
+ is... definitely a *possible* use of the API, if rather strange).
+
+ libctf/
+ * ctf-link.c (ctf_link_write): Clear LCTF_LINKING before exit.
+
+2024-08-01 Nick Alcock <nick.alcock@oracle.com>
+
+ libctf: link: fix error handling
+ We were calling the wrong error function if opening failed, causing leaks.
+
+ libctf/
+ * ctf-link.c (ctf_link_deduplicating_per_cu): Fix error handling.
+
+2024-08-01 Nick Alcock <nick.alcock@oracle.com>
+
+ libctf, open: Fix enum error handling path
+ This new error-handling path was not properly initializing the
+ fp's errno.
+
+ libctf/
+ * ctf-open.c (init_static_types_internal): Set errno properly.
+
+2024-08-01 Nick Alcock <nick.alcock@oracle.com>
+
+ libctf, subr: don't mix up errors and warnings
+ ctf_err_warn() was debug-logging warnings as if they were errors and vice
+ versa.
+
+ libctf/
+ * ctf-subr.c (ctf_err_warn): Fix debugging thinko.
+
+2024-08-01 Nick Alcock <nick.alcock@oracle.com>
+
+ libctf: fix dynset insertion
+ libctf's dynsets are a straight wrapper around libiberty hashtab, storing
+ the key directly in the hashtab slot. However, we'd often like to be able
+ to store 0 and 1 (HTAB_EMPTY_ENTRY and HTAB_DELETED_ENTRY) in there, so we
+ move them out of the way and replace them with huge unlikely values
+ instead. Unfortunately we failed to do this replacement in one place, so
+ insertion of 0 or 1 ended up misinforming the hashtab machinery that an
+ entry was empty or deleted when it wasn't.
+
+ libctf/
+ * ctf-hash.c (ctf_dynset_insert): Call key_to_internal properly.
+
+2024-08-01 Nick Alcock <nick.alcock@oracle.com>
+
+ libctf: dedup: tiny tweaks
+ Drop an unnecessary variable, and fix a buggy comment.
+
+ No effect on generated code.
+
+ libctf/
+ * ctf-dedup.c (ctf_dedup_detect_name_ambiguity): Drop unnecessary
+ variable.
+ (ctf_dedup_rwalk_output_mapping): Fix comment.
+
+2024-08-01 Nick Alcock <nick.alcock@oracle.com>
+
+ libctf: improve ECTF_NOPARENT error message
+ This erorr doesn't just indicate that there is no parent dictionary
+ (that's routine, and true of all dicts that are parents themselves)
+ but that a parent is *needed* but wasn't found.
+
+ include/
+ * ctf-api.h (_CTF_ERRORS) [ECTF_NOPARENT]: Improve error message.
+
+ ld/
+ * testsuite/ld-ctf/diag-parname.d: Adjust.
+
+2024-08-01 Nick Alcock <nick.alcock@oracle.com>
+
+ libctf: fix CTF dict compression
+ Commit 483546ce4f3 ("libctf: make ctf_serialize() actually serialize")
+ accidentally broke dict compression. There were two bugs:
+
+ - ctf_arc_write_one_ctf was still making its own decision about
+ whether to compress the dict via direct ctf_size comparison, which is
+ unfortunate because now that it no longer calls ctf_serialize itself,
+ ctf_size is always zero when it does this: it should let the writing
+ functions decide on the threshold, which they contain code to do which is
+ simply not used for lack of one trivial wrapper to write to an fd and
+ also provide a compression threshold
+
+ - ctf_write_mem, the function underlying all writing as of the commit
+ above, was calling zlib's compressBound and avoiding compression if this
+ returned a value larger than the input. Unfortunately compressBound does
+ not do a trial compression and determine whether the result is
+ compressible: it just adds zlib header sizes to the value passed in, so
+ our test would *always* have concluded that the value was incompressible!
+ Avoid by simply always compressing if the raw size is larger than the
+ threshold: zlib is quite clever enough to avoid actually compressing
+ if the data is incompressible.
+
+ Add a testcase for this.
+
+ libctf/
+ * ctf-impl.h (ctf_write_thresholded): New...
+ * ctf-serialize.c (ctf_write_thresholded): ... defined here,
+ a wrapper around...
+ (ctf_write_mem): ... this. Don't check compressibility.
+ (ctf_compress_write): Reimplement as a ctf_write_thresholded
+ wrapper.
+ (ctf_write): Likewise.
+ * ctf-archive.c (arc_write_one_ctf): Just call
+ ctf_write_thresholded rather than trying to work out whether
+ to compress.
+ * testsuite/libctf-writable/ctf-compressed.*: New test.
+
+2024-08-01 Nick Alcock <nick.alcock@oracle.com>
+
+ libctf: fix linking of non-root-visible types
+ If you deduplicate non-root-visible types, the resulting type should still
+ be non-root-visible! We were promoting all such types to root-visible, and
+ re-demoting them only if their names collided (which might happen on
+ cu-mapped links if multiple compilation units with conflicting types are
+ fused into one child dict).
+
+ This "worked" before now, in that linking at least didn't fail (if you don't
+ mind having your non-root flag value destroyed if you're adding
+ non-root-visible types), but now that conflicting enumerators cause their
+ containing enums to become conflicted (enums which might have *different
+ names*), this caused the linker to crash when it hit two enumerators with
+ conflicting values.
+
+ Not testable in ld because cu-mapped links are not exposed to ld, but can be
+ tested via direct creation of libraries and calls to ctf_link directly.
+ (This also tests the ctf_dump non-root type printout, which before now
+ was untested.)
+
+ libctf/
+ * ctf-dedup.c (ctf_dedup_emit_type): Non-root-visible input types
+ should be emitted as non-root-visible output types.
+ * testsuite/libctf-writable/ctf-nonroot-linking.c: New test.
+ * testsuite/libctf-writable/ctf-nonroot-linking.lk: New test.
+
+2024-08-01 Nick Alcock <nick.alcock@oracle.com>
+
+ libctf, dump: correctly dump non-root-visible types
+ The flag test when dumping non-root-visible tyeps was doubly wrong: the
+ flags word is a *bitfield* containing CTF_ADD_ROOT as one possible
+ value, so needs | and & testing, not just ==, and CTF_ADD_NONROOT is 0,
+ so cannot be tested for this way: one must check for the non-presence of
+ CTF_ADD_ROOT.
+
+ libctf/
+ * ctf-dump.c (ctf_dump_format_type): Fix non-root flag test.
+
+2024-08-01 Nick Alcock <nick.alcock@oracle.com>
+
+ libctf, string: split the movable refs out of the ref list
+ In commit 149ce5c263616e65 we introduced the concept of "movable" refs,
+ which are refs that can be moved in batches, to let us maintain valid ref
+ lists even when adding refs to blocks of memory that can be realloced (which
+ is any type containing a vlen which can expand, like names contained within
+ enum or struct members). Movable refs need a backpointer to the movable
+ refs dynhash for this dict; since non-movable refs are very common, we tried
+ to save memory by having a slightly bigger struct for moveable refs with a
+ backpointer in it, and casting appropriately, indicating which sort of ref
+ we were dealing with via a flag on the atom.
+
+ Unfortunately this doesn't work reliably, because you can perfectly well
+ have a string ("foo", say) which has both non-movable refs (say, an external
+ symbol and a variable name) and movable refs (say, a structure member name)
+ to the same atom. Indicate which struct we're dealing with with an atom
+ flag and suddenly you're casting a ctf_str_atom_ref to a
+ ctf_str_atom_ref_movable (which is bigger) and dereferencing random memory
+ off the end of it and interpreting it as a backpointer to the movable refs
+ dynhash. This is unlikely to work well.
+
+ So bite the bullet and split refs into two separate lists, one for movable
+ refs, one for immovable refs. It means some annoying code duplication, but
+ there's not very much of it, and it means we can keep the movable refs
+ hashtab (which in turn means we don't have to do linear searches to find all
+ relevant refs when moving refs, which in turn means that
+ structure/union/enum member additions remain amortized O(n) time, not
+ O(n^2).
+
+ Callers can now purge movable and non-movable refs independently of each
+ other. We don't use this yet, but a use is coming.
+
+ libctf/
+ * ctf-impl.h (CTF_STR_ATOM_MOVABLE): Delete.
+ (struct ctf_str_atom) [csa_movable_refs]: New.
+ (struct ctf_dict): Adjust comment.
+ (ctf_str_purge_refs): Add MOVABLE arg.
+ * ctf-string.c (ctf_str_purge_movable_atom_refs): Split out of...
+ (ctf_str_purge_atom_refs): ... this.
+ (ctf_str_free_atom): Call it.
+ (ctf_str_purge_one_atom_refs): Likewise.
+ (aref_create): Adjust accordingly.
+ (ctf_str_move_refs): Likewise.
+ (ctf_str_remove_ref): Remove movable refs too, including
+ deleting the ref from ctf_str_movable_refs.
+ (ctf_str_purge_refs): Add MOVABLE arg.
+ (ctf_str_update_refs): Update movable refs.
+ (ctf_str_write_strtab): Check, and purge, movable refs.
+
+2024-08-01 Nick Alcock <nick.alcock@oracle.com>
+
+ libctf, dedup: drop unnecessary arg from ctf_dedup()
+ The PARENTS arg is carefully passed down through all the layers of hash
+ functions and then never used for anything. (In the distant past it was
+ used for cycle detection, but the algorithm eventually committed doesn't
+ need to do cycle detection...)
+
+ The PARENTS arg is still used by ctf_dedup_emit(), but even there we can
+ loosen the requirements and state that you can just leave entries
+ corresponding to dicts with no parents at zero (which will be useful
+ in an upcoming commit).
+
+ libctf/
+ * ctf-dedup.c (ctf_dedup_hash_type): Drop PARENTS arg.
+ (ctf_dedup_rhash_type): Likewise.
+ (ctf_dedup): Likewise.
+ (ctf_dedup_emit_struct_members): Mention what you can do to
+ PARENTS entries for parent dicts.
+ * ctf-impl.h (ctf_dedup): Adjust accordingly.
+ * ctf-link.c (ctf_link_deduplicating_per_cu): Likewise.
+ (ctf_link_deduplicating): Likewise.
+
+2024-08-01 Nick Alcock <nick.alcock@oracle.com>
+
+ libctf: we do in fact support foreign-endian old versions
+ The worry that caused this to not be supported was because we don't
+ bother endian-flipping version-related fields before checking them.
+ But they're all unsigned chars anyway, and don't need any flipping at
+ all.
+
+ This should be supported and should already work. Enable it.
+
+ libctf/
+ * ctf-open.c (ctf_bufopen): Don't prohibit foreign-endian
+ upgrades.
+
+2024-08-01 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2024-07-31 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2024-07-30 Lulu Cai <cailulu@loongson.cn>
+
+ gas/NEWS, ld/NEWS: Announce LoongArch changes in 2.43
+ (cherry picked from commit f722345809f9881ae99f981308ec5b5815c4a6f5)
+
+2024-07-30 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2024-07-29 Nick Clifton <nickc@redhat.com>
+
+ Updated translations for the bfd, binutils, gas, ld and opcodes directories
+
+2024-07-29 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2024-07-28 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2024-07-27 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2024-07-26 YunQiang Su <yunqiang.su@cipunited.com>
+
+ microMIPS: Add MT ASE instruction set support
+ Add the MT ASE instruction operand types and encodings to the microMIPS
+ opcode table and enable the assembly of these instructions in GAS from
+ MIPSr2 onwards. Update the binutils and GAS testsuites accordingly.
+
+ References:
+
+ "MIPS Architecture for Programmers, Volume IV-f: The MIPS MT Module for
+ the microMIPS32 Architecture", MIPS Technologies, Inc., Document Number:
+ MD00768, Revision 1.12, July 16, 2013
+
+ Co-Authored-By: Maciej W. Rozycki <macro@redhat.com>
+
+ (cherry picked from commit 08e6af1bac935c0820c51a9e6a52294b4ae4d832)
+
+2024-07-26 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2024-07-25 H.J. Lu <hjl.tools@gmail.com>
+
+ x86: Add missing newlines in TLS transition error messages
+ Change TLS transition error messages from
+
+ a-argp-help.o(.text+0x12f): relocation R_X86_64_GOTTPOFF against `a' must be used in ADD or MOV onlyld: final link failed: bad value
+
+ to
+
+ a-argp-help.o(.text+0x12f): relocation R_X86_64_GOTTPOFF against `a' must be used in ADD or MOV only
+ ld: final link failed: bad value
+
+ PR ld/32017
+ * elfxx-x86.c (_bfd_x86_elf_link_report_tls_transition_error):
+ Add missing newlines.
+
+ (cherry picked from commit f73f5173faa73fc13c2c61390ec26e43f9d30861)
+
+2024-07-25 H.J. Lu <hjl.tools@gmail.com>
+
+ x86: Improve TLS transition error check
+ Provide detailed TLS transition errors when unsupported instructions are
+ used. Treat R_X86_64_CODE_4_GOTTPOFF and R_X86_64_CODE_6_GOTTPOFF as
+ R_X86_64_GOTTPOFF when performing TLS transition.
+
+ bfd/
+
+ PR ld/32017
+ * elf32-i386.c (elf_i386_check_tls_transition): Return different
+ enums for different errors.
+ (elf_i386_tls_transition): Change argument from r_symndx to sym.
+ Call _bfd_x86_elf_link_report_tls_transition_error to report TLS
+ transition errors.
+ (elf_i386_scan_relocs): Pass isym instead of r_symndx to
+ elf_i386_tls_transition.
+ (elf_i386_relocate_section): Pass sym instead of r_symndx to
+ elf_i386_tls_transition.
+ * elf64-x86-64.c (elf_x86_64_check_tls_transition): Return
+ different enums for different errors.
+ (elf_x86_64_tls_transition): Change argument from r_symndx to sym.
+ Treat R_X86_64_CODE_4_GOTTPOFF and R_X86_64_CODE_6_GOTTPOFF as
+ R_X86_64_GOTTPOFF. Call
+ _bfd_x86_elf_link_report_tls_transition_error to report TLS
+ transition errors.
+ (elf_x86_64_scan_relocs): Pass isym instead of r_symndx to
+ elf_x86_64_tls_transition.
+ (elf_x86_64_relocate_section): Pass sym instead of r_symndx to
+ elf_x86_64_tls_transition.
+ * elfxx-x86.c (_bfd_x86_elf_link_report_tls_transition_error): New.
+ * elfxx-x86.h (elf_x86_tls_error_type): Likewise.
+ (_bfd_x86_elf_link_report_tls_transition_error): Likewise.
+
+ ld/
+
+ PR ld/32017
+ * testsuite/ld-i386/i386.exp: Run tlsgdesc1 and tlsgdesc2.
+ * testsuite/ld-i386/tlsie2.d: Updated.
+ * testsuite/ld-i386/tlsie3.d: Likewise.
+ * testsuite/ld-i386/tlsie4.d: Likewise.
+ * testsuite/ld-i386/tlsie5.d: Likewise.
+ * testsuite/ld-x86-64/tlsie2.d: Likewise.
+ * testsuite/ld-x86-64/tlsie3.d: Likewise.
+ * testsuite/ld-i386/tlsgdesc1.d: New file.
+ * testsuite/ld-i386/tlsgdesc1.s: Likewise.
+ * testsuite/ld-i386/tlsgdesc2.d: Likewise.
+ * testsuite/ld-i386/tlsgdesc2.s: Likewise.
+ * testsuite/ld-x86-64/tlsdesc3.d: Likewise.
+ * testsuite/ld-x86-64/tlsdesc3.s: Likewise.
+ * testsuite/ld-x86-64/tlsdesc4.d: Likewise.
+ * testsuite/ld-x86-64/tlsdesc4.s: Likewise.
+ * testsuite/ld-x86-64/tlsie5.d: Likewise.
+ * testsuite/ld-x86-64/tlsie5.s: Likewise.
+ * testsuite/ld-x86-64/x86-64.exp: Run tlsie5, tlsdesc3 and
+ tlsdesc4.
+
+ (cherry picked from commit 1d68a49ac5d71b648304f69af978fce0f4413800)
+
+2024-07-25 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2024-07-24 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2024-07-20 H.J. Lu <hjl.tools@gmail.com>
+
+ Correct version for binutils 2.43 NEWS entries.
+ Change 2.42 to 2.43 for binutils 2.43 NEWS entries.
+
+ binutils/
+
+ * NEWS: Change 2.42 to 2.43 for 2.43 NEWS entries.
+
+ ld/
+
+ * NEWS: Change 2.42 to 2.43 for 2.43 NEWS entries.
+
+ (cherry picked from commit e1b9d58e85ec5e3f73d1d48e67411386f1ac275c)
+
+2024-07-20 Nick Clifton <nickc@redhat.com>
+
+ Update version number to 2.42.90
+
+ Add markers for 2.43 branch/release
+
+2024-07-20 Alan Modra <amodra@gmail.com>
+
+ Re: binutils: Add a test for strip with build notes
+ The new test wasn't being run, and failed due to relocations against
+ .gnu.build.attributes being stripped by default strip behaviour.
+ We probably should be keeping these relocations, but I haven't made
+ that change here.
+ BTW, the new test fails on ia64-hpux but that's just a repeat of the
+ existing note-5 fail.
+
+ PR 31999
+ * testsuite/binutils-all/strip-16.d: strip with --strip-unneeded
+ and --merge-notes.
+ * testsuite/binutils-all/objcopy.exp: Run the new test. Sort
+ other strip tests.
+
+2024-07-20 H.J. Lu <hjl.tools@gmail.com>
+
+ binutils: Add a test for strip with build notes
+ Add a test for strip with build notes.
+
+ PR binutils/31999
+ * testsuite/binutils-all/strip-16.d: New.
+
+2024-07-20 Alan Modra <amodra@gmail.com>
+
+ PR31999 strip [.gnu.build.attributes]: failed
+ PR 31999
+ * objcopy.c (merge_gnu_build_notes): Always set *new_size.
+
+2024-07-20 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2024-07-19 Simon Marchi <simon.marchi@polymtl.ca>
+
+ gdb-gdb.py: strip typedefs in intrusive_list printer assertion
+ When debugging gdb itself and trying to print a intrusive_list that has
+ more than one element, I get:
+
+ File "/home/simark/build/binutils-gdb-all-targets/gdb/gdb-gdb.py", line 365, in _children_generator
+ node_ptr = self._as_node_ptr(elem_ptr)
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ File "/home/simark/build/binutils-gdb-all-targets/gdb/gdb-gdb.py", line 345, in _as_node_ptr
+ assert elem_ptr.type.code == gdb.TYPE_CODE_PTR
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ AssertionError
+
+ This is because node_ptr is a typedef
+ (intrusive_list_base_iterator::pointer). Add a call to strip_typedefs
+ to get to the real type.
+
+ Enhance gdb.gdb/python-helper.exp with a test that would have caught
+ this bug.
+
+ Change-Id: I3eaca8de5ed06d05756ed979332b6a431e15b700
+ Approved-By: Andrew Burgess <aburgess@redhat.com>
+
+2024-07-19 Maciej W. Rozycki <macro@redhat.com>
+
+ MIPS/opcodes: Replace "y" microMIPS operand code with "x"
+ Replace the "y" microMIPS operand code, used with ALNV.PS only, with "x"
+ so as to make "y" available for microMIPS MT use.
+
+ MIPS/opcodes: Mark MT thread context move assembly idioms as aliases
+ A number of instructions in the regular MIPS opcode table are assembly
+ idioms for the MT thread context move MFTR and MTTR instructions, so
+ mark them as aliases accordingly. Add suitable test cases, which also
+ cover the PAUSE assembly idiom.
+
+ MIPS/opcodes: Mark PAUSE as an alias
+ PAUSE is an assembly idiom for 'sll $0,$0,5', so mark it as an alias in
+ the regular MIPS opcode table, matching the microMIPS opcode table. A
+ test case will be supplied separately.
+
+ MIPS/GAS/testsuite: Run the MT ASE test across architectures
+ Verify that MT ASE instructions assemble and disassemble correctly
+ across the compatible architectures.
+
+ MIPS/opcodes: Reorder coprocessor moves alphabetically
+ A number of coprocessor move encodings have been randomly sprinkled over
+ the regular MIPS and microMIPS opcode tables rather than where they'd be
+ expected following the alphabetic order. Fix the ordering, taking into
+ account precedence where it has to be observed for correct disassembly.
+ No functional change.
+
+ MIPS/opcodes: Make AL a shorthand for INSN2_ALIAS
+ Make AL a shorthand for INSN2_ALIAS with the regular MIPS and microMIPS
+ opcode tables, just as with the MIPS16 opcode table, and use it
+ throughout. No functional change.
+
+ MIPS/opcodes: Rename the AL membership shorthand to ALX
+ Make room for AL as a shorthand for INSN2_ALIAS with the regular MIPS
+ opcode table, just as with the MIPS16 opcode table. No functional
+ change.
+
+2024-07-19 YunQiang Su <yunqiang.su@cipunited.com>
+
+ MIPS/opcodes: Remove the regular MIPS "+t" operand code
+ The semantics of the regular MIPS "+t" operand code is exactly the same
+ as that of the "E" operand code, so replace the former with the latter
+ in the single MFTC0 instruction with implicit 'sel' == 0 encoding where
+ it's used, matching the encoding with explicit 'sel' as well as other
+ instructions.
+
+2024-07-19 Maciej W. Rozycki <macro@redhat.com>
+
+ MIPS/opcodes: Output thread context registers numerically with MFTR/MTTR
+ We print MFTR and MTTR instructions' thread context register operand in
+ disassembly using the ABI name the register number would correspond to
+ should the targeted register be a general-purpose register.
+
+ However in most cases it is wrong, because general-purpose registers are
+ only referred when the 'u' and 'sel' operands are 1 and 0 respectively.
+ And even in these cases the MFGPR and MTGPR aliases take precedence over
+ the corresponding generic instruction encodings, so you won't see the
+ valid case to normally trigger.
+
+ Conversely decoding the thread context register operand numerically is
+ always valid, so switch to using it. Adjust test coverage accordingly.
+
+2024-07-19 Maciej W. Rozycki <macro@redhat.com>
+
+ MIPS/opcodes: Discard unused OP_SH, OP_MASK, and OP_OP macros
+ As from commit ab90248154ba ("Add structures to describe MIPS
+ operands"), <https://sourceware.org/ml/binutils/2013-07/msg00135.html>,
+ the use of numerous regular MIPS and microMIPS OP_SH and OP_MASK macros
+ has been removed.
+
+ Similarly as from commit c3c0747817f4 ("Use operand structures for
+ MIPS16"), <https://sourceware.org/ml/binutils/2013-07/msg00136.html>,
+ the use of numerous MIPS16 OP_SH and OP_MASK macros has been removed.
+
+ And as from commit 9e12b7a2b022 ("Rewrite main mips_ip parsing loop"),
+ <https://sourceware.org/ml/binutils/2013-07/msg00139.html>, none of the
+ OP_OP macros are used anymore.
+
+ Discard all the unused macros then and only keep the small subset that
+ is still referred. This simplifies maintenance and removes the need to
+ keep the artificial arrangement where some regular MIPS and microMIPS
+ macros expand to 0 and are kept for compatibility with the opposite ISA
+ mode only, as it used to be required before the commit referred.
+
+2024-07-19 Maciej W. Rozycki <macro@redhat.com>
+
+ MIPS/opcodes: Correct documentation for R6 operand types
+ The "-t", "-u", "-v", and "-w" operand types refer 'rt' operand, which
+ is the target register rather than the source register. Additionally
+ the "-x" and "-y" R6 operand types refer 'rs' rather than 'rt' operand
+ of the BOVC/BNVC and the BEQC/BNEC instructions respectively. Also the
+ "-x" operand type does not permit 'rs' to be the same as 'rt'.
+
+ Correct inline documentation in opcode/mips.h accordingly.
+
+2024-07-19 Maciej W. Rozycki <macro@redhat.com>
+
+ MIPS/opcodes: Exclude $0 from "-x" R6 operand type
+ The "-x" operand type is used for the reverse encoding of the BOVC and
+ BNVC instructions, where 'rs' and 'rt' have been supplied as the second
+ and the first operand respectively rather than the order the instruction
+ expects.
+
+ In this case we require the register associated with the "-x" operand to
+ have a higher number than the register associated with the preceding "t"
+ operand, which precludes the use of $0. The case where 'rs' and 'rt'
+ both refer to the same register is handled by the straight encoding of
+ the BOVC and BNVC instructions, which come in the opcode table ahead of
+ the corresponding reverse encoding.
+
+ Therefore clear the ZERO_OK flag for the "-x" operand. No need for an
+ extra test case as the encodings involved are already covered by "r6"
+ and its associated GAS tests.
+
+2024-07-19 Jan Beulich <jbeulich@suse.com>
+
+ Sparc: relax gas testsuite whitespace expectations
+ In a subsequent change the scrubber is going to be changed to retain
+ further whitespace. Test case expectations generally would better not
+ depend on the specific whitespace treatment by the scrubber, unless of
+ course a test is specifically about it. Adjust relevant test cases to
+ permit blanks where those will subsequently appear.
+
+ TilePro: correct macro use in gas testsuite
+ Whitespace in macro arguments either needs quoting / parenthesizing to
+ reliably not be mistaken for an argument separator, or respective macro
+ parameters need to be marked as covering all remaining arguments. The
+ latter appears more appropriate (and far less intrusive) here.
+
+ MIPS: correct macro use in gas and ld testsuites
+ Whitespace in macro arguments either needs quoting / parenthesizing to
+ reliably not be mistaken for an argument separator, or respective macro
+ parameters need to be marked as covering all remaining arguments. The
+ former appears more appropriate here, as the macro parameters already
+ have ":req".
+
+ ia64: correct macro use in gas testsuite
+ Whitespace in macro arguments either needs quoting / parenthesizing to
+ reliably not be mistaken for an argument separator, or respective macro
+ parameters need to be marked as covering all remaining arguments. The
+ latter appears more appropriate here.
+
+ bfin: drop _ASSIGN_BANG
+ A few testcases demonstrate that "=!" isn't supposed to be an
+ individual token, since "= !" is used in a number of places. So far
+ lexing that to a single token worked because of the scrubber being
+ overly aggressive in removing whitespace. As that's going to change,
+ replace uses by separate ASSIGN and BANG.
+
+ bfin: correct macro use in gas testsuite
+ Whitespace in macro arguments either needs quoting / parenthesizing to
+ reliably not be mistaken for an argument separator, or respective macro
+ parameters need to be marked as covering all remaining arguments. The
+ latter really isn't an option here.
+
+ Arm: correct macro use in gas testsuite
+ The way the inner macro invocations are written doesn't quite work as
+ expected (and would actually break subsequently): Due to overly
+ aggressive removal of whitespace by the scrubber, the incoming \sym and
+ \offset arguments actually get concatenated; an empty 3rd argument is
+ being passed to ldrtest2. That just so happened to work as intended; any
+ use of \offset alone would have exposed the problem. Quote the 3rd
+ argument, thus retaining enough whitespace to be independent of scrubber
+ internals.
+
+ gas: adjust impossible/bogus M68K/MRI special case when scrubbing
+ State 1 is uniformly handled further up. And it is highly questionable
+ that in state 10 (i.e. after having seen not only a possible label, but
+ also an opcode), which is about to go away anyway, a line comment char
+ could still be meant to take effect. With the state checking dropped,
+ the immediately preceding logic can then also be simplified.
+
+2024-07-19 Jan Beulich <jbeulich@suse.com>
+
+ gas: consistently drop trailing whitespace when scrubbing
+ From especially the checks for the two separator forms it appears to
+ follow that the construct being touched is about trailing whitespace. In
+ such a case, considering that for many targets ordinary and line comment
+ chars overlap, take into account that line comment chars override
+ ordinary ones in lex[] (logic elsewhere in do_scrub_chars() actually
+ depends on that ordering, and also accounts for this overriding).
+
+ Plus of course IS_NEWLINE() would better also be consulted. Note also
+ that the DOUBLESLASH_LINE_COMMENTS change should generally have no
+ effect just yet; it's a prereq for a later change but better fits here.
+
+ Leave respective comments as well, and update documentation to correct
+ which comment form is actually replaced by a single blank (i.e. neither
+ the ones starting with what {,tc_}comment_chars[] has nor the ones
+ starting with what line_comment_chars[] has).
+
+2024-07-19 Jan Beulich <jbeulich@suse.com>
+
+ gas: drop tic6x scrubber special case
+ Two successive PUT() without a state change in between can't be right:
+ The first PUT() may take the "goto tofull" path, leading to the
+ subsequent character being processed later in the previously set state
+ (1 in this case), rather than the state we were in upon entry to the
+ switch() (13 in this case).
+
+ However, the original purpose of that logic appears to be to not mistake
+ "|| ^" for "||^". This effect, sadly, looks to not have been achieved.
+ Therefore drop the special case altogether; something that actually
+ achieves the (presumably) intended effect may then be introduced down
+ the road.
+
+2024-07-19 Jan Beulich <jbeulich@suse.com>
+
+ gas: pre-init the scrubber's lex[]
+ While we can't - unlike an old comment suggests - do this fully, we can
+ certainly do part of this at compile time.
+
+ Since it's adjacent, also drop the unnecessary forward declaration of
+ process_escape().
+
+2024-07-19 Jan Beulich <jbeulich@suse.com>
+
+ x86: accept whitespace inside curly braces
+ Other than documented /**/ comments currently aren't really converted to
+ a single space, at least not for x86 in its most common configurations.
+ That'll be fixed subsequently, at which point blanks may appear where so
+ far none were expected. Furthermore not permitting blanks immediately
+ inside curly braces wasn't quite logical anyway - such constructs are
+ composite ones, and hence components ought to have been permitted to be
+ separated by whitespace from the very beginning.
+
+ With this we also don't care anymore whether the scrubber would remove
+ whitespace around curly braces, so move them from extra_symbol_chars[]
+ to operand_special_chars[].
+
+ Note: The new testcase doesn't actually exercise much (if any) of the
+ added code. It is being put in place to ensure that subsequently, when
+ that code actually comes into play, behavior remains the same.
+
+2024-07-19 Jan Beulich <jbeulich@suse.com>
+
+ x86: undo '{' being a symbol-start character
+ Having it that way has undue side effects, in permitting not only
+ pseudo-prefixes to be parsed correctly, but also permitting odd symbol
+ names which ought to be possible only when quoted. Borrow what other
+ architectures do: Put in place an "unrecognized line" hook to parse off
+ any pseudo prefixes, while using the "start of line" hook to reject ones
+ not actually followed by an insn. For that parsing re-use parse_insn()
+ in yet a slightly different mode (dealing with only pseudo-prefixes).
+
+ With that, pp may no longer be cleared from init_globals(), but instead
+ needs clearing after a line was fully processed. Since md_assemble() has
+ pretty many return paths, convert that into a local helper, with a
+ trivial wrapper around it.
+
+ Similarly pp may no longer be updated (by check_register()) when
+ processing anything other than insn operands. To be able to (easily)
+ recognize the case, clear current_templates.start when done with an insn
+ (or with .insn).
+
+2024-07-19 Jan Beulich <jbeulich@suse.com>
+
+ x86: split pseudo-prefix state from i386_insn
+ Subsequently we will want to update that ahead of md_assemble(), with
+ that function needing to take into account such earlier updating.
+ Therefore it'll want resetting separately from i.
+
+2024-07-19 Jan Beulich <jbeulich@suse.com>
+
+ x86/APX: add CMPcc/CTESTcc cases to noreg64 tests
+ This was missed when support for the insns was added. Just like for
+ DATA16, in
+
+ rex64 neg (%rax)
+ rex64 neg (%r16)
+ rex64 {nf} neg (%rax)
+
+ it is not logical why the last one shouldn't be permitted. Bypassing
+ that check requires other adjustments, though, to actually properly
+ consume (and then squash) the prefix.
+
+2024-07-19 zhangxianting <zhangxianting@uniontech.com>
+
+ bfin: free the allocated memory
+
+2024-07-19 Maciej W. Rozycki <macro@redhat.com>
+
+ MIPS/GAS/testsuite: Also verify trap expansions of multiplication macros
+ Provide 'mul' test variants for trap expansions as requested by the
+ '-trap' command-line option, and run them across all the compatible
+ architectures.
+
+ MIPS/GAS/testsuite: Split mul test into 32-bit and 64-bit parts
+ Enable full 32-bit and 64-bit multiplication macro verification, by
+ splitting the 'mul' test into two parts respectively, and run them
+ across all the compatible architectures.
+
+2024-07-19 Maciej W. Rozycki <macro@redhat.com>
+
+ MIPS/GAS/testsuite: Run the mul macro test across architectures
+ The multiplication macros expand differently based on the ISA chosen, so
+ run the 'mul' macro test across compatible architectures, adopting the
+ 'mul-ilocks' test orphaned by commit 23fce1e31156 ("MIPS16 intermix test
+ failure"), <https://sourceware.org/ml/binutils/2009-01/msg00335.html>,
+ and providing coverage for the expansion variants.
+
+ Only run from MIPS III up for now and remove the ISA override from the
+ source, so that the 64-bit instructions are covered for individual
+ 64-bit architectures.
+
+2024-07-19 Maciej W. Rozycki <macro@redhat.com>
+
+ MIPS/GAS/testsuite: Also verify trap expansions of division macros
+ Provide 'div' test variants for trap expansions as requested by the
+ '-trap' command-line option, and run them across all the compatible
+ architectures.
+
+ MIPS/GAS/testsuite: Split div test into 32-bit and 64-bit parts
+ Enable full 32-bit and 64-bit division macro verification, by splitting
+ the 'div' test into two parts respectively, and run them across all the
+ compatible architectures.
+
+2024-07-19 Maciej W. Rozycki <macro@redhat.com>
+
+ MIPS/GAS/testsuite: Run the div macro test across architectures
+ The division macros expand differently depending on the ISA selected, so
+ run the 'div' macro test across compatible architectures, adopting the
+ 'div-ilocks' test orphaned by commit 23fce1e31156 ("MIPS16 intermix test
+ failure"), <https://sourceware.org/ml/binutils/2009-01/msg00335.html>,
+ and providing coverage for the expansion variants.
+
+ Only run from MIPS III up for now and remove the ISA override from the
+ source, so that the 64-bit instructions are covered for individual
+ 64-bit architectures.
+
+2024-07-19 Maciej W. Rozycki <macro@redhat.com>
+
+ MIPS/GAS: Handle --trap command-line option dynamically
+ We have an ISA check for the '--trap' command-line option that reports
+ its incompatibility with the MIPS I architecture. It doesn't prevent
+ trap instructions from being enabled though, so when attempt is made to
+ emit one in an expansion of one of the division or multiplication macros
+ an assertion failure triggers:
+
+ .../gas/testsuite/gas/mips/brtr-opt.s: Assembler messages:
+ .../gas/testsuite/gas/mips/brtr-opt.s:3: Error: trap exception not supported at ISA 1
+ .../gas/testsuite/gas/mips/brtr-opt.s:9: Warning: divide by zero
+ .../gas/testsuite/gas/mips/brtr-opt.s:9: Internal error in macro_build at .../gas/config/tc-mips.c:9064.
+ Please report this bug.
+
+ The same assertion failure triggers without an earlier error message
+ when the initial ISA is compatible with the '--trap', however at the
+ time an attempt is made to emit a trap instruction from a division or
+ multiplication macro the ISA has been changed by a '.set' pseudo-op to
+ an incompatible one.
+
+ With the way the situations are mishandled it seems unlikely that anyone
+ relies on the current semantics and a sane approach is to decide on the
+ fly according to the currently selected ISA as to whether to emit trap
+ or breakpoint instructions in the case where '--trap' has been used.
+
+ Change our code to do so then and clarify that in the manual, which is
+ not explicit about how '--trap' is handled with a changing ISA. Mention
+ the change in NEWS too since it's a applies to a user option.
+
+2024-07-19 Maciej W. Rozycki <macro@redhat.com>
+
+ MIPS/GAS/testsuite: Add R10000 CPU architecture
+ Add a fully interlocked MIPS IV CPU so that we can have coverage for
+ MIPS IV instruction sequences with and without instruction separation
+ required for a HI/LO data anti-dependency.
+
+ MIPS/GAS/testsuite: Reorder R5900 CPU architecture definition
+ The R5900 CPU architecture is based on MIPS III, so move it ahead of
+ MIPS IV CPU architecture definitions. No functional change.
+
+2024-07-19 Indu Bhagat <indu.bhagat@oracle.com>
+
+ gas: aarch64: testsuite: add new tests for SCFI
+ Similar to the x86_64 testcases, some .s files contain the corresponding
+ CFI directives. This helps in validating the synthesized CFI by running
+ those tests with and without the --scfi=experimental command line
+ option.
+
+ GAS issues some diagnostics, enabled by default, with
+ --scfi=experimental. The diagnostics have been added with an intent to
+ help user correct inadvertent errors in their hand-written asm. An
+ error is issued when GAS finds that input asm is not amenable to
+ accurate CFI synthesis. The existing scfi-diag-*.s tests in the
+ gas/testsuite/gas/scfi/x86_64 directory test some SCFI diagnostics
+ already:
+
+ - (#1) "Warning: SCFI: Asymetrical register restore"
+ - (#2) "Error: SCFI: usage of REG_FP as scratch not supported"
+ - (#3) "Error: SCFI: unsupported stack manipulation pattern"
+ - (#4) "Error: untraceable control flow for func 'XXX'"
+
+ In the newly added aarch64 testsuite, further tests for additional
+ diagnostics have been added:
+ - scfi-diag-1.s in this patch highlights an aarch64-specific diagnostic:
+ (#5) "Warning: SCFI: ignored probable save/restore op with reg offset"
+
+ Additionally, some testcases are added to showcase the (currently)
+ unsupported patterns, e.g., scfi-unsupported-1.s
+ mov x16, 4384
+ sub sp, sp, x16
+
+ gas/testsuite/:
+ * gas/scfi/README: Update comment to include aarch64.
+ * gas/scfi/aarch64/scfi-aarch64.exp: New file.
+ * gas/scfi/aarch64/ginsn-arith-1.l: New test.
+ * gas/scfi/aarch64/ginsn-arith-1.s: New test.
+ * gas/scfi/aarch64/ginsn-cofi-1.l: New test.
+ * gas/scfi/aarch64/ginsn-cofi-1.s: New test.
+ * gas/scfi/aarch64/ginsn-ldst-1.l: New test.
+ * gas/scfi/aarch64/ginsn-ldst-1.s: New test.
+ * gas/scfi/aarch64/scfi-callee-saved-fp-1.d: New test.
+ * gas/scfi/aarch64/scfi-callee-saved-fp-1.l: New test.
+ * gas/scfi/aarch64/scfi-callee-saved-fp-1.s: New test.
+ * gas/scfi/aarch64/scfi-callee-saved-fp-2.d: New test.
+ * gas/scfi/aarch64/scfi-callee-saved-fp-2.l: New test.
+ * gas/scfi/aarch64/scfi-callee-saved-fp-2.s: New test.
+ * gas/scfi/aarch64/scfi-cb-1.d: New test.
+ * gas/scfi/aarch64/scfi-cb-1.l: New test.
+ * gas/scfi/aarch64/scfi-cb-1.s: New test.
+ * gas/scfi/aarch64/scfi-cfg-1.d: New test.
+ * gas/scfi/aarch64/scfi-cfg-1.l: New test.
+ * gas/scfi/aarch64/scfi-cfg-1.s: New test.
+ * gas/scfi/aarch64/scfi-cfg-2.d: New test.
+ * gas/scfi/aarch64/scfi-cfg-2.l: New test.
+ * gas/scfi/aarch64/scfi-cfg-2.s: New test.
+ * gas/scfi/aarch64/scfi-cfg-3.d: New test.
+ * gas/scfi/aarch64/scfi-cfg-3.l: New test.
+ * gas/scfi/aarch64/scfi-cfg-3.s: New test.
+ * gas/scfi/aarch64/scfi-cfg-4.l: New test.
+ * gas/scfi/aarch64/scfi-cfg-4.s: New test.
+ * gas/scfi/aarch64/scfi-cond-br-1.d: New test.
+ * gas/scfi/aarch64/scfi-cond-br-1.l: New test.
+ * gas/scfi/aarch64/scfi-cond-br-1.s: New test.
+ * gas/scfi/aarch64/scfi-diag-1.l: New test.
+ * gas/scfi/aarch64/scfi-diag-1.s: New test.
+ * gas/scfi/aarch64/scfi-diag-2.l: New test.
+ * gas/scfi/aarch64/scfi-diag-2.s: New test.
+ * gas/scfi/aarch64/scfi-diag-3.l: New test.
+ * gas/scfi/aarch64/scfi-diag-3.s: New test.
+ * gas/scfi/aarch64/scfi-ldrp-1.d: New test.
+ * gas/scfi/aarch64/scfi-ldrp-1.l: New test.
+ * gas/scfi/aarch64/scfi-ldrp-1.s: New test.
+ * gas/scfi/aarch64/scfi-ldrp-2.d: New test.
+ * gas/scfi/aarch64/scfi-ldrp-2.l: New test.
+ * gas/scfi/aarch64/scfi-ldrp-2.s: New test.
+ * gas/scfi/aarch64/scfi-ldstnap-1.d: New test.
+ * gas/scfi/aarch64/scfi-ldstnap-1.l: New test.
+ * gas/scfi/aarch64/scfi-ldstnap-1.s: New test.
+ * gas/scfi/aarch64/scfi-strp-1.d: New test.
+ * gas/scfi/aarch64/scfi-strp-1.l: New test.
+ * gas/scfi/aarch64/scfi-strp-1.s: New test.
+ * gas/scfi/aarch64/scfi-strp-2.d: New test.
+ * gas/scfi/aarch64/scfi-strp-2.l: New test.
+ * gas/scfi/aarch64/scfi-strp-2.s: New test.
+ * gas/scfi/aarch64/scfi-unsupported-1.l: New test.
+ * gas/scfi/aarch64/scfi-unsupported-1.s: New test.
+ * gas/scfi/aarch64/scfi-unsupported-2.l: New test.
+ * gas/scfi/aarch64/scfi-unsupported-2.s: New test.
+
+2024-07-19 Indu Bhagat <indu.bhagat@oracle.com>
+
+ gas: aarch64: add experimental support for SCFI
+ For synthesizing CFI (SCFI) for hand-written asm, the SCFI machinery in
+ GAS works on the generic GAS insns (ginsns). This patch adds support in
+ the aarch64 backend to create ginsns for a subset of the supported
+ machine instructions. The subset includes the minimal necessary
+ instructions to ensure SCFI correctness:
+
+ - Any potential register saves and unsaves. Hence, process instructions
+ belonging to a variety of iclasses involving str, ldr, stp, ldp.
+ - Any change of flow instructions. This includes all conditional and
+ unconditional branches, call (bl, blr, etc.) and return.
+ - Most importantly, any instruction that could affect the two registers
+ of interest: REG_SP, REG_FP. This set includes all pre-indexed and
+ post-indexed memory operations, with writeback, on the stack. This
+ set must also include other instructions (e.g., arithmetic insns)
+ where the destination register is one of the afore-mentioned registers.
+
+ With respect to callee-saved registers in Aarch64, FP/Advanced SIMD
+ registers D8-D15 are included along with the relevant GPRs. Calculating
+ offsets for loads and stores especially for Q registers needs special
+ attention here.
+
+ As an example,
+ str q8, [sp, #16]
+ On big-endian:
+ STR Qn stores as a 128-bit integer (MSB first), hence, should record
+ D8 as being saved at sp+24 rather than sp+16.
+ On little-endian:
+ should record D8 as being saved at sp+16
+
+ D8-D15 are the low 64 bits of Q8-Q15, and of Z8-Z15 if SVE is used;
+ hence, they remain "interesting" for SCFI purposes in such cases. A CFI
+ save slot always represents the low 64 bits, regardless of whether a
+ save occurs on D, Q or Z registers. Currently, the ginsn creation
+ machinery can handle D and Q registers on little-endian and big-endian.
+
+ Apart from creating ginsn, another key responsibility of the backend is
+ to make sure there are safeguards in place to detect and alert if an
+ instruction of interest may have been skipped. This is done via
+ aarch64_ginsn_unhandled () (similar to the x86 backend). This function
+ , hence, is also intended to alert when future ISA changes may otherwise
+ render SCFI results incorrect, because of missing ginsns for the newly
+ added machine instructions.
+
+ At this time, becuase of the complexities wrt endianness in handling Z
+ register usage, skip sve_misc opclass altogether for now. The SCFI
+ machinery will error out (using the aarch64_ginsn_unhandled () code
+ path) though if Z register usage affects correctness.
+
+ The current SCFI machinery does not currently synthesize the
+ PAC-related, aarch64-specific CFI directives: .cfi_b_key_frame. The
+ support for this is planned for near future.
+
+ SCFI is enabled for ELF targets only.
+
+ gas/
+ * config/tc-aarch64-ginsn.c: New file.
+ * config/tc-aarch64.c (md_assemble): Include tc-aarch64-ginsn.c
+ file. Invoke aarch64_ginsn_new.
+ * config/tc-aarch64.h (TARGET_USE_GINSN): Define for SCFI
+ enablement.
+ (TARGET_USE_SCFI): Likewise.
+ (SCFI_MAX_REG_ID): New definition.
+ (REG_FP): Likewise.
+ (REG_LR): Likewise.
+ (REG_SP): Likewise.
+ (SCFI_INIT_CFA_OFFSET): Likewise.
+ (SCFI_CALLEE_SAVED_REG_P): Likewise.
+ (aarch64_scfi_callee_saved_p): New declaration.
+
+2024-07-19 Indu Bhagat <indu.bhagat@oracle.com>
+
+ opcodes: aarch64: enforce checks on subclass flags in aarch64-gen.c
+ Enforce some checks on the newly added subclass flags:
+ - If a subclass is set of one insn of an iclass, every insn of that
+ iclass must have non-zero subclass field.
+ - For all other iclasses, the subclass bits are zero for all insns.
+
+ include/
+ * opcode/aarch64.h (enum aarch64_insn_class): Identify the
+ maximum iclass enum value.
+
+ opcodes/
+ * aarch64-gen.c (iclass_has_subclasses_p): New array of bool.
+ (read_table): Enforce checks on subclass flags.
+
+2024-07-19 Indu Bhagat <indu.bhagat@oracle.com>
+
+ opcodes: aarch64: denote subclasses for insns of iclass dp_2src
+ For detecting irg, add a subclass to identify it in the set of
+ instructions of iclass dp_2src.
+
+ opcodes/
+ * aarch64-tbl.h: Add subclass flag F_DP_TAG_ONLY for irg insn.
+
+2024-07-19 Indu Bhagat <indu.bhagat@oracle.com>
+
+ opcodes: aarch64: add flags to denote subclasses of uncond branches
+ Use the two new subclass flags: F_BRANCH_CALL, F_BRANCH_RET, to indicate
+ call to and return from subroutine respectively.
+
+ opcodes/
+ * aarch64-tbl.h: Use the new F_BRANCH_* flags.
+
+2024-07-19 Indu Bhagat <indu.bhagat@oracle.com>
+
+ opcodes: aarch64: add flags to denote subclasses of arithmetic insns
+ Use the three new subclass flags: F_ARITH_ADD, F_ARITH_SUB,
+ F_ARITH_MOV, to indicate add, sub and mov ops respectively.
+
+ These flags for subclasses will later be used for SCFI purposes to
+ create appropriate ginsns. At this time, only those iclasses relevant
+ to SCFI have the new subclass flags specified.
+
+ For addg and subg insns, F_SUBCLASS_OTHER is more suitable because these
+ operations do more than just simple add or sub.
+
+ opcodes/
+ * aarch64-tbl.h: Use the new F_ARITH_* flags.
+
+2024-07-19 Indu Bhagat <indu.bhagat@oracle.com>
+
+ opcodes: aarch64: add flags to denote subclasses of ldst insns
+ The existing iclass information tells us the general shape and purpose
+ of the instructions. In some cases, however, we need to further disect
+ the iclass on the basis of other finer-grain information. E.g., for the
+ purpose of SCFI, we need to know whether a given insn with iclass
+ of ldst_* is a load or a store.
+
+ At the moment, specify subclasses for only those iclasses relevant to
+ SCFI: ldst_imm9, ldst_pos, ldstpair_indexed, ldstpair_off and
+ ldstnapair_offs.
+
+ Some insns are best tagged with F_SUBCLASS_OTHER rather than F_LDST_LOAD
+ or F_LDST_STORE:
+ - stg* ops (as they store tag only),
+ - prfm,
+ - ldpsw, ldrsw (32-bit loads with signed extended value. Not useful
+ for restore operations in context of SCFI.)
+ - Use F_SUBCLASS_OTHER for all QL_LDST_R8 and QL_LDST_R16 operands.
+ Also use F_SUBLASS_OTHER for strb/ldrb, strh/ldrh opcodes.
+ These are not full loads and stores and cannot be allowed for
+ register save / restore for the purpose of SCFI.
+
+ opcodes/
+ * aarch64-tbl.h: Use the new F_LDST_* flags.
+
+2024-07-19 Indu Bhagat <indu.bhagat@oracle.com>
+
+ include: opcodes: aarch64: define new subclasses
+ The existing iclass information tells us the general shape and purpose
+ of the instructions. In some cases, however, we need to further disect
+ the iclass on the basis of other finer-grain information. E.g., for the
+ purpose of SCFI, we need to know whether a given insn with iclass of
+ ldst_* is a load or a store. Similarly, whether a particular arithmetic
+ insn is an add or sub or mov, etc.
+
+ This patch defines new flags to demarcate the insns. Also provide an
+ access function for subclass lookup.
+
+ Later, we will enforce (in aarch64-gen.c) that if an iclass has at least
+ one instruction with a non-zero subclass, all instructions of the iclass
+ must have a non-zero subclass information. If none of the defined
+ subclasses are applicable (or not required for SCFI purposes),
+ F_SUBCLASS_OTHER can be used for such instructions.
+
+ include/
+ * opcode/aarch64.h (F_SUBCLASS): New flag.
+ (F_SUBCLASS_OTHER): Likewise.
+ (F_LDST_LOAD): Likewise.
+ (F_LDST_STORE): Likewise.
+ (F_ARITH_ADD): Likewise.
+ (F_ARITH_SUB): Likewise.
+ (F_ARITH_MOV): Likewise.
+ (F_BRANCH_CALL): Likewise.
+ (F_BRANCH_RET): Likewise.
+ (F_DP_TAG_ONLY): Likewise.
+ (aarch64_opcode_subclass_p): New definition.
+
+2024-07-19 Indu Bhagat <indu.bhagat@oracle.com>
+
+ gas: scfi: make scfi_state_restore_reg function more precise
+ When the SCFI machinery detects that a register has been restored from
+ stack, it makes some state changes in the SCFI state object.
+
+ Prior to the patch, scfi_state_restore_reg () was setting a value of
+ (reg, CFI_IN_REG) for (base, state) respectively. This was causing
+ issues in the cmp_scfi_state () function:
+ - The default state of all (callee-saved) regs at the beginning of
+ function is set to (0, CFI_UNDEFINED).
+ - If a register is saved and restored on some control path, the state
+ of reg is (reg, CFI_IN_REG) on that path.
+ - On another control path where the register was perhaps not
+ used (or saved/restored on stack) remains (0, CFI_UNDEFINED).
+ - The two states should be treated equal, however, at the point in
+ program after the register has been restored.
+
+ Fix this by resetting the state to (0, CFI_UNDEFINED) in
+ scfi_state_restore_reg ().
+
+ A testcase (scfi-cfg-4.s) for this is added in a subsequent commit.
+
+ gas/
+ * scfi.c (scfi_state_restore_reg): Reset to 0, CFI_UNDEFINED
+ for base, state.
+
+2024-07-19 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2024-07-18 Matthieu Longo <matthieu.longo@arm.com>
+
+ gas: minor reformatting in command line help and doc
+ - help message: add a comma between the short and long option
+ - as doc:
+ - brief summary of how to invoke gas: separate [-w] [-x] on a new line as those
+ two options have nothing to do with the warning options.
+ - reordering of the warning options to have the same order as the listing.
+ - no-warn option description: change an "and" to a "or", as it is either the short
+ or long option to use, but not both at the same time.
+ - remove trailing whitespaces.
+
+2024-07-18 Andrew Burgess <aburgess@redhat.com>
+
+ gdb: check for multiple matching build-id files
+ Within the debug-file-directory GDB looks for the existence of a
+ .build-id directory.
+
+ Within the .build-id directory GDB looks for files with the form:
+
+ .build-id/ff/4b4142d62b399499844924d53e33d4028380db.debug
+
+ which contain the debug information for the objfile with the build-id
+ ff4b4142d62b399499844924d53e33d4028380db.
+
+ There appear to be two strategies for populating the .build-id
+ directory. Ubuntu takes the approach of placing the actual debug
+ information in this directory, so
+ 4b4142d62b399499844924d53e33d4028380db.debug is an actual file
+ containing the debug information.
+
+ Fedora, RHEL, and SUSE take a slightly different approach, placing the
+ debug information elsewhere, and then creating symlinks in the
+ .build-id directory back to the original debug information file. The
+ actual debug information is arranged in a mirror of the filesystem
+ within the debug directory, as an example, if the debug-file-directory
+ is /usr/lib/debug, then the debug information for /bin/foo can be
+ found in /usr/lib/debug/bin/foo.debug.
+
+ Where this gets interesting is that in some cases a package will
+ install a single binary with multiple names, in this case a single
+ binary will be install with either hard-links, or symlinks providing
+ the alternative names.
+
+ The debug information for these multiple binaries will then be placed
+ into the /usr/lib/debug/ tree, and again, links are created so a
+ single file can provide debug information for each of the names that
+ binary presents as. An example file system might look like this (the
+ [link] could be symlinks, but are more likely hard-links):
+
+ /bin/
+ foo
+ bar -> foo [ HARD LINK ]
+ baz -> foo [ HARD LINK ]
+ /usr/
+ lib/
+ debug/
+ bin/
+ foo.debug
+ bar.debug -> foo.debug [ HARD LINK ]
+ baz.debug -> foo.debug [ HARD LINK ]
+
+ In the .build-id tree though we have a problem. Do we have a single
+ entry that links to one of the .debug files? This would work; a user
+ debugging any of the binaries will find the debug information based on
+ the build-id, and will get the correct information, after all the
+ .debug files are identical (same file linked together). But there is
+ one problem with this approach.
+
+ Sometimes, for *reasons* it's possible that one or more the linked
+ binaries might get removed, along with its associated debug
+ information. I'm honestly not 100% certain under what circumstances
+ this can happen, but what I observe is that sometime a single name for
+ a binary, and its corresponding .debug entry, can be missing. If this
+ happens to be the entry that the .build-id link is pointing at, then
+ we have a problem. The user can no longer find the debug information
+ based on the .build-id link.
+
+ The solution that Fedora, RHEL, & SUSE have adopted is to add multiple
+ entries in the .build-id tree, with each entry pointing to a different
+ name within the debug/ tree, a sequence number is added to the
+ build-id to distinguish the multiple entries. Thus, we might end up
+ with a layout like this:
+
+ /bin/
+ foo
+ bar -> foo [ HARD LINK ]
+ baz -> foo [ HARD LINK ]
+ /usr/
+ lib/
+ debug/
+ bin/
+ foo.debug
+ bar.debug -> foo.debug [ HARD LINK ]
+ baz.debug -> foo.debug [ HARD LINK ]
+ .build-id/
+ a3/
+ 4b4142d62b399499844924d53e33d4028380db.debug -> ../../debug/bin/foo.debug [ SYMLINK ]
+ 4b4142d62b399499844924d53e33d4028380db.1.debug -> ../../debug/bin/bar.debug [ SYMLINK ]
+ 4b4142d62b399499844924d53e33d4028380db.2.debug -> ../../debug/bin/baz.debug [ SYMLINK ]
+
+ With current master GDB, debug information will only ever be looked up
+ via the 4b4142d62b399499844924d53e33d4028380db.debug link. But if
+ 'foo' and its corresponding 'foo.debug' are ever removed, then master
+ GDB will fail to find the debug information.
+
+ Ubuntu seems to have a much better approach for debug information
+ handling; they place the debug information directly into the .build-id
+ tree, so there only ever needs to be a single entry for any one
+ build-id. I wonder if/how they handle the case where multiple names
+ might share a single .debug file, if one of those names is then
+ uninstalled, how do they know the .debug file should be retained or
+ not ... but I assume that problem either doesn't exist or has been
+ solved.
+
+ Anyway, for a while Fedora has carried a patch that handles the
+ build-id sequence number logic. What's presented here is inspired by
+ the Fedora patch, but has some changes to fix some issues.
+
+ I'm aware that this is a patch that applies to only some (probably a
+ minority) of distros. However, the logic is contained to only a
+ single function in build-id.c, and isn't too complex, so I'm hoping
+ that there wont be too many objections.
+
+ For distros that don't have build-id sequence numbers there should be
+ no impact. The sequence number approach still leaves the first file
+ without a sequence number, and this is the first file that GDB (after
+ this patch) checks for. The new logic only kicks in if the
+ non-sequence numbered first file exists, but is a symlink to a non
+ existent file; in this case GDB checks for the sequence numbered files
+ instead.
+
+ Tests are included.
+
+ There is a small fix needed for gdb.base/sysroot-debug-lookup.exp,
+ after this commit GDB now treats a target: sysroot where the target
+ file system is local to GDB the same as if the sysroot had no target:
+ prefix. The consequence of this is that GDB now resolves a symlink
+ back to the real filename in the sysroot-debug-lookup.exp test where
+ it didn't previously. As this behaviour is inline with the case where
+ there is no target: prefix I think this is fine.
+
+2024-07-18 Andrew Burgess <aburgess@redhat.com>
+
+ gdbserver: add gdbserver support for vFile::stat packet
+ After the previous two commits, this commit adds support for the
+ vFile::stat packet to gdbserver. This is pretty similar to the
+ handling for vFile::fstat, but instead calls 'lstat'.
+
+ There's still no users of target_fileio_stat in GDB, that will come in
+ a later commit.
+
+2024-07-18 Andrew Burgess <aburgess@redhat.com>
+
+ gdb: add GDB side target_ops::fileio_stat implementation
+ This commit adds the GDB side of target_ops::fileio_stat. There's an
+ implementation for inf_child_target, which just calls 'lstat', and
+ there's an implementation for remote_target, which sends a new
+ vFile:stat packet.
+
+ The new packet is documented.
+
+ There's still no users of target_fileio_stat as I have not yet added
+ support for vFile::stat to gdbserver. If these packets are currently
+ sent to gdbserver then they will be reported as not supported and the
+ ENOSYS error code will be returned.
+
+ Reviewed-By: Eli Zaretskii <eliz@gnu.org>
+
+2024-07-18 Andrew Burgess <aburgess@redhat.com>
+
+ gdb: add target_fileio_stat, but no implementations yet
+ In a later commit I want target_fileio_stat, that is a call that
+ operates on a filename rather than an open file descriptor as
+ target_fileio_fstat does.
+
+ This commit adds the initial framework for target_fileio_stat, I've
+ added the top level target function and the virtual target_ops methods
+ in the target_ops base class.
+
+ At this point no actual targets override target_ops::fileio_stat, so
+ any attempts to call this function will return ENOSYS error code.
+
+2024-07-18 Cui, Lili <lili.cui@intel.com>
+
+ X86: Update gas/NEWS for Intel APX.
+ gas/ChangeLog:
+
+ * NEWS: Added "APX_F is fully supportted" to gas/NEWS.
+
+2024-07-18 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2024-07-17 Tom de Vries <tdevries@suse.de>
+
+ [gdb/testsuite] Fix gdb.arch/arm-pseudo-unwind.exp with unix/mthumb
+ When running test-case gdb.arch/arm-pseudo-unwind.exp with target board
+ unix/mthumb, we run into:
+ ...
+ (gdb) continue^M
+ Continuing.^M
+ ^M
+ Program received signal SIGILL, Illegal instruction.^M
+ 0x00400f38 in ?? ()^M
+ (gdb) FAIL: $exp: continue to breakpoint: continue to callee
+ ...
+
+ The test-case attempts to force arm-pseudo-unwind.c to be compiled in arm mode
+ using additional_flags=-marm, but that's overridden by using target board
+ unix/mthumb.
+
+ This causes function main to be in thumb mode, and consequently function
+ caller (which is called from main) is is executed as if it's in thumb mode,
+ while it's actually in arm mode.
+
+ Fix this by adding an intermediate function caller_trampoline in
+ arm-pseudo-unwind.c, and hardcoding it to arm mode using
+ __attribute__((target("arm"))).
+
+ Likewise for test-case gdb.arch/arm-pseudo-unwind-legacy.exp.
+
+ Tested on arm-linux.
+
+ Approved-By: Luis Machado <luis.machado@arm.com>
+
+2024-07-17 Indu Bhagat <indu.bhagat@oracle.com>
+
+ gas: scfi: testsuite: refresh the README
+ Update some stale text in the README. Add few more notes to guide
+ future maintenance of the testsuite.
+
+ gas/testsuite/
+ * gas/scfi/README: Update text.
+
+2024-07-17 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2024-07-16 Simon Marchi <simon.marchi@polymtl.ca>
+
+ gdb, gdbserver, gdbsupport: use [[noreturn]] instead of ATTRIBUTE_NORETURN
+ C++ 11 has a built-in attribute for this, no need to use a compat macro.
+
+ Change-Id: I90e4220d26e8f3949d91761f8a13cd9c37da3875
+ Reviewed-by: Lancelot Six <lancelot.six@amd.com>
+
+2024-07-16 Simon Marchi <simon.marchi@polymtl.ca>
+
+ gdb: fix indentation in remote.c
+ Change-Id: If344acdf703fdd3892f73f75fc891d5473808b79
+
+2024-07-16 Simon Marchi <simon.marchi@polymtl.ca>
+
+ gdb: add ATTRIBUTE_NORETURN to remote_unpush_target
+ My IDE (well, clangd) suggested this. It doesn't hurt to have it.
+
+ Change-Id: If6001983c17dbed3dceebac3078c8deb12c04d6b
+
+2024-07-16 Tom de Vries <tdevries@suse.de>
+
+ [gdb/testsuite] Simplify gdb.base/complex-parts.exp
+ I noticed a lot of escaping in test-case gdb.base/complex-parts.exp.
+
+ Make the test-case more readable by using:
+ - string_to_regexp, and
+ - {} instead of "".
+
+ Tested on x86_64-linux and aarch64-linux.
+
+2024-07-16 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2024-07-15 Simon Marchi <simon.marchi@efficios.com>
+
+ gdb: pass program space to overlay_invalidate_all
+ Make the current program space bubble up one level.
+
+ Change-Id: I5ac1e3290ad266730465cd60aa3672d45ffa6475
+
+2024-07-15 Simon Marchi <simon.marchi@polymtl.ca>
+
+ gdb: pass program space to objfile::make
+ Make the current program space reference bubble up one level.
+
+ Change-Id: Iee8b11c853c76e539c991c4785737c69e6a1925c
+ Approved-By: Tom Tromey <tom@tromey.com>
+ Reviewed-By: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
+
+2024-07-15 Simon Marchi <simon.marchi@polymtl.ca>
+
+ gdb: pass program space to objfile::objfile
+ Make the current program space reference bubble up one level.
+
+ Change-Id: I81e45e89e0cfd87c308f801d49ae811a941348b7
+ Approved-By: Tom Tromey <tom@tromey.com>
+ Reviewed-By: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
+
+2024-07-15 Simon Marchi <simon.marchi@polymtl.ca>
+
+ gdb: pass program space to entry_point_address
+ Make the current program space reference bubble up one level.
+
+ Change-Id: Ifc9b8186abaefb10caf99f79ae09e526fa65c882
+ Approved-By: Tom Tromey <tom@tromey.com>
+ Reviewed-By: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
+
+2024-07-15 Simon Marchi <simon.marchi@polymtl.ca>
+
+ gdb: pass program space to entry_point_address_query
+ Make the current program space bubble up one level.
+
+ Change-Id: Ic3ad0869ca1afe41854f605a6f7eb092fca29ff8
+ Approved-By: Tom Tromey <tom@tromey.com>
+ Reviewed-By: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
+
+2024-07-15 Simon Marchi <simon.marchi@polymtl.ca>
+
+ gdb: pass program space to objfiles_changed
+ Make the current program space reference bubble up one level.
+
+ Change-Id: I9b33c9e0d22c171eb1bb59ce480621b02c7b7bf7
+ Approved-By: Tom Tromey <tom@tromey.com>
+ Reviewed-By: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
+
+2024-07-15 Simon Marchi <simon.marchi@polymtl.ca>
+
+ gdb: pass program space to get_current_source_symtab_and_line
+ Make the current program space reference bubble up one level.
+
+ Change-Id: I6ba6dc4a2cb188720cbb61b84ab5c954aac105c6
+ Approved-By: Tom Tromey <tom@tromey.com>
+ Reviewed-By: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
+
+2024-07-15 Simon Marchi <simon.marchi@polymtl.ca>
+
+ gdb: pass program space to have_{full,partial}_symbols
+ Make the current program space reference bubble up one level.
+
+ Change-Id: I19c4fc2ca955f9c828ef426a077b43983865697b
+ Approved-By: Tom Tromey <tom@tromey.com>
+ Reviewed-By: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
+
+2024-07-15 Simon Marchi <simon.marchi@polymtl.ca>
+
+ gdb: bool-ify a few functions in objfiles.{c,h}
+ Change return types to bool, and make a few stylistic adjustments.
+
+ Change-Id: I784c3c33af0394a77c25064b06eb3e128e69222f
+ Approved-By: Tom Tromey <tom@tromey.com>
+ Reviewed-By: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
+
+2024-07-15 Simon Marchi <simon.marchi@polymtl.ca>
+
+ gdb: pass program space to clear_current_source_symtab_and_line
+ Make the current program space reference bubble up one level.
+
+ Change-Id: I692554474d17e4f4708fd8ad662bf6c0bb964726
+ Approved-By: Tom Tromey <tom@tromey.com>
+ Reviewed-By: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
+
+2024-07-15 Simon Marchi <simon.marchi@polymtl.ca>
+
+ gdb: make `program_space::free_all_objfiles` use `this`
+ Use `this` instead of `current_program_space`. Presumably, the method
+ wants to check the solibs of "this" program space, not the current
+ global program space (although they are likely always the same at the
+ moment).
+
+ Change-Id: Iaf0534f36bfd47c04c53ed0657da332bdb8fb906
+ Approved-By: Tom Tromey <tom@tromey.com>
+ Reviewed-By: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
+
+2024-07-15 Simon Marchi <simon.marchi@polymtl.ca>
+
+ gdb: pass program space to no_shared_libraries
+ Make the current program space reference bubble up one level. Pass
+ `current_program_space` everywhere, except in some cases where we can
+ get the pspace another way, and it's relatively obvious that it's the
+ same as the current program space.
+
+ Change-Id: Id86b79f1e44f92a398f49d137d57457174dfa96d
+ Approved-By: Tom Tromey <tom@tromey.com>
+ Reviewed-By: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
+
+2024-07-15 Simon Marchi <simon.marchi@polymtl.ca>
+
+ gdb: split no_shared_libraries, command vs implementation
+ The `no_shared_libraries` function is currently used to implement the
+ `nosharedlibrary` command, but it also used internally by other
+ functions. This does not make a very good internal API.
+
+ Add the `no_shared_libraries_command` function to implement the CLI
+ command. Remove the unused parameters from `no_shared_libraries`.
+
+ Remove the `from_tty` parameter of `target_pre_inferior`, since it's now
+ unused.
+
+ Change-Id: I4fcba5ee1e0f7d250aab1a7b62b9ea16265fe962
+ Approved-By: Tom Tromey <tom@tromey.com>
+ Reviewed-By: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
+
+2024-07-15 Simon Marchi <simon.marchi@polymtl.ca>
+
+ gdb: pass program space to objfile_purge_solibs
+ Make the current program space reference bubble up one level.
+
+ Change-Id: I08cfa77a0351c9602131ed2a294eabb1f1f59a6e
+ Approved-By: Tom Tromey <tom@tromey.com>
+ Reviewed-By: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
+
+2024-07-15 Simon Marchi <simon.marchi@polymtl.ca>
+
+ gdb: use objfile::pspace in objfile::unlink
+ I think it would make sense to use objfile::pspace instead of the
+ current program space here. It reduces the risks of calling this
+ method with the wrong current program space set.
+
+ Change-Id: Id4f3644719f232640c83a1c7f4aa92eaa6af6c5c
+ Approved-By: Tom Tromey <tom@tromey.com>
+ Reviewed-By: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
+
+2024-07-15 Simon Marchi <simon.marchi@efficios.com>
+
+ gdb: remove some trivial uses of current_program_space
+ It is obvious that pspace is the same as current_program_space in these
+ cases, due to the set_current_program_space call just above. The rest
+ of the functions probably care about the current program space though,
+ so leave the set_cset_current_program_space calls there.
+
+ Change-Id: I3c300decbf2c2fe5f25aa7f697ebcb524432394f
+
+2024-07-15 Hannes Domani <ssbssa@yahoo.de>
+
+ Fix loading a saved recording
+ Currently you get this assertion failure if you try to execute the
+ inferior after loading a saved recording, when no recording was done
+ earlier in the same gdb session:
+ ```
+ $ gdb -q c -ex "record restore test.rec"
+ Reading symbols from c...
+ [New LWP 26428]
+ Core was generated by `/tmp/c'.
+ Restored records from core file /tmp/test.rec.
+ (gdb) c
+ Continuing.
+ ../../gdb/inferior.c:293: internal-error: inferior* find_inferior_pid(process_stratum_target*, int): Assertion `pid != 0' failed.
+ A problem internal to GDB has been detected,
+ further debugging may prove unreliable.
+ ```
+
+ The change in step-precsave.exp triggers this bug, since now the
+ recording is loaded in a new gdb session, where
+ record_full_resume_ptid was never set.
+
+ The fix is to simply set record_full_resume_ptid when resuming a loaded
+ recording.
+
+ Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31971
+ Approved-By: Guinevere Larsen <blarsen@redhat.com>
+
+2024-07-15 Simon Marchi <simon.marchi@efficios.com>
+
+ gdb: make objfile::pspace private
+ Rename to m_pspace, add getter. An objfile's pspace never changes, so
+ no setter is necessary.
+
+ Change-Id: If4dfb300cb90dc0fb9776ea704ff92baebb8f626
+
+2024-07-15 Szabolcs Nagy <szabolcs.nagy@arm.com>
+
+ aarch64: Fix --no-apply-dynamic-relocs for RELR
+ The option only makes sense for RELA relative relocs where the
+ addend is present, not for RELR relative relocs.
+
+ Fixes bug 31924.
+
+2024-07-15 Nick Clifton <nickc@redhat.com>
+
+ Synchronize config.[sub|guess] with the latest versions from the config project.
+
+2024-07-15 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2024-07-14 John David Anglin <danglin@gcc.gnu.org>
+
+ hppa: Fix handling of relocations that apply to data
+ Commit d125f9675372b1ae01ceb1893c06ccb27bc7bf22 introduced a bug
+ in handling relocations for data. The R_PARISC_DIR32 relocation
+ operates on 32-bit data and not instructions. The HOWTO table
+ needs to be used to determine the format of relocations that apply
+ to data. The R_PARISC_SEGBASE relocation is another special case
+ as it only changes segment base.
+
+ This was noticed in Debian cmor package build.
+
+ 2024-07-14 John David Anglin <danglin@gcc.gnu.org>
+
+ bfd/ChangeLog:
+
+ * elf32-hppa.c (final_link_relocate): Use HOWTO table to
+ determine reload format for relocations that apply to data.
+
+2024-07-14 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2024-07-13 Maciej W. Rozycki <macro@orcam.me.uk>
+
+ Revert "MIPS: Use N64 by default for mips*64*-*-linux-gnuabi64"
+ This reverts commit d49f2dd78b08efa4e1ee51f5df5058846c2eb4fa. It was
+ applied unapproved.
+
+ Revert "MIPS/GAS: Omit LI 0 for condition trap"
+ This reverts commit bfa257b407270d1c808b31fbd97da779e0fd20d2. It was
+ applied unapproved.
+
+2024-07-13 Lulu Cai <cailulu@loongson.cn>
+
+ LoongArch: Fix dwarf3 test cases from XPASS to PASS
+ In the past, the .align directive generated a label that did not match
+ the regular expression, and we set it to XFAIL.
+ But now it matches fine so it becomes XPASS. We fix it with PASS.
+
+2024-07-13 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2024-07-12 Sam James <sam@gentoo.org>
+
+ libiberty: sync with gcc
+ This imports the following commits from GCC as of r15-1722-g7682d115402743:
+ ca2f7c84927f libiberty: Invoke D demangler when --format=auto
+ 94792057ad4a Fix up duplicated words mostly in comments, part 1
+ 20e57660e64e libiberty: Fix error return value in pex_unix_exec_child [PR113957].
+ 52ac4c6be866 [libiberty] remove TBAA violation in iterative_hash, improve code-gen
+ 53bb7145135c libiberty: Fix up libiberty_vprintf_buffer_size
+ 65388b28656d c++, demangle: Implement https://github.com/itanium-cxx-abi/cxx-abi/issues/148 non-proposal
+
+2024-07-12 Jens Remus <jremus@linux.ibm.com>
+
+ s390: Avoid reloc overflows on undefined weak symbols (cont)
+ This complements and reuses logic from Andreas Krebbel's commit
+ 896a639babe2 ("s390: Avoid reloc overflows on undefined weak symbols").
+
+ Replace relative long addressing instructions of weak symbols, which
+ will definitely resolve to zero, with either a load address of 0 or a
+ a trapping insn.
+
+ This prevents the PLT32DBL relocation from overflowing in case the
+ binary will be loaded at 4GB or more.
+
+ bfd/
+ * elf64-s390.c (elf_s390_relocate_section): Replace
+ instructions using undefined weak symbols with relative
+ addressing to avoid relocation overflows.
+
+ ld/
+ * testsuite/ld-s390/s390.exp: Add new test.
+ * testsuite/ld-s390/weakundef-2.s: New test.
+ * testsuite/ld-s390/weakundef-2.dd: Likewise.
+
+ Reported-by: Alexander Gordeev <agordeev@linux.ibm.com>
+ Suggested-by: Ilya Leoshkevich <iii@linux.ibm.com>
+ Suggested-by: Andreas Krebbel <krebbel@linux.ibm.com>
+
+2024-07-12 Jens Remus <jremus@linux.ibm.com>
+
+ s390: Do not replace brcth referencing undefined weak symbol
+ Branch Relative on Count High (brcth) is a conditional branch relative
+ instruction. It is not guaranteed that it only appears within loops
+ that sooner or later will take the branch. It may very well be used to
+ check a condition that will prevent the branch from ever being taken.
+
+ bfd/
+ * elf64-s390.c (elf_s390_relocate_section): Do not replace brcth
+ referencing undefined weak symbol with a trap.
+
+ ld/
+ * testsuite/ld-s390/weakundef-1.s: Update test case accordingly.
+ * testsuite/ld-s390/weakundef-1.dd: Likewise.
+
+ Fixes: 896a639babe2 ("s390: Avoid reloc overflows on undefined weak symbols")
+
+2024-07-12 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
+
+ aarch64: Add support for sme2.1 zero instructions.
+ This patch adds support for following sme2.1 zero instructions and
+ the spec is available here [1].
+
+ 1. ZERO (single-vector).
+ 2. ZERO (double-vector).
+ 3. ZERO (quad-vector).
+
+ The VECTOR GROUP symbols VGx2 and VGx4 are optional for the assembler
+ for most of the sme and sve instructions. But for few of the sme2.1
+ zero instruction variants VECTOR GROUP symbols VGx2 and VGx4 are mandatory.
+ To address this a bit "F_VG_REQ" is introduced in this patch, on setting
+ F_VG_REQ bit in flags of aarch64_opcode forces the assembler to accept
+ instruction operand only having VECTOR GROUP symbols.
+
+ [1]: https://developer.arm.com/documentation/ddi0602/2024-03/SME-Instructions?lang=en
+
+2024-07-12 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
+
+ aarch64: Add support for sme2.1 movaz instructions.
+ This patch adds support for following sme2.1 movaz instructions and
+ the spec is available here [1].
+
+ 1. MOVAZ (array to vector, two registers).
+ 2. MOVAZ (array to vector, four registers).
+ 3. MOVAZ (tile to vector, single).
+
+ [1]: https://developer.arm.com/documentation/ddi0602/2024-03/SME-Instructions?lang=en
+
+2024-07-12 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
+
+ aarch64: Add support for sme2.1 luti2 and luti4 instructions.
+ This patch adds support for following sme2.1 luti2 and luti4 instructions, spec is
+ available here [1]
+
+ 1. LUTI2 (two registers) strided.
+ 2. LUTI2 (four registers) strided.
+ 3. LUTI4 (two registers) strided.
+ 4. LUTI4 (four registers) strided.
+
+ [1]: https://developer.arm.com/documentation/ddi0602/2024-03/SME-Instructions?lang=en
+
+2024-07-12 Jan Beulich <jbeulich@suse.com>
+
+ x86: drop unnecessary \() from bundle tests
+ ':' isn't permitted in macro parameter names, hence this separator
+ construct isn't necessary at the end of labels. Drop its use in such
+ cases, for being potentially confusing (and hampering readability, even
+ if only a little).
+
+2024-07-12 Jan Beulich <jbeulich@suse.com>
+
+ x86/APX: remove two inconsistencies
+ As indicated in earlier discussion, permitting GOTTPOFF uniformly for
+ all legacy non-SIMD insns while at the same time restricting to just
+ certain ADD forms when EVEX-encoded is inconsistent. Make promoted insns
+ "equal" to their legacy original ones. Doing that adjustment prevents
+ another inconsistency, too: In
+
+ data16 neg (%rax)
+ data16 neg (%r16)
+ data16 {nf} neg (%rax)
+
+ it is not logical why the last one shouldn't be permitted. Bypassing
+ that check requires other adjustments, though, to actually properly
+ consume (and then squash) the data size prefix.
+
+ While there also add the missing CMP and TEST cases to the test case
+ being modified.
+
+2024-07-12 Jan Beulich <jbeulich@suse.com>
+
+ x86/APX: correct TEST/CTESTcc with 1st operand being a memory one
+ While they properly inherited D and C, code processing the reversal of
+ operands wasn't updated accordingly (and "reversed" operands also
+ weren't tested anywhere).
+
+2024-07-12 YunQiang Su <syq@gcc.gnu.org>
+
+ MIPS/GAS: Omit LI 0 for condition trap
+ MIPSr6 removes condition trap instructions with imm, so we expand
+ the instruction like "tne $2,IMM" to
+ li $at,IMM
+ tne $2,$at
+ While if IMM is 0, we can use
+ tne $2,$zero
+ only.
+
+2024-07-12 YunQiang Su <syq@gcc.gnu.org>
+
+ MIPS: Use N64 by default for mips*64*-*-linux-gnuabi64
+ the ABI section of the triple explicitly asks for N64,
+ and in fact GCC also does so.
+
+ It can fix the test failure:
+ FAIL: libdep test: did not get expected output from the linker
+ with Debian's mipsisa64r6el-linux-gnuabi64 toolchain.
+
+2024-07-12 Matthieu Longo <Matthieu.Longo@arm.com>
+
+ aarch64: disable feature b16b16
+ Feature b16b16 is currently incomplete and requires re-work.
+
+ Disable the command line option for b16b16, and mark the associated
+ tests as XFAIL.
+
+2024-07-12 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+
+ gprofng: add release notes for 2.43
+ ChangeLog
+ 2024-07-10 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>.
+
+ * binutils/NEWS (gprofng): Add release notes for 2.43
+
+2024-07-12 Alan Modra <amodra@gmail.com>
+
+ Re: base64: Add support for targets with byte size > octet size.
+ Three extra octets are now expected with the latest change to base64.s.
+ They happened to be covered by patterns allowing for zero padding at
+ the end of the section, but we don't want to allow fewer octets than
+ expected.
+
+ PR 31964
+ * testsuite/gas/all/base64.d: Adjust.
+
+2024-07-12 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2024-07-11 Nick Clifton <nickc@redhat.com>
+
+ base64: Add support for targets with byte size > octet size.
+ PR 31964
+
+2024-07-11 Jan Beulich <jbeulich@suse.com>
+
+ gas: don't open-code IS_WHITESPACE() / IS_NEWLINE()
+ Better be consistent in use of the wrapper macros, which imo also helps
+ readability.
+
+2024-07-11 Jan Beulich <jbeulich@suse.com>
+
+ gas: multi-byte warning adjustments
+ First input_scrub_next_buffer()'s invocation was wrong, leading to input
+ only being checked from the last newline till the end of the current
+ buffer. Correcting the invocation, however, leads to duplicate checking
+ unless -f (or the #NO_APP equivalent thereof) is in effect. Move the
+ invocation to input_file_give_next_buffer(), to restrict it accordingly.
+
+ Then, when macros contain multi-byte characters, warning about them
+ again in every expansion isn't useful. Suppress such warnings from
+ sb_scrub_and_add_sb().
+
+2024-07-11 Jan Beulich <jbeulich@suse.com>
+
+ gas: there's no scrubber state 12
+ Apparently (beyond what's [easily] visible in git history) when this was
+ added there was confusion about scrubber states vs lex[] contents. For
+ the purposes here LEX_IS_DOUBLEDASH_1ST (which happens to also resolve
+ to 12) alone is sufficient. "state" is never set to 12, and it being 12
+ also isn't handled anywhere.
+
+2024-07-11 Kévin Le Gouguec <legouguec@adacore.com>
+
+ gdb: add testcase for invalid record display
+ More of a DWARF-generation non-regression test; fixed on the GCC side
+ with 2024-06-03 "Implement wrap-around arithmetics in DWARF
+ expressions" (f3d6d60d2ae).
+
+ Approved-By: Tom Tromey <tom@tromey.com>
+
+2024-07-11 Cui, Lili <lili.cui@intel.com>
+
+ X86: Update gas/NEWS for Intel APX.
+ gas/ChangeLog:
+
+ * NEWS: Update gas/NEWS for Intel APX.
+
+2024-07-11 Tsukasa OI <research_trasio@irq.a4lg.com>
+
+ RISC-V: Add platform property/capability extensions
+ RISC-V Profiles document defines number of "extensions" that indicate
+ certain platform properties/capabilities just like 'Zkt' extension from the
+ RISC-V cryptography extensions.
+
+ This commit defines 20 platform property/capability extensions as defined
+ in the RISC-V Profiles documentation.
+
+ The only exception: 'Ssstateen' extension is defined separately because it
+ defines a subset (supervisor/hypervisor view) of the 'Smstateen' extension.
+
+ This is based on the ratified version of RISC-V Profiles:
+ <https://github.com/riscv/riscv-profiles/releases/tag/v1.0>
+
+ [Definition]
+
+ "Main memory regions":
+ Main memory regions (in contrast to I/O or vacant memory regions) with
+ both the cacheability and coherence PMAs.
+
+ [New Unprivileged Extensions]
+
+ 1. 'Ziccif'
+ "Main memory regions" support instruction fetch and any instruction
+ fetches of naturally aligned power-of-2 sizes up to min(ILEN, XLEN)
+ are atomic.
+ 2. 'Ziccrse'
+ "Main memory regions" provide the eventual success guarantee for
+ LR/SC sequence (RsrvEventual).
+ 3. 'Ziccamoa'
+ "Main memory regions" support all currently-defined AMO operations
+ including swap, logical and arithmetic operations (AMOArithmetic).
+ 4. 'Za64rs'
+ For LR/SC instructions, reservation sets are contiguous, naturally
+ aligned and at most 64-bytes in size.
+ 5. 'Za128rs'
+ Likewise, but reservation sets are at most 128-bytes in size.
+ 6. 'Zicclsm'
+ Misaligned loads / stores to "main memory regions" are supported.
+ Those include both regular scalar and vector accesses but does not
+ include AMOs and other specialized forms of memory accesses.
+ 7. 'Zic64b'
+ Cache blocks are (exactly) 64-bytes in size and naturally aligned.
+
+ [New Privileged Extensions]
+
+ 1. 'Svbare'
+ "satp" mode Bare is supported.
+ 2. 'Svade'
+ Page-fault exceptions are raised when a page is accessed when A bit is
+ clear, or written when D bit is clear.
+ 3. 'Ssccptr'
+ "Main memory regions" support hardware page-table reads.
+ 4. 'Sstvecd'
+ "stvec" mode Direct is supported. When "stvec" mode is Direct,
+ "stvec.BASE" is capable of holding any valid 4-byte aligned address.
+ 5. 'Sstvala'
+ "stval" is always written with a nonzero value whenever possible as
+ specified in the Privileged Architecture documentation
+ (version 20211203: see section 4.1.9).
+ 6. 'Sscounterenw'
+ For any "hpmcounter" that is not read-only zero, the corresponding bit
+ in "scounteren" is writable.
+ 7. 'Ssu64xl'
+ "sstatus.UXL" is capable of holding the value 0b10
+ (UXLEN==64 is supported).
+ 8. 'Shcounterenw'
+ Similar to 'Sscounterenw' but the same rule applies to "hcounteren".
+ 9. 'Shvstvala'
+ Similar to 'Sstvala' but the same rule applies to "vstval".
+ 10. 'Shtvala'
+ "htval" is written with the faulting guest physical address as long as
+ permitted by the ISA (a bit similar to 'Sstvala' and 'Shvstvala').
+ 11. 'Shvstvecd'
+ Similar to 'Sstvecd' but the same rule applies to "vstvec".
+ 12. 'Shvsatpa'
+ All translation modes supported in "satp" are also supported in "vsatp".
+ 13. 'Shgatpa'
+ For each supported virtual memory scheme SvNN supported in "satp", the
+ corresponding "hgatp" SvNNx4 mode is supported. The "hgatp" mode Bare
+ is also supported.
+
+ [Implications]
+
+ (Due to reservation set size constraints)
+ - 'Za64rs' -> 'Za128rs'
+
+ (Due to the fact that a privileged "extension" directly refers a CSR)
+ - 'Svbare' -> 'Zicsr'
+ - 'Sstvecd' -> 'Zicsr'
+ - 'Sstvala' -> 'Zicsr'
+ - 'Sscounterenw' -> 'Zicsr'
+ - 'Ssu64xl' -> 'Zicsr'
+
+ (Due to the fact that a privileged "extension" indirectly depends on CSRs)
+ - 'Svade' -> 'Zicsr'
+
+ (Due to the fact that a privileged "extension" is a hypervisor property)
+ - 'Shcounterenw' -> 'H'
+ - 'Shvstvala' -> 'H'
+ - 'Shtvala' -> 'H'
+ - 'Shvstvecd' -> 'H'
+ - 'Shvsatpa' -> 'H'
+ - 'Shgatpa' -> 'H'
+
+ bfd/
+ * elfxx-riscv.c (riscv_implicit_subsets): Updated for property
+ and capability extensions.
+ (riscv_supported_std_z_ext): Added zic64b, ziccamoa, ziccif, zicclsm,
+ ziccrse, za64rs and za128rs extensions.
+ (riscv_supported_std_s_ext): Added shcounterenw, shgatpa, shtvala,
+ shvsatpa, shvstvala, shvstvecd, ssccptr, sscounterenw, sstvala,
+ sstvecd, ssu64xlm svade and svbare extensions.
+ gas/
+ * testsuite/gas/riscv/imply.d: Updated for property and capability
+ extensions.
+ * testsuite/gas/riscv/imply.s: Likewise.
+ * testsuite/gas/riscv/march-help.l: Likewse.
+
+2024-07-11 Alan Modra <amodra@gmail.com>
+
+ Re: Add support for a .base64 pseudo-op to gas
+ Fixes a failure on rx-elf where the standard data section isn't .data.
+ run_dump_test has machinery to translate .data in both options and
+ expected results for objdump, but not for readelf -x.
+
+ PR 31964
+ * testsuite/gas/all/base64.d: Dump .data with objdump. Run on
+ all targets.
+
+2024-07-11 Jinyang He <hejinyang@loongson.cn>
+
+ LoongArch: Not alloc dynamic relocs if symbol is absolute
+ The absolute symbol should be resolved to const when link to dso or exe.
+ Alloc dynamic relocs will cause extra space and R_LARCH_NONE finally.
+
+2024-07-11 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2024-07-11 H.J. Lu <hjl.tools@gmail.com>
+
+ x86-64: Skip -z mark-plt tests on MUSL
+ Skip -z mark-plt tests, which are specific to glibc, on MUSL.
+
+ PR ld/31970
+ * ld/testsuite/ld-x86-64/x86-64.exp: Skip -z mark-plt tests on
+ MUSL.
+
+2024-07-10 Yixuan Chen <chenyixuan@iscas.ac.cn>
+
+ RISC-V:[gprofng] Minimal support gprofng for riscv.
+ ChangeLog: Add target riscv to --enable-gprofng.
+
+ 2024-07-04 Yixuan Chen <chenyixuan@iscas.ac.cn>
+
+ * configure: Add riscv.
+ * configure.ac: Add riscv.
+
+ gprofng/ChangeLog: Minimal support gprofng for riscv.
+
+ 2024-07-04 Yixuan Chen <chenyixuan@iscas.ac.cn>
+
+ * gprofng/common/core_pcbe.c (core_pcbe_init): Add RISC-V vendor conditon.
+ (defined): Add riscv.
+ * gprofng/common/cpuid.c (defined): Add risc-v hwprobe.
+ * gprofng/common/gp-defs.h (TOK_A_RISCV): Add riscv.
+ (defined): Add riscv.
+ (ARCH_RISCV): Add riscv.
+ * gprofng/common/hwc_cpus.h: Add RISC-V vendor.
+ * gprofng/common/hwcfuncs.h (HW_INTERVAL_TYPE): Remove useless defination.
+ * gprofng/configure: Add riscv.
+ * gprofng/configure.ac: Add riscv.
+ * gprofng/libcollector/hwprofile.h (ARCH): Add RISC-V register.
+ (CONTEXT_PC): Add RISC-V register.
+ (CONTEXT_FP): Add RISC-V register.
+ (CONTEXT_SP): Add RISC-V register.
+ (SETFUNCTIONCONTEXT):
+ * gprofng/libcollector/libcol_util.c (__collector_util_init): Fix libc open condition.
+ * gprofng/libcollector/libcol_util.h (ARCH): Add RISC-V.
+ * gprofng/libcollector/unwind.c (ARCH): Add RISC-V register.
+ (GET_PC): Add RISC-V register.
+ (GET_SP): Add RISC-V register.
+ (GET_FP): Add RISC-V register.
+ (FILL_CONTEXT):
+ * gprofng/src/DbeSession.cc (ARCH): Add RISC-V.
+ * gprofng/src/Disasm.cc (Disasm::disasm_open): Add RISC-V.
+ * gprofng/src/Experiment.cc (Experiment::ExperimentHandler::startElement): Add RISC-V.
+ * gprofng/src/checks.cc (ARCH): Add RISC-V.
+ * gprofng/src/collctrl.cc (defined): Set risc-v cpu frequency to 1000MHz as default for now, will fix when I find a better method to get cpu frequency.
+ (read_cpuinfo): Add "mvendorid" condition according to risc-v /proc/cpuinfo file content.
+ * gprofng/src/dbe_types.h (enum Platform_t): Add RISC-V.
+
+2024-07-10 Nick Clifton <nickc@redhat.com>
+
+ Add support for a .base64 pseudo-op to gas
+ PR 31964
+
+2024-07-10 Clément Chigot <chigot@adacore.com>
+
+ libsframe: remove runstatedir in Makefile.in
+ The regeneration was made with Ubuntu automake which has this runstatedir
+ additional variable, compared to the usual automake.
+
+ libsframe: accept --target configure option
+ Libsframe was missing AC_CANONICAL_TARGET, meaning that --target was
+ ignored. This could prevent libsframe.a to be installed in some cases,
+ the host fetching its canonical value while the target isn't. Both
+ having a different value, INSTALL_LIBBFD would be false.
+
+2024-07-10 GDB Administrator <gdbadmin@sourceware.org>
+
+ Automatic date update in version.in
+
+2024-07-09 H.J. Lu <hjl.tools@gmail.com>
+
+ elf: Add glibc version dependency only if needed
+ There is no need to add a needed glibc version if the glibc base version
+ includes the needed glibc version.
+
+ PR ld/31966
+ * elflink.c (elf_link_add_glibc_verneed): Add glibc_minor_base.
+ Skip if the glibc base version includes the needed glibc version.
+ (_bfd_elf_link_add_glibc_version_dependency): Initialize
+ glibc_minor_base to INT_MAX and pass it to
+ elf_link_add_glibc_verneed.
+
+2024-07-09 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+
+ gprofng: add hardware counters for Intel Ice Lake processor
+ gprofng/ChangeLog
+ 2024-07-07 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>.
+
+ * common/hwc_cpus.h: New constant for Intel Ice Lake processor.
+ * common/hwcdrv.c: Add a new argument to hwcfuncs_get_x86_eventsel.
+ Set config1 in perf_event_attr. Remove the use of memset.
+ * common/core_pcbe.c (core_pcbe_get_eventnum): Return 0.
+ * common/hwcentry.h: Add config1.
+ * src/collctrl.cc (Coll_Ctrl::build_data_desc):Set config1.
+ * common/hwcfuncs.c (process_data_descriptor): Set config1.
+ * common/hwctable.c: Add the hwc table for Intel Ice Lake processor.
+ * src/hwc_intel_icelake.h: New file.
+
+2024-07-09 Indu Bhagat <indu.bhagat@oracle.com>
+
+ doc: sframe: add appendix for generating stack traces
+ Add an appendix to provide a rough outline to show how to generate stack
+ traces using the SFrame format. Such content should hopefully aid the
+ reader assimmilate the information in the specification.
+
+ libsframe/
+ * doc/sframe-spec.texi: Add new appendix.
+
+2024-07-09 Indu Bhagat <indu.bhagat@oracle.com>
+
+ include: sframe: update code comments around SFrame FRE stack offsets
+ This also amends the incorrect comment:
+ offset3 (intrepreted as FP = CFA + offset2)
+
+ If RA tracking is enabled, the offset to recover FP is at the third
+ index. The SFrame format (V2) has assumption [...]
[diff truncated at 100000 bytes]
More information about the Binutils-cvs
mailing list