GDB Administrator [Tue, 23 Sep 2025 00:05:11 +0000 (00:05 +0000)]
Automatic date update in version.in
GDB Administrator [Mon, 22 Sep 2025 00:01:44 +0000 (00:01 +0000)]
Automatic date update in version.in
GDB Administrator [Sun, 21 Sep 2025 00:03:12 +0000 (00:03 +0000)]
Automatic date update in version.in
GDB Administrator [Sat, 20 Sep 2025 00:06:52 +0000 (00:06 +0000)]
Automatic date update in version.in
GDB Administrator [Fri, 19 Sep 2025 00:03:36 +0000 (00:03 +0000)]
Automatic date update in version.in
GDB Administrator [Thu, 18 Sep 2025 00:07:59 +0000 (00:07 +0000)]
Automatic date update in version.in
GDB Administrator [Wed, 17 Sep 2025 00:05:57 +0000 (00:05 +0000)]
Automatic date update in version.in
GDB Administrator [Tue, 16 Sep 2025 00:05:27 +0000 (00:05 +0000)]
Automatic date update in version.in
GDB Administrator [Mon, 15 Sep 2025 00:02:41 +0000 (00:02 +0000)]
Automatic date update in version.in
H.J. Lu [Wed, 10 Sep 2025 01:38:49 +0000 (18:38 -0700)]
x86: Copy non_got_ref_without_indirect_extern_access
Copy non_got_ref_without_indirect_extern_access when copying indirect
symbol for weak alias so that _bfd_x86_elf_adjust_dynamic_symbol will
properly handle GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS.
bfd/
PR ld/33409
* elfxx-x86.c (_bfd_x86_elf_copy_indirect_symbol): Copy
non_got_ref_without_indirect_extern_access.
ld/
PR ld/33409
* testsuite/config/default.exp (DIRECT_EXTERN_ACCESS_CFLAGS): New.
(NO_DIRECT_EXTERN_ACCESS_CFLAGS): Likewise.
* testsuite/ld-elf/shared.exp: Run PR ld/33409 tests.
* testsuite/ld-elf/pr33409a.c: New file.
* testsuite/ld-elf/pr33409b.c: Likewise.
* testsuite/ld-elf/pr33409c.c: Likewise.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
(cherry picked from commit
59ada1f6d61bfc7b119f0ae6edcc23dc569e70ad)
GDB Administrator [Sun, 14 Sep 2025 00:07:31 +0000 (00:07 +0000)]
Automatic date update in version.in
GDB Administrator [Sat, 13 Sep 2025 00:04:21 +0000 (00:04 +0000)]
Automatic date update in version.in
GDB Administrator [Fri, 12 Sep 2025 00:03:28 +0000 (00:03 +0000)]
Automatic date update in version.in
GDB Administrator [Thu, 11 Sep 2025 00:05:53 +0000 (00:05 +0000)]
Automatic date update in version.in
GDB Administrator [Wed, 10 Sep 2025 00:04:29 +0000 (00:04 +0000)]
Automatic date update in version.in
GDB Administrator [Tue, 9 Sep 2025 00:04:16 +0000 (00:04 +0000)]
Automatic date update in version.in
GDB Administrator [Mon, 8 Sep 2025 00:03:57 +0000 (00:03 +0000)]
Automatic date update in version.in
GDB Administrator [Sun, 7 Sep 2025 00:03:03 +0000 (00:03 +0000)]
Automatic date update in version.in
GDB Administrator [Sat, 6 Sep 2025 00:01:31 +0000 (00:01 +0000)]
Automatic date update in version.in
GDB Administrator [Fri, 5 Sep 2025 00:04:11 +0000 (00:04 +0000)]
Automatic date update in version.in
GDB Administrator [Thu, 4 Sep 2025 00:02:40 +0000 (00:02 +0000)]
Automatic date update in version.in
Alan Modra [Tue, 2 Sep 2025 09:43:36 +0000 (19:13 +0930)]
visium MAX_MEM_FOR_RS_ALIGN_CODE
Commit
7ca6020a4e52 "tidy target HANDLE_ALIGN" didn't account for
the "fix" amount emitted by visium_handle_align. This didn't show up
as a problem due to frag alignment hiding the error, until I started
messing with struct frag.
* config/tc-visium.h (MAX_MEM_FOR_RS_ALIGN_CODE): Correct.
(cherry picked from commit
74fe8e29dc61bbe2c258c2c13f4b91f99faf6571)
GDB Administrator [Wed, 3 Sep 2025 00:04:16 +0000 (00:04 +0000)]
Automatic date update in version.in
GDB Administrator [Tue, 2 Sep 2025 00:03:29 +0000 (00:03 +0000)]
Automatic date update in version.in
H.J. Lu [Sun, 3 Aug 2025 17:28:40 +0000 (10:28 -0700)]
strip: Don't treat fat IR objects as plugin object
Fat IR objects contains both regular sections and IR sections. After
commit
717a38e9a02109fcbcb18bb2ec3aa251e2ad0a0d
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Sun May 4 05:12:46 2025 +0800
strip: Add GCC LTO IR support
"strip --strip-debug" no longer strips debug sections in fat IR objects
since fat IR objects are recognized as plugin object and copied as unknown
objects. Add a is_strip_input field to bfd to indicate called from strip.
Update bfd_check_format_matches not to treat archive member nor standalone
fat IR object as IR object so that strip can remove debug and IR sections
in fat IR object. For archive member, it is copied as an unknown object
if the plugin target is in use or it is a slim IR object. For standalone
fat IR object, it is copied as non-IR object.
bfd/
PR binutils/33246
* archive.c: Include "plugin-api.h" and "plugin.h" if plugin is
enabled.
(_bfd_compute_and_write_armap): Don't complain plugin is needed
when the plugin target is in use.
* bfd-in2.h: Regenerated.
* bfd.c (bfd): Add is_strip_input.
* format.c (bfd_set_lto_type): If there is .llvm.lto section,
set LTO type to lto_fat_ir_object.
(bfd_check_format_matches): Don't set LTO type when setting
format. When called from strip, don't treat archive member nor
standalone fat IR object as an IR object.
* plugin.c (bfd_plugin_get_symbols_in_object_only): Copy LTO
type derived from input sections.
nm/
PR binutils/33246
* nm.c (filter_symbols): Don't complain plugin is needed when
the plugin target is in use.
(display_rel_file): Likewise.
* objcopy.c (copy_archive): Set the BFD is_strip_input field of
archive member to 1 to indicate called from strip. Also copy
slim IR archive member as unknown object.
(copy_file): Set the BFD is_strip_input field of input bfd to
1 to indicate called from strip.
(strip_main): Keep .gnu.debuglto_* sections unless all GCC LTO
sections will be removed.
ld/
PR binutils/33246
* testsuite/ld-plugin/lto-binutils.exp (run_pr33246_test): New.
Run binutils/33246 tests with GCC and Clang.
* testsuite/ld-plugin/pr33246.c: New file.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
(cherry picked from commit
c2729c37f10af09126b2916215cae425ae724f55)
H.J. Lu [Thu, 31 Jul 2025 03:34:46 +0000 (20:34 -0700)]
strip: Treat "default" output_target as unspecified
Treat output target as unspecified if it is set to "default".
binutils/
PR binutils/33230
* objcopy.c (copy_file): Treat "default" output_target as
unspecified.
binutils/testsuite/
PR binutils/33230
* binutils-all/x86-64/x86-64.exp (run_pr33230_test): New.
Run binutils/33230 tests with readelf if supported.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
(cherry picked from commit
3ac83564eb3c858eb1add02b6e86b5628e4abd78)
H.J. Lu [Wed, 30 Jul 2025 15:53:11 +0000 (08:53 -0700)]
strip: Don't check target_defaulted in input BFD
The target_defaulted field in BFD is set to true if the target isn't
specified. After
commit
717a38e9a02109fcbcb18bb2ec3aa251e2ad0a0d
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Sun May 4 05:12:46 2025 +0800
strip: Add GCC LTO IR support
the target is set to "plugin" if BFD supports plugin when the target
isn't specified nor default. Update strip to check the input target,
instead of the target_defaulted field in input BFD.
PR binutils/33230
* objcopy.c (copy_object): Add a bool argument, target_defaulted,
to indicate if the input target isn't specified nor default.
Check it instead of ibfd->target_defaulted.
(copy_archive): Add a bool argument, target_defaulted, and pass
it to copy_object.
(copy_file): Set target_defaulted to true if the input target
isn't specified and pass it to copy_archive and copy_object.
* testsuite/binutils-all/x86-64/pr33230.obj.bz2: New file.
* testsuite/binutils-all/x86-64/x86-64.exp: Run PR binutils/33230
tests.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
(cherry picked from commit
8e885fece150ee97e5b0e78363e7fe9888ae9c29)
GDB Administrator [Mon, 1 Sep 2025 00:03:00 +0000 (00:03 +0000)]
Automatic date update in version.in
GDB Administrator [Sun, 31 Aug 2025 00:04:45 +0000 (00:04 +0000)]
Automatic date update in version.in
GDB Administrator [Sat, 30 Aug 2025 00:03:57 +0000 (00:03 +0000)]
Automatic date update in version.in
GDB Administrator [Fri, 29 Aug 2025 00:04:27 +0000 (00:04 +0000)]
Automatic date update in version.in
GDB Administrator [Thu, 28 Aug 2025 00:03:11 +0000 (00:03 +0000)]
Automatic date update in version.in
GDB Administrator [Wed, 27 Aug 2025 00:05:33 +0000 (00:05 +0000)]
Automatic date update in version.in
GDB Administrator [Tue, 26 Aug 2025 00:02:51 +0000 (00:02 +0000)]
Automatic date update in version.in
GDB Administrator [Mon, 25 Aug 2025 00:02:34 +0000 (00:02 +0000)]
Automatic date update in version.in
GDB Administrator [Sun, 24 Aug 2025 00:05:24 +0000 (00:05 +0000)]
Automatic date update in version.in
GDB Administrator [Sat, 23 Aug 2025 00:03:31 +0000 (00:03 +0000)]
Automatic date update in version.in
GDB Administrator [Fri, 22 Aug 2025 00:03:02 +0000 (00:03 +0000)]
Automatic date update in version.in
GDB Administrator [Thu, 21 Aug 2025 00:03:21 +0000 (00:03 +0000)]
Automatic date update in version.in
GDB Administrator [Wed, 20 Aug 2025 00:03:54 +0000 (00:03 +0000)]
Automatic date update in version.in
GDB Administrator [Tue, 19 Aug 2025 00:02:06 +0000 (00:02 +0000)]
Automatic date update in version.in
GDB Administrator [Mon, 18 Aug 2025 00:03:57 +0000 (00:03 +0000)]
Automatic date update in version.in
GDB Administrator [Sun, 17 Aug 2025 00:03:14 +0000 (00:03 +0000)]
Automatic date update in version.in
GDB Administrator [Sat, 16 Aug 2025 00:00:59 +0000 (00:00 +0000)]
Automatic date update in version.in
GDB Administrator [Fri, 15 Aug 2025 00:02:19 +0000 (00:02 +0000)]
Automatic date update in version.in
GDB Administrator [Thu, 14 Aug 2025 00:03:20 +0000 (00:03 +0000)]
Automatic date update in version.in
GDB Administrator [Wed, 13 Aug 2025 00:04:33 +0000 (00:04 +0000)]
Automatic date update in version.in
GDB Administrator [Tue, 12 Aug 2025 00:02:59 +0000 (00:02 +0000)]
Automatic date update in version.in
GDB Administrator [Mon, 11 Aug 2025 00:04:09 +0000 (00:04 +0000)]
Automatic date update in version.in
Nick Alcock [Wed, 23 Jul 2025 13:20:26 +0000 (14:20 +0100)]
libctf: link: rejig lazy opening to not need weak symbols
The ctf_link_add_ctf API function has a 'lazy opening' feature whereby,
if you pass in the file but not a CTF archive, the archive is opened
as late as possible during links. This is valuable mostly in
cu-mapped links (a feature not accessible via GNU ld), where it
ensures that, rather than eventually needing memory for the original
link inputs, the smushed-together cu-mapped intermediate outputs,
*and* the final output, we only need enough memory for the smushed-
together outputs, the final output, and one input, since the inputs
can be closed immediately after they are smushed together.
(In GNU ld, the feature is useless because it loads all sections into
memory anyway.)
The lazy-opening feature uses libctf's ctf_open function, which uses
BFD: so it is not available in libctf-nobfd -- except that I thought I
had a cunning trick, and used a weak symbol so that if you linked
libctf-nobfd into your program and then also linked in bfd, the feature
stayed enabled.
This is silly -- if your program is licensed such that you can link in
BFD, you can just link in libctf.so and not bother with libctf-nobfd.so
in the first place. Worse, the weak symbol usage broke MacOS builds,
since MacOS's system compiler uses a different means of introducing weak
symbols. We could test for and use it, but this is the only place in
libctf to use weak symbols at all, and the feature of lazy-opening with
libctf-nobfd is so marginal we might as well drop it: it's almost
certain there are zero users, certainly fewer users than users of MacOS
with the system compiler.
While we're at it, simplify things by deleting the never-implemented
feature (not exposed in the API) to allow linking together raw buffers
of CTF data. If we need it we can bring it back, but all it's doing
right now is complicating the code to no end at all.
libctf/
PR libctf/33194
* ctf-link.c (ctf_open): Delete weak pragma.
(ctf_link_add): Fuse with...
(ctf_link_add_ctf): ... this function. Drop BUF, N args
and corresponding unimplemented feature warnings. Only check
NOBFD to see whether lazy loading is available, not PIC as
well.
(ctf_link_lazy_open): Likewise.
(cherry picked from commit
d3e582895b2038feb47b68f1e03efaa0d9dae325)
Nick Alcock [Thu, 17 Jul 2025 16:45:02 +0000 (17:45 +0100)]
libctf: don't run tests requiring deduplicating linker unless one is in use
Before now, we were relying on gcc -B to repoint GCC at our freshly-built
linker, and assuming we could use this to run tests that do linker dedup.
This is, alas, not reliable (building --with-ld=/an/absolute/path bypasses
-B searches for the linker), and we would like the libctf tests in
particular to not fail if the compiler uses a linker that cannot deduplicate
(simply skipping such tests).
Add a new testsuite function that tries to link one of the lookup tests'
testcases (which is known to produce conflicting types, i.e. a dict with
per-translation-unit children) and then does an objdump and greps it for
signs of the per-translation-unit children. If there are none, the linker
probably just concatenated the sections: i.e., it is not a linker that
can deduplicate CTF.
libctf/
PR libctf/33162
* testsuite/config/default.exp (objdump): Introduce.
(OBJDUMPFLAGS): Likewise.
* testsuite/lib/ctf-lib.exp (check_ctf_linker_dedup): New.
* testsuite/libctf-lookup/lookup.exp: Use it.
* testsuite/libctf-regression/libctf-repeat-cu.exp: Likewise.
* testsuite/libctf-regression/regression.exp: Likewise.
(cherry picked from commit
4983bb052d3a57fe1b43334071ba61a8443bb5aa)
Rainer Orth [Wed, 16 Jul 2025 15:55:51 +0000 (16:55 +0100)]
libctf: exclude always-emitted Solaris symbols from the symtypetab
If we're skipping _BEGIN_ and _END_ we should certainly skip all the other
ABI-required always-emitted symbols given in ld/emultempl/solaris2*em as
well. (This fixes a couple of diagnostics tests, but that's just because
the tests are quite sensitive to CTF section sizes, and introducing any
symtypetab entries for those tests perturbs those.)
Some of these are usually STT_NOTYPE, but not always: if programs already
emitted the symbol they might end up with any type, in particular
STT_OBJECT, and appear in the symtypetabs.
[nca: added commit log, added more symbols]
libctf/
PR libctf/33162
* ctf-serialize.c (ctf_symtab_skippable): Skip
more always-emitted Solaris symbols.
(cherry picked from commit
4214ca9036c8f5d01025d0505ff1167700af5f98)
Nick Alcock [Wed, 16 Jul 2025 13:43:25 +0000 (14:43 +0100)]
libctf: get libctf-nobfd.ver from the right place with Solaris ld
We generate de-commented version scripts for Solaris ld (whose
-z gnu-version-script linker option does not support comments),
but after we switched to generating libctf-nobfd.ver itself, we
failed to adjust this code to pick it up from the new location.
libctf/
PR libctf/33161
* configure.ac: Fix libctf-nobfd.ver path on Solaris.
* configure: Regenerated.
(cherry picked from commit
3ff8956e4bf46ffd638bf12ea4788a858e905023)
Rainer Orth [Wed, 16 Jul 2025 12:10:05 +0000 (13:10 +0100)]
libctf: do not use mmap on Solaris 11
Writable mmaps and read are inconsistent with each other on Solaris 11.4,
which breaks archive writing. Simply assert that Solaris 2.11 doesn't have
mmap, falling back to read(): the archive format is being bumped shortly, to
one with completely different writeout code, so this workaround need not
stay for long.
[nca: added commit log]
libctf/
PR libctf/29292
* configure.ac: Turn off mmap on Solaris 2.11.
* configure: Regenerated.
(cherry picked from commit
00d853d1fe7885d0a685584f32b7ed70485c6def)
GDB Administrator [Sun, 10 Aug 2025 00:01:04 +0000 (00:01 +0000)]
Automatic date update in version.in
GDB Administrator [Sat, 9 Aug 2025 00:02:25 +0000 (00:02 +0000)]
Automatic date update in version.in
Xi Ruoyao [Wed, 6 Aug 2025 04:19:22 +0000 (12:19 +0800)]
LoongArch: Fix symbol size after relaxation
There's a logic error in loongarch_relax_perform_deletes: when there's
not any delete operation of which the start address is strictly smaller
than the symbol address, splay_tree_predecessor() will return nullptr
and the symbol size will be unchanged even if some bytes of it are
removed.
Make the logic more complete to fix this issue. Also factor out the
symbol size adjustment logic into a function to avoid code bloating.
Tested-by: WANG Xuerui <git@xen0n.name>
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
GDB Administrator [Fri, 8 Aug 2025 00:00:57 +0000 (00:00 +0000)]
Automatic date update in version.in
Matthieu Longo [Mon, 4 Aug 2025 10:04:13 +0000 (11:04 +0100)]
libiberty: sync with gcc
Import the following commits from GCC as of
r16-3056-gca2169c65bd169:
0d0837df697 libiberty: disable logging of list content for doubly-linked list tests
GDB Administrator [Thu, 7 Aug 2025 00:03:05 +0000 (00:03 +0000)]
Automatic date update in version.in
GDB Administrator [Wed, 6 Aug 2025 00:02:38 +0000 (00:02 +0000)]
Automatic date update in version.in
GDB Administrator [Tue, 5 Aug 2025 00:03:20 +0000 (00:03 +0000)]
Automatic date update in version.in
GDB Administrator [Mon, 4 Aug 2025 00:01:56 +0000 (00:01 +0000)]
Automatic date update in version.in
GDB Administrator [Sun, 3 Aug 2025 00:01:55 +0000 (00:01 +0000)]
Automatic date update in version.in
Alan Modra [Sat, 2 Aug 2025 00:42:21 +0000 (10:12 +0930)]
Re: resbin: don't pass NULL as printf %s arg
Commit
c6c8d0b82175 went completely the wrong way. "key" needs to be
NULL as that reads a different type of data.
PR 33244
* resbin.c (get_version_header): Don't pass a NULL key on to
toosmall.
(bin_to_res_version): Restore NULL key cases.
(cherry picked from commit
891d1654d7314fa520f708dbc5f1bf855d15bd40)
GDB Administrator [Sat, 2 Aug 2025 00:03:27 +0000 (00:03 +0000)]
Automatic date update in version.in
GDB Administrator [Fri, 1 Aug 2025 00:05:26 +0000 (00:05 +0000)]
Automatic date update in version.in
GDB Administrator [Thu, 31 Jul 2025 00:03:54 +0000 (00:03 +0000)]
Automatic date update in version.in
Alan Modra [Tue, 29 Jul 2025 22:48:19 +0000 (08:18 +0930)]
PR 33229 nds32 gas segfaults on gcc output
Commit
1ac26e9f7ac2 replaced ISSPACE with is_whitespace, but the
former returns true on EOL while the latter does not. Sprinkle
is_end_of_stmt tests to fix this bug.
The same segfault can be triggered by a ".relax_hint" with no
following instructions. Fix that too.
* config/tc-nds32.c (nds32_lookup_pseudo_opcode): Use
is_end_of_stmt along with is_whitespace.
(nds32_relax_relocs, nds32_relax_hint, nds32_flag),
(ict_model: Likewise.
(nds32_elf_append_relax_relocs): Return on no opcode.
* testsuite/gas/nds32/nds32.exp: Find .d files automatically.
* testsuite/gas/nds32/pr33229.d,
* testsuite/gas/nds32/pr33229.s: New test.
(cherry picked from commit
303045d9539d9032208b8b67f222943ff4c96b05)
GDB Administrator [Wed, 30 Jul 2025 00:03:28 +0000 (00:03 +0000)]
Automatic date update in version.in
GDB Administrator [Tue, 29 Jul 2025 00:04:56 +0000 (00:04 +0000)]
Automatic date update in version.in
GDB Administrator [Mon, 28 Jul 2025 00:02:01 +0000 (00:02 +0000)]
Automatic date update in version.in
Alan Modra [Fri, 18 Jul 2025 07:23:38 +0000 (16:53 +0930)]
Fix more unused variable warnings
(cherry picked from commit
9472a0558d67610b07776d34b1dbdcc8e40f393c)
Alan Modra [Fri, 18 Jul 2025 05:10:17 +0000 (14:40 +0930)]
Fix unused variable warnings
(cherry picked from commit
1cfce7750aefc84768e143076bac239134ceb40d)
Sam James [Thu, 17 Jul 2025 12:18:05 +0000 (13:18 +0100)]
binutils: drop unused note_size, contents, old variables
GCC trunk recently had improvements to its -Wunused-but-set-variable which
picked up that contents and hence note_size & old aren't used at all in the
end.
* objcopy.c (merge_gnu_build_notes): Drop unused 'note_size', 'contents',
and 'old' variables.
(cherry picked from commit
d3d1718602b179d8ec833851f5cb67ab9d314a92)
Sam James [Thu, 17 Jul 2025 12:16:31 +0000 (13:16 +0100)]
bfd: drop unused elt_no
GCC trunk recently had improvements to its -Wunused-but-set-variable which
picked up that elt_no isn't used at all in the end.
* archive.c (_bfd_compute_and_write_armap): Drop unused elt_no.
(cherry picked from commit
11153b13a56dae4ddd068ccf812ebc295783edf9)
Alan Modra [Sun, 27 Jul 2025 22:51:51 +0000 (08:21 +0930)]
Re: Re-enable development on the 2.45 branch
regen configure for the version bump 2.45 -> 2.45.0
Nick Clifton [Sun, 27 Jul 2025 09:53:38 +0000 (10:53 +0100)]
Re-enable development on the 2.45 branch
Nick Clifton [Sun, 27 Jul 2025 08:56:42 +0000 (09:56 +0100)]
This is the 2.45 release
Nick Clifton [Sun, 27 Jul 2025 08:21:48 +0000 (09:21 +0100)]
Oops - test files accidentally omitted from previous deltas
Indu Bhagat [Sun, 27 Jul 2025 08:15:37 +0000 (09:15 +0100)]
[PATCH] doc: sframe: mention errata 1 of SFrame version 2
With the changes of an added flag SFRAME_F_FDE_FUNC_START_PCREL, s390x
support and new section type SHT_GNU_SFRAME, indicate that this document
specifies the errata 1 of SFrame version 2. This will help distinguish
the document / specification better from previous releases.
libsframe/doc/
* sframe-spec.texi: Mention errata 1 of SFrame version 2.
Indu Bhagat [Sun, 27 Jul 2025 08:14:05 +0000 (09:14 +0100)]
[PATCH] readelf: objdump: sframe: fix dumping with section name
Fix PR binutils/33186 - No SFrame dump if section name is not .sframe
When the section name is not ".sframe", ensure that readelf and objdump
are able to dump a section of type SHT_GNU_SFRAME and not fail if the
user specifies the new section name.
For objdump, in dump_dwarf_section (), use the match string of ".sframe"
to find the corresponding debug_displays[] item for SFrame section.
Doing this ensures that any call to dump_dwarf_section () with the
section pointing to the SFrame section (with name possibly different
from ".sframe") will successfully dump the SFrame section.
If the SFrame section is named anything but ".sframe", and user does not
specify the name of the SFrame section either, the documented behaviour
is that the default section name is assumed to be ".sframe". So the
following (albeit counter intuitive) is expected at this time:
$ readelf -S sort | grep sframe
[NN] .sframe2 GNU_SFRAME 0000000000NNNNNN 0000NNNN
(Note section name .sframe2).
$ objdump --sframe sort
sort: file format elf64-x86-64
No .sframe section present
(Similarly for readelf as well).
For objdump, set dump_sframe_section_name to ".sframe" if user specifies
no section name. In the error checking done in dump_sframe_section, add
the case when user specifies a valid section name but one that does not
contain SFrame section data. For sections generated with Binutils >=
2.45, this can be checked with section type of SHT_GNU_SFRAME.
Previously these sections were SHT_PROGBITS with name ".sframe".
Similar changes in readelf.
Add a test each for objdump and readelf to dump a renamed section. Use
gas_sframe_check to limit the execution of these tests only when a gas
supporting SFrame format is present.
binutils/
PR binutils/33186
* objdump.c (dump_dwarf_section): Set match to ".sframe" which
corresponds to the name in the debug_displays[] entry for
SFrame section.
(dump_sframe_section): Check if the user specified section name
contains SFrame data.
(main): Set default section name to ".sframe".
* readelf.c (display_debug_section): Adjust checks to find the
debug_diplays[] item for the input arg SFrame section.
Use id instead of i, as it is more readable.
binutils/testsuite/
PR binutils/33186
* binutils-all/x86-64/objdump-sframe-01.d: New test.
* binutils-all/x86-64/readelf-sframe-01.d: New test.
* binutils-all/x86-64/sframe-func.s: New test.
Indu Bhagat [Sun, 27 Jul 2025 08:11:44 +0000 (09:11 +0100)]
[PATCH] gas: sframe: command line option takes precedence over gas directive to emit .sframe section.
Fix PR gas/33175 sframe: --gsframe=no does not disable when .cfi_sections directive with .sframe
--gsframe=no should also disable generation of SFrame section when explicit CFI directive: .cfi_sections .sframe is specified in the input.
This means we need to track whether SFrame generation was explicitly disabled by the user.
Introduce a new enum to facilitate disambiguation between GEN_SFRAME_DEFAULT_NONE and GEN_SFRAME_DISABLED.
While fixing the bug by adding the enum, keep the upcoming requirement in mind: we will also need to disambiguate between --enable-default-sframe and user-specified --gsframe/--gsframe=yes.
The intent is to not display SFrame related warnings or errors like: as_bad (_(".sframe not supported for target")); for unsupported targets if --enable-default-sframe is in effect.
This implies we need to have a four state enum ( GEN_SFRAME_DEFAULT_NONE, GEN_SFRAME_CONFIG_ENABLED, GEN_SFRAME_DISABLED, GEN_SFRAME_ENABLED) gas
GDB Administrator [Sun, 27 Jul 2025 00:04:22 +0000 (00:04 +0000)]
Automatic date update in version.in
GDB Administrator [Sat, 26 Jul 2025 00:03:17 +0000 (00:03 +0000)]
Automatic date update in version.in
Alice Carlotti [Thu, 24 Jul 2025 17:49:36 +0000 (18:49 +0100)]
gas/NEWS: Add AArch64 updates
Alice Carlotti [Thu, 24 Jul 2025 16:15:43 +0000 (17:15 +0100)]
gas/doc: Update AArch64 Architecture Extensions
Add faminmax, move a couple of misplaced entries, and improve a few
other entries.
The documentation now lists every recognised extension name, with the
exception of a couple of aliases that are deliberately undocumented.
Alice Carlotti [Thu, 24 Jul 2025 15:04:04 +0000 (16:04 +0100)]
aarch64: Fix sve2p2/sme2p2 dependencies
Change dependency on sve2/sme2 to sve2p1/sme2p1.
Rainer Orth [Fri, 25 Jul 2025 07:49:13 +0000 (09:49 +0200)]
ld: Force SHELL=/bin/bash in ld for Solaris [PR32580]
As described in PR ld/32580, when using SHELL=/bin/sh or /bin/ksh on
Solaris, the generated linker scripts get corrupted. So far, the only
workaround is to enforce /bin/bash instead.
This is a major nuisance for developers and users alike, so this patch
automates this by overriding SHELL in ld/configure.ac.
Tested on amd64-pc-solaris2.11 in three configurations:
* CONFIG_SHELL unset
* CONFIG_SHELL=/bin/ksh
* CONFIG_SHELL='/bin/bash --norc'
In the first two cases, SHELL was set to /bin/bash as desired, while in
the third it was left unchanged.
2025-07-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
ld:
PR ld/32580
* configure.ac <*-*-solaris2*>: Enforce SHELL=/bin/bash.
* configure: Regenerate.
(cherry picked from commit
96ad2fd3c0c0414110fe58ed4ee511f49768fa3d)
GDB Administrator [Fri, 25 Jul 2025 00:04:34 +0000 (00:04 +0000)]
Automatic date update in version.in
Indu Bhagat [Thu, 17 Jul 2025 22:17:36 +0000 (15:17 -0700)]
gas: sframe: fix PR gas/33170
SFrame generation code assumes that since DW_CFA_restore means
restoration of the state of the register to the one at the beginning of
the function, there must be a state to restore to (hence the gas_assert
(cie_fre)).
This assumption needs adjustment. DW_CFA_restore may be present in the
very beginning of a (e.g., cold) function, with no initialized state for
SFrame functions to restore to.
gas/
PR gas/33170
* gas/gen-sframe.c (sframe_xlate_do_restore): Use current FRE if
CIE FRE is not yet setup.
gas/testsuite/
PR gas/33170
* gas/cfi-sframe/cfi-sframe.exp: New test.
* gas/cfi-sframe/cfi-sframe-x86_64-pr33170.d: New test.
* gas/cfi-sframe/cfi-sframe-x86_64-pr33170.s: New test.
(cherry picked from commit
83eeaf917873a550656faf9a38cd14e0f4c521b1)
H.J. Lu [Tue, 22 Jul 2025 21:09:48 +0000 (14:09 -0700)]
strip: Properly handle LLVM IR bitcode
commit
717a38e9a02109fcbcb18bb2ec3aa251e2ad0a0d
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Sun May 4 05:12:46 2025 +0800
strip: Add GCC LTO IR support
added "-R .gnu.lto_.*" to strip to remove all GCC LTO sections. When
"-R .gnu.lto_.*" is used, the plugin target is ignored so that all LTO
sections are stripped as the regular sections. It works for the slim
GCC LTO IR since the GCC LTO IR is stored in the regular sections. When
the plugin target is ignored, the GCC LTO IR can be recognized as the
normal object files. But it doesn't work for the slim LLVM IR which
is stored in a standalone file.
1. Add bfd_check_format_matches_lto and bfd_check_format_lto to take an
argument, lto_sections_removed, to indicate if all LTO sections should
be removed.
2. Update strip to always enable the plugin target so that the plugin
target is enabled when checking for bfd_archive.
3. Update strip to ignore the plugin target for bfd_object when all LTO
sections should be removed. If the object is unknown, copy it as an
unknown file without any messages.
4. Treat the "-R .llvm.lto" strip option as removing all LTO sections.
bfd/
PR binutils/33198
* format.c (bfd_check_format_lto): New function.
(bfd_check_format): Call bfd_check_format_matches_lto.
(bfd_check_format_matches): Renamed to ...
(bfd_check_format_matches_lto): This. Add an argument,
lto_sections_removed, to indicate if all LTO sections should be
removed and don't match the plugin target if lto_sections_removed
is true.
(bfd_check_format_matches): Call bfd_check_format_matches_lto.
* bfd-in2.h: Regenerated.
binutils/
PR binutils/33198
* objcopy.c (copy_archive): Call bfd_check_format_lto, instead
of bfd_check_format, and pass lto_sections_removed. Remove the
non-fatal message on unknown element since it will be copied as
an unknown file.
(copy_file): Don't check lto_sections_removed when enabling LTO
plugin in strip.
(copy_file): Ignore the plugin target first if all LTO sections
should be removed. Try with the plugin target next if ignoring
the plugin target failed to match the format.
(strip_main): Also set lto_sections_removed for -R .llvm.lto.
* testsuite/binutils-all/x86-64/pr33198.c: New file.
* testsuite/binutils-all/x86-64/x86-64.exp (run_pr33198_test):
New.
Run binutils/33198 tests.
* testsuite/lib/binutils-common.exp (llvm_plug_opt): New.
(CLANG_FOR_TARGET): New. Set to "clang" for native build if
"clang -v" reports "clang version".
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
(cherry picked from commit
f752be8f916efa70aea9c2e4f664c75690fd136c)
Alan Modra [Wed, 23 Jul 2025 12:22:31 +0000 (21:52 +0930)]
PR 33197 [AVR] Incorrect syntax in generated ldscript
Rearrange scripttempl/avr.sc to avoid oddities of shells expanding
${RELOCATING+stuff} in here documents where "stuff" contains quoted
strings. Also I think it is better to avoid multi-line "stuff" as it
can be tricky to spot the ending brace.
(cherry picked from commit
ae114fb523efe908f9e807359e2f494ee64d2801)
GDB Administrator [Thu, 24 Jul 2025 00:08:18 +0000 (00:08 +0000)]
Automatic date update in version.in
GDB Administrator [Wed, 23 Jul 2025 00:05:59 +0000 (00:05 +0000)]
Automatic date update in version.in
Nick Clifton [Tue, 22 Jul 2025 14:57:38 +0000 (15:57 +0100)]
Updated translations for various sub-directories
Torbjörn SVENSSON [Fri, 18 Jul 2025 15:04:09 +0000 (17:04 +0200)]
ld: Rename a file on Windows fails if target already exists
To rename a file on Windows, the target name cannot exist. Removing file
prior to renaming ensures this is handled.
To remove a file on Windows, the file cannot be open. Closing the bfd
handle ensures this is handled.
Moved call to free on isympp / osympp to after bfd is closed to align
with comment earlier in the cmdline_add_object_only_section function.
Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
(cherry picked from commit
233cd5946413108bf4902b22a9cb23ad0a468f5e)
Dmitrii Bordukov [Sat, 19 Jul 2025 12:21:46 +0000 (15:21 +0300)]
gprofng: do not skip weak symbols
PR gprofng/33151
gprofng ignores functions that are compiled as weak symbols. This
heavily affects C++ class methods that are always compiled by g++
and clang++ as weak symbols. In this case 'gprofng display text'
just displays <static>@ADDRESS(<FILENAME>) instead of proper method
name.
The bug has been introduced in the commit
470a0288a818.
Alan Modra [Thu, 17 Jul 2025 05:12:31 +0000 (14:42 +0930)]
Remove sframe relocs against discarded sections
Commit
d7f343eaad3f testsuite change resulted in a regression for
s390x-linux. This extends the x86_64 fix to other targets.
PR ld/33156
* elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Remove .sframe
relocs too.
(cherry picked from commit
fcf7470408aa0508fbe99abb99547757a348383d)
Indu Bhagat [Tue, 15 Jul 2025 00:01:53 +0000 (17:01 -0700)]
libsframe: relax the assertion limit for fre_start_addr
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.
(cherry picked from commit
387efef5fef727cbe52099dcd5012905c4205be3)
This page took 0.096401 seconds and 5 git commands to generate.