else
match = name;
+ if (elf_section_type (section) == SHT_GNU_SFRAME)
+ match = ".sframe";
+
for (i = 0; i < max; i++)
if ((strcmp (debug_displays [i].section.uncompressed_name, match) == 0
|| strcmp (debug_displays [i].section.compressed_name, match) == 0
printf (_("No %s section present\n\n"), sanitize_string (sect_name));
return;
}
+ /* Starting with Binutils 2.45, SFrame sections have section type
+ SHT_GNU_SFRAME. For SFrame sections from Binutils 2.44 or earlier,
+ check explcitly for SFrame sections of type SHT_PROGBITS and name
+ ".sframe" to allow them. */
+ else if (elf_section_type (sec) != SHT_GNU_SFRAME
+ && !(elf_section_type (sec) == SHT_PROGBITS
+ && strcmp (sect_name, ".sframe") == 0))
+ {
+ printf (_("Section %s does not contain SFrame data\n\n"),
+ sanitize_string (sect_name));
+ return;
+ }
}
dump_dwarf (abfd, is_mainfile);
}
if (optarg)
dump_sframe_section_name = xstrdup (optarg);
+ else
+ dump_sframe_section_name = ".sframe";
- /* Error checking for user-provided section name is done in
+ /* Error checking for dump_sframe_section_name is done in
dump_sframe_section (). Initialize for now with the default
internal name: "sframe-internal-only". */
dwarf_select_sections_by_names ("sframe-internal-only");
if (streq (sec->uncompressed_name, name)
|| (id == line && startswith (name, ".debug_line."))
+ || (id == sframe && section->sh_type == SHT_GNU_SFRAME)
|| streq (sec->compressed_name, name))
{
bool secondary = (section != find_section (filedata, name));
if (i == line && startswith (name, ".debug_line."))
sec->name = name;
+ else if (id == sframe && section->sh_type == SHT_GNU_SFRAME)
+ sec->name = name;
else if (streq (sec->uncompressed_name, name))
sec->name = sec->uncompressed_name;
else
--- /dev/null
+#PROG:objcopy
+#name: objdump dump SFrame section .sframe2
+#source: sframe-func.s
+#as: --gsframe
+#objcopy: --rename-section .sframe=.sframe2
+#objdump: --sframe=.sframe2
+#target: x86_64-*-*
+#xfail: ![gas_sframe_check]
+
+#...
+ Header :
+
+ Version: SFRAME_VERSION_2
+ Flags: SFRAME_F_FDE_FUNC_START_PCREL
+ CFA fixed RA offset: -8
+ Num FDEs: 1
+ Num FREs: 4
+#pass
--- /dev/null
+#PROG:objcopy
+#name: readelf dump SFrame section .sframe2
+#source: sframe-func.s
+#as: --gsframe
+#objcopy: --rename-section .sframe=.sframe2
+#readelf: --sframe=.sframe2
+#target: x86_64-*-*
+#xfail: ![gas_sframe_check]
+
+#...
+ Header :
+
+ Version: SFRAME_VERSION_2
+ Flags: SFRAME_F_FDE_FUNC_START_PCREL
+ CFA fixed RA offset: -8
+ Num FDEs: 1
+ Num FREs: 4
+#pass