aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2025-07-16gas: improve --gsframe documentationSam James2-3/+7
I omitted documentation in 8aad677a12832885acd5be1de8f41e740b8e713d in error. Rectify that with: 1) changing ---help to mention bare `--gsframe` too, as we're not getting rid of that; 2) adding the new --gsframe=[no|yes] form to as.texi. PR gas/33125 * gas/as.c (parse_args): Tweak --gsframe= help text. * gas/doc/as.texi: Document --gsframe=[no|yes].
2025-07-15x86-64: Remove sframe relocs against discarded sectionsH.J. Lu2-4/+13
Since unlike eh_frame editing code, sframe editing code keeps R_X86_64_NONE reloc as is, its r_offset is wrong, we must not generate R_X86_64_NONE reloc in sframe section against discarded sections for "ld -r". bfd/ PR ld/33156 * elf64-x86-64.c (elf_x86_64_relocate_section): Also remove sframe relocations against discarded sections for "ld -r". ld/ PR ld/33156 * testsuite/ld-elf/eh-group.exp (as_gsframe): New. Assemble eh-group.o with $as_gsframe. Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
2025-07-16x86: Decouple AMX-AVX512 from AVX10.2 and imply AVX512FHaochen Jiang2-18/+18
In ISE058, the AVX10.2 imply is removed from AMX-AVX512. This leads to re-consideration on the imply for AMX-AVX512. Since it is using zmm register and using zmm register only, we need to at least imply AVX512F. AVX512VL is not needed since it is not using xmm/ymms. On the other hand, if we imply AVX10.1 for AMX-AVX512, disabling avx10.1 will lead to disabling AMX-AVX512. This would be a surprise for users. Based on the two reasons above, the patch is decoupling AMX-AVX512 from AVX10.2 and imply AVX512F. opcodes/ChangeLog: * i386-gen.c: Imply AVX512F instead of AVX10.2. * i386-init.h: Regenerated.
2025-07-16Automatic date update in version.inGDB Administrator1-1/+1
2025-07-15Updated translations for various sub-directoriesNick Clifton14-22515/+26003
2025-07-15Only parse attributes in ELF sections with the SHT_GNU_ATTRIBUTES type if ↵Rainer Orth3-5/+13
the OS is not Solaris. Set the is_solaris flag for Sparc solaris PR 33153
2025-07-15gas: Re-indent case OPTION_SFRAME:H.J. Lu1-6/+6
PR gas/33125 * gas/as.c (parse_args): Re-indent case OPTION_SFRAME: Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
2025-07-15gas: support --gsframe=noSam James1-3/+14
Being able to explicitly disable SFrames on the command line is useful, especially when looking at a gas that enables SFrames by default. The binutils testsuite will benefit from this as there's testcases that don't expect their presence. In summary: * Nothing is passed => no SFrames (no change from before) * --gsframe is passed => SFrames (no change from before) * --gsframe=yes is passed => SFrames (previously rejected) * --gsframe-no is passed => no SFrames (previously rejected) PR gas/33125 * gas/as.c (parse_args): Accept --gsframe=no, --gsframe=yes.
2025-07-15Revert "gas: support --gsframe=no"Sam James1-14/+3
This reverts commit e6b2368b9556ea6298a1f0de97baeabf1b5b18fd. I made a last minute style change and oopsed it.
2025-07-15gas: support --gsframe=noSam James1-3/+14
Being able to explicitly disable SFrames on the command line is useful, especially when looking at a gas that enables SFrames by default. The binutils testsuite will benefit from this as there's testcases that don't expect their presence. In summary: * Nothing is passed => no SFrames (no change from before) * --gsframe is passed => SFrames (no change from before) * --gsframe=yes is passed => SFrames (previously rejected) * --gsframe-no is passed => no SFrames (previously rejected) PR gas/33125 * gas/as.c (parse_args): Accept --gsframe=no, --gsframe=yes.
2025-07-14libsframe: relax the assertion limit for fre_start_addrIndu Bhagat1-11/+13
Fix PR ld/33131 Failed assertion when linking gccgo Make amendments in both sframe_decoder_get_fre and sframe_encoder_add_fre. Since GNU as and the dw2gencfi code generally accepts such CFI, its best to allow in SFrame FREs too. libsframe/ PR ld/33131. * sframe.c (sframe_decoder_get_fre): Relax the assertion a bit. (sframe_encoder_add_fre): Likewise.
2025-07-15Automatic date update in version.inGDB Administrator1-1/+1
2025-07-15sframe: Allow input R_*_NONE relocationsH.J. Lu4-1/+67
"ld -r" generates R_*_NONE relocations in sframe section if input relocations in sframe section are against discarded section. Allow input R_*_NONE relocations if there are more relocation entries than SFrame entries, instead of assuming number of SFrame entries == number of relocation entries. bfd/ PR ld/33127 * elf-sframe.c (sframe_decoder_init_func_bfdinfo): Allow input R_*_NONE relocations if there are more relocation entries than SFrame entries. ld/ PR ld/33127 * testsuite/ld-x86-64/sframe-reloc-2a.s: New file. * testsuite/ld-x86-64/sframe-reloc-2b.s: Likewise. * testsuite/ld-x86-64/x86-64.exp: Run PR ld/33127 tests. Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
2025-07-14gdb/amd64-linux-tdep: add missing spaceSimon Marchi1-2/+2
Change-Id: I4e15eae9791329f71321a9b00d682e22dd6e2f6d
2025-07-14Updated Ukranian translation for the opcodes sub-directoryNick Clifton1-169/+177
2025-07-14More updates to the 'how to make a release' documentationNick Clifton1-1/+21
2025-07-14Updated Ukranian translation for the binutils sub-directoryNick Clifton1-1950/+2009
2025-07-14Updated Spanish translation for the gas sub-directoryNick Clifton1-931/+748
2025-07-14s390x sframe regressionsAlan Modra1-0/+2
Commit 6ab3f09a682a resulted in regressions. s390x-linux-gnu FAIL: SFrame simple link s390x-linux-gnu FAIL: SFrame for plt0 and pltN Commit 939eb467b21d exposed the problem further. s390x-linux-gnu FAIL: LTO 4a s390x-linux-gnu FAIL: LTO 4c s390x-linux-gnu FAIL: LTO 4d * elf64-s390.c (elf_s390_create_dynamic_sections): Set plt_sframe ELF section type. Reviewed-by: Jens Remus <jremus@linux.ibm.com>
2025-07-14gas deferrred diags leakAlan Modra1-8/+9
asan complains when running the gas all/cond-diag test. * read.c (deferred_diag_head, deferred_diag_tail): Renamed from deferred_diags and last_deferred_diag, making the tail pointer a deferred_diag**. (s_errwarn_if): Simplify appending to list. Free unused diag on error. (evaluate_deferred_diags): Free list.
2025-07-14Delete AM_PO_SUBDIRS invocationAlan Modra7-9/+1
These aren't needed since commit 862776f26a59.
2025-07-14gas/NEWS: Corrected the information about mapping symbol $x for risc-vNelson Chu1-2/+4
2025-07-14gas: accept leading zeros on dollar local labels in z80 sdcc compat modeAaron Griffith2-18/+49
SDCC assembly output uses 5-digit numeric dollar sign labels, padded with zeros. Commit 226749d made these invalid, and broke the Z80 SDCC compatibility mode in GAS. https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=226749d5a6ff0d5c607d6428d6c81e1e7e7a994b This restores SDCC compatibility by replacing the leading zeros with spaces when inside dollar local labels and when SDCC compatibility is enabled. It also restores the SDCC test case to represent actual syntax emitted by SDCC, and adds a note explaining the purpose of the test. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33030
2025-07-14ld: Clear map_head_is_link_order for .gnu_object_onlyH.J. Lu2-2/+10
Clear map_head_is_link_order when generating .gnu_object_only section so that lang_add_section can add new sections and .sframe sections will be properly merged by _bfd_elf_merge_section_sframe. PR ld/33146 * ldlang.c (cmdline_emit_object_only_section): Clear map_head_is_link_order. * testsuite/ld-plugin/lto.exp (as_gsframe): New. (lto_link_tests): Add $as_gsframe to compile lto-4b.o and lto-4c.o. Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
2025-07-14Re: gas: Move gas_sframe_check to binutils-common.expAlan Modra2-47/+6
PR ld/33146 Correct TCL errors trying to access error output file in commit ef7a634dc01d. In fact, get rid of the output file test entirely since gas exit status is sufficient. Also there is no need to firstly check for ELF support. Set check_as_sframe_result, and remove ld-lib.exp check_as_sframe.
2025-07-14Automatic date update in version.inGDB Administrator1-1/+1
2025-07-14gas: Move gas_sframe_check to binutils-common.expH.J. Lu2-37/+41
Move gas_sframe_check to binutils-common.exp so that it can be used in linker tests to check if a target assembler supports --gsframe. binutils/ PR ld/33146 * testsuite/lib/binutils-common.exp (gas_sframe_check): Moved from cfi-sframe.exp. Replace gas_host_run with remote_exec. gas/ PR ld/33146 * testsuite/gas/cfi-sframe/cfi-sframe.exp (gas_sframe_check): Moved to binutils-common.exp. Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
2025-07-13Fix compile time warning message about optarg parameter shadowing global ↵Nick Clifton1-6/+6
variable
2025-07-13Updates to how-to-make-a-release document after creating the 2.45 branchNick Clifton1-7/+12
2025-07-13Update version number on mainlineNick Clifton18-8627/+8955
2025-07-13Add markers for 2.45 branchNick Clifton16-1/+56
2025-07-13[gdb/build] Work around GCC ipa-modref bugTom de Vries1-0/+8
PR mi/32571 reports the following problem: ... $ gdb -q -batch -ex "b bla.c:100" <random output> Make breakpoint pending on future shared library load? (y or [n]) \ [answered N; input not from terminal] ... while this is expected: ... $ gdb -q -batch -ex "b bla.c:100" No symbol table is loaded. Use the "file" command. Make breakpoint pending on future shared library load? (y or [n]) \ [answered N; input not from terminal] ... A few factors in reproducing this are building gdb using gcc 14, "-O2 -flto=auto" and --disable-nls. For more details, see the PR. This turns out to be caused by a GCC PR [1], more specifically a problem in ipa-modref. Work around this by disabling ipa-modref for GCC versions 12-15 and 16.0, assuming the GCC 16.1 release will contain a fix. Tested on aarch64-linux and x86_64-linux. Approved-By: Andrew Burgess <aburgess@redhat.com> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32571 [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120987
2025-07-13Automatic date update in version.inGDB Administrator1-1/+1
2025-07-12gdb: add Aaron Griffith to gdb/MAINTAINERSAaron Griffith1-0/+1
2025-07-12ld/aarch64elf: add support for DT_AARCH64_MEMTAG_STACK dynamic tagIndu Bhagat8-0/+29
Add new command line option -z memtag-stack for aarch64 elf. This option instructs the linker to generate the necessary dynamic tag DT_AARCH64_MEMTAG_STACK, which the dynamic loader can then use to protect the stack memory with PROT_MTE. Linker issues an 'unrecognized option' error when -z memtag-stack is specified for non-aarch64 based emulations. readelf displays the dynamic tag when present: $ readelf -d <exectutable> Dynamic section at offset 0xfdd8 contains XX entries: Tag Type Name/Value 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] 0x000000000000000c (INIT) 0x400520 0x000000000000000d (FINI) 0x400b64 0x0000000000000019 (INIT_ARRAY) 0x41fdc8 ... ... ... 0x000000007000000c (AARCH64_MEMTAG_STACK) 0x1 ... ... ... ChangeLog: * bfd/elfnn-aarch64.c (elfNN_aarch64_late_size_sections): Emit DT_AARCH64_MEMTAG_STACK dynamic tag. * bfd/elfxx-aarch64.h (struct aarch64_memtag_opts): Add new member for tracking whether stack access uses MTE insns. * binutils/readelf.c (get_aarch64_dynamic_type): Handle DT_AARCH64_MEMTAG_STACK. * ld/emultempl/aarch64elf.em: Add new command line option. * ld/ld.texi: Add documentation for -z memtag-stack. * ld/testsuite/ld-aarch64/aarch64-elf.exp: Add new test. * ld/testsuite/ld-aarch64/dt-memtag-stack.d: New test. include/ChangeLog: * elf/aarch64.h (DT_AARCH64_MEMTAG_STACK): New definition.
2025-07-12ld/aarch64elf: add support for DT_AARCH64_MEMTAG_MODE dynamic tagIndu Bhagat9-6/+109
Add new command line option -z memtag-mode=<mode> to aarch64 elf, where <mode> can be one of none, sync, or async. For mode of sync or async, a DT_AARCH64_MEMTAG_MODE dynamic tag with a value of 0 or 1 respectively is emitted. readelf displays the dynamic tag when present: $ readelf -d <exectutable> Dynamic section at offset 0xfdd8 contains XX entries: Tag Type Name/Value 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] 0x000000000000000c (INIT) 0x400520 0x000000000000000d (FINI) 0x400b64 0x0000000000000019 (INIT_ARRAY) 0x41fdc8 ... ... ... 0x0000000070000009 (AARCH64_MEMTAG_MODE) 0x1 ... ... ... Note that this patch doesn't add support for the "asymm" MTE mode, which is an Armv8.7 extension. ChangeLog: * bfd/elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Add new member for memtag properties. (bfd_elfNN_aarch64_set_options): New argument to pass memtag properties. (elfNN_aarch64_late_size_sections): Emit DT_AARCH64_MEMTAG_MODE dynamic tag. * bfd/elfxx-aarch64.h: New definition for the various memtag properties. * binutils/readelf.c (get_aarch64_dynamic_type): Handle DT_AARCH64_MEMTAG_MODE. * ld/emultempl/aarch64elf.em: Likewise. * ld/ld.texi: Add documentation for the new option -z memtag-mode. * ld/testsuite/ld-aarch64/aarch64-elf.exp: New test. * ld/testsuite/ld-aarch64/dt-memtag.d: New test. * ld/testsuite/ld-aarch64/dt-memtag-mode.s: New test. include/ChangeLog: * elf/aarch64.h (DT_AARCH64_MEMTAG_MODE): New definition.
2025-07-12ld: aarch64: make EH Frame parsing aware of augmentation char 'G'Indu Bhagat5-0/+71
As per the DWARF for the Arm 64-bit Architecture (AArch64) specification, the augmentation char 'G' indicates that associated frames may modify MTE tags on the stack space they use. Add knowledge of the 'G' augmentation char to the EH Frame parsing code. ChangeLog: * bfd/elf-eh-frame.c (_bfd_elf_parse_eh_frame): Accommodate augmentation char 'G'. * ld/testsuite/ld-aarch64/aarch64-elf.exp: New test. * ld/testsuite/ld-aarch64/mte-tagged-frame-bar.s: New test. * ld/testsuite/ld-aarch64/mte-tagged-frame-foo.s: New test. * ld/testsuite/ld-aarch64/mte-tagged-frame.d: New test.
2025-07-12gas: aarch64: suppport CFI directive .cfi_mte_tagged_frameIndu Bhagat6-9/+116
Process a new aarch64-specific CFI directive: .cfi_mte_tagged_frame (LLVM uses this CFI directive already). The CFI directive, when present for a function, indicates that the stack frame for the function may modify the MTE tags of the stack space it uses. The assembler emits char 'G' in the CIE augmentation string to indicate the same. ChangeLog: * gas/config/tc-aarch64.c (s_aarch64_mte_tagged_frame): New definition. * gas/config/tc-aarch64.h (tc_fde_entry_extras): Add memtag_frame_p. (tc_cie_entry_extras): Likewise. (tc_fde_entry_init_extra): Likewise. (tc_cie_fde_equivalent_extra): Likewise. (tc_cie_entry_init_extra): Likewise. * gas/doc/c-aarch64.texi: Add documentation for .cfi_mte_tagged_frame directive. * gas/testsuite/gas/aarch64/mte_tagged_stack.d: New test. * gas/testsuite/gas/aarch64/mte_tagged_stack.s: New test.
2025-07-12binutils: make read_cie aware of new augmentation char 'G'Indu Bhagat1-1/+1
This allows objdump/readelf to dump DWARF/EH Frame info when the stack frame makes use of MTE tagging. ChangeLog: * binutils/dwarf.c (is_aarch64_augmentation): Add handling for augmentation char 'G'. --- [No change in V3]
2025-07-12bfd: fix recognition of arch-specific augmentationsJose E. Marchesi1-0/+3
This patch fixes _bfd_elf_parse_eh_frame so it will not recognize machine/architecture specific augmentation characters in EH Frame CFIs. Regtested in x86_64-linux-gnu and aarch64-linux-gnu. bfd/ChangeLog: * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Recognize augmentation 'B' only if targetting aarch64.
2025-07-12binutils: factorize handling of arch-specific DWARF augmentationsJose E. Marchesi1-1/+19
This patch factorizes the handling of architecture/machine specific augmentation characters in CIEs. Based on an idea proposed by Richard Earnshaw. binutils/ChangeLog: * dwarf.c (is_mach_augmentation_ftype): New type. (is_mach_augmentation): New variable. (is_nomach_augmentation): New function. (is_aarch64_augmentation): Likewise. (init_dwarf_by_elf_machine_code): Set is_mach_augmentation as appropriate. (init_dwarf_by_bfd_arch_and_mach): Likewise. (read_cie): Handle architecture-specific augmentation characters in a generic way.
2025-07-12binutils: generalize init_dwarf_regnames_by_* functionsJose E. Marchesi4-9/+9
This patch renames the functions: init_dwarf_regnames_by_elf_machine_code init_dwarf_regnames_by_bfd_arch_and_mach to init_dwarf_by_elf_machine_code init_dwarf_by_bfd_arch_and_mach The idea is to start using these functions to perform general architecture/machine specific initializations beyond register names. Regtested in x86_64-linux-gnu and aarch64-linux-gnu targets. binutils/ChangeLog: * dwarf.c (init_dwarf_regnames_by_elf_machine_code): Rename to init_dwarf_by_elf_machine_code. (init_dwarf_regnames_by_bfd_arch_and_mach): Rename to init_dwarf_by_bfd_arch_and_mach. * dwarf.h: Adjust prototypes accordingly. * readelf.c (process_file_header): Adjust call to init_dwarf_regnames_by_elf_machine_code accordingly. * objdump.c (dump_dwarf): Adjust call to init_dwarf_regnames_by_bfd_arch_and_mach accordingly.
2025-07-12aarch64: Add support for --march=armv9.6-aAlice Carlotti9-0/+18
2025-07-12aarch64: Disable sysreg guards by defaultAlice Carlotti69-62/+594
Add a new flag -menable-sysreg-checking to restore previous behaviour. This existing behaviour is quite inconsistent, so the gating will probably be updated in the future. (In particular, many system registers are currently gated with the architecture version they were released with instead of the lower architecture version that they actually require). This patch retains the +d128 requirement for msrr/mrrs. Co-Authored-By: Srinath Parvathaneni <srinath.parvathaneni@arm.com>
2025-07-12aarch64: Add missing F_STRICT flagsAlice Carlotti4-15/+64
By default, NIL qualifiers are treated as matching any qualifier when checking operand constraints. For many SVE instructions, this would allow operands with missing type suffixes to be assembled as if they had any explicit type specified. To prevent this, the F_STRICT flag is used to specify that NIL qualifiers should match only NIL qualifiers. Unfortunately, several SVE instructions incorrectly omitted this F_STRICT flag. The bug has existed in the *MATMUL_SVE* macros since they were added in 2019. The macro LUT_SVE2_INSN was added last year, and the other incorrect macros are new in this release. LUTv2_SME2_INSN and LUTv2_SME2p1_INSN were not actually broken, because we reject untyped vector lists already during parsing. However, I have added the F_STRICT flag here anyway, since this is more consistent and would be more robust if those operands start accepting untyped vector lists in the future. The new luti4 tests are the only ones that were already rejected before this change. BFLOAT16_SVE_INSN has been unused since it was originally added, so I just deleted the macro. The SVE LUT instructions were using the lut instruction class, which has special handling only for SIMD operands, and isn't recognised by aarch64_decode_variant_using_iclass (which sets the qualifiers during decode for most SVE instructions). To prevent these instructions failing to disassemble, I changed their instruction class to sve_misc.
2025-07-12aarch64: Remove redundant feature requirementsAlice Carlotti1-24/+24
Many instructions explicitly specified SVE/SVE2/SME/SME2 as a required feature when it was already implied by another required feature (at least while the SME->SVE2 implication is retained internally). These redundant features were used to determine both the valid symbol names for immediate operands, and the choice of error message for invalid movprfx sequences. Those two scenarios no longer use architecture features, so the redundant features are now truly redundant.
2025-07-12aarch64: Use operand class to select movprfx errorAlice Carlotti3-14/+20
Previously the choice of error message for an invalid movprfx sequence used the architecture requirements to determine whether an instruction was an SVE instruction or not. This meant specifying SVE or SVE2 as an explicit architecture requirement for all SVE instructions, even when this was already implied by another feature. As more architecture features are added and with the partial removal of the SME->SVE2 dependency, these extra feature requirements were getting messier and easier to forget. Instead, we now look at the operand types. If there is an SVE_REG, SVE_REGLIST or PRED_REG operand, then we treat the instruction as an SVE instruction. This does change behaviour slightly, but it only affects the choice of error message and the new choice should be a bit more consistent. There is one testsuite update required, because Ezra's SVE_AES2 patch temporarily broke classification of FEAT_SVE_AES instructions. This patch restores the original behaviour.
2025-07-12aarch64: Refactor exclusion of reg names in immediatesAlice Carlotti3-48/+94
When parsing immediate values, register names should not be misinterpreted as symbols. However, for backwards compatibility we need to permit some newer register names within older instructions. The current mechanism for doing so depends on the list of explicit architecture requirements for the instructions, which is fragile and easy to forget, and grows increasingly messy as more architecture features are added. This patch add explicit flags to each opcode to indicate which set of register names is disallowed in each instance. These flags are mandatory for all opcodes with immediate operands, which ensures that the choice of disallowed names will always be deliberate and explicit. This patch should have no functional change.
2025-07-12aarch64: Remove redundant ORs with 0Alice Carlotti1-2/+2
2025-07-12libsframe: bump version to 2.0Indu Bhagat5-30/+18
Remove LIBSFRAME_1.1, LIBSFRAME_1.0 nodes and add a new LIBSFRAME_2.0 node (non-inheritance version) to create new global versioned symbols. Also announce libsframe.so.2 in NEWS. New APIs: sframe_decoder_get_flags; sframe_decoder_get_offsetof_fde_start_addr; sframe_encoder_get_flags; sframe_encoder_get_offsetof_fde_start_addr; Removed APIs: (already deprecated since X-2 release) sframe_get_funcdesc_with_addr; APIs with changed semantics: sframe_decoder_get_funcdesc_v2; sframe_encoder_add_funcdesc_v2; sframe_encoder_write; lisbframe/ * libsframe.ver: Define new LIBSFRAME_2.0. * libtool-version: Bump the 'current' numeral to indicate a binary incompatible release. include/ * sframe-api.h (sframe_get_funcdesc_with_addr): Remove deprecated interface. libsframe/ * sframe.c (sframe_get_funcdesc_with_addr): Likewise. binutils/ * NEWS: Announce new versioned release of libsframe.