https://sourceware.org/bugzilla/show_bug.cgi?id=33186
--- Comment #7 from Sourceware Commits <cvs-commit at gcc dot gnu.org> --- The binutils-2_45-branch branch has been updated by Nick Clifton <ni...@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bb6b63d7b11fe9abdb8f14bffbba71bac1bd9e6d commit bb6b63d7b11fe9abdb8f14bffbba71bac1bd9e6d Author: Indu Bhagat <indu.bha...@oracle.com> Date: Sun Jul 27 09:14:05 2025 +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. -- You are receiving this mail because: You are on the CC list for the bug.