ctf_next_t *i = NULL;
const char *name;
size_t member = 0;
+ int try_defaults = 0;
int err;
if (sect_name == NULL)
- sect_name = ".ctf";
+ {
+ sect_name = ".ctf";
+ try_defaults = 1;
+ }
sec = read_section (abfd, sect_name, &ctfdata);
+ if (sec == NULL && try_defaults)
+ {
+ sect_name = ".BTF";
+ sec = read_section (abfd, sect_name, &ctfdata);
+ }
+
if (sec == NULL)
{
my_bfd_nonfatal (bfd_get_filename (abfd));
return;
}
- printf (_("Contents of CTF section %s:\n"), sanitize_string (sect_name));
+ printf (_("Contents of type section %s:\n"), sanitize_string (sect_name));
while ((fp = ctf_archive_next (ctfa, &i, &name, 0, &err)) != NULL)
{
strsect.cts_data = strdata;
}
- /* Load the CTF file and dump it. It may be a raw CTF section, or an archive:
- libctf papers over the difference, so we can pretend it is always an
- archive. */
+ /* Load the section and dump it. It may be a raw CTF or BTF section, or an
+ archive: libctf papers over the difference, so we can pretend it is always
+ an archive. */
if ((ctfa = ctf_arc_bufopen (&ctfsect, symsectp, strsectp, &err)) == NULL)
{
ret = true;
if (filedata->is_separate)
- printf (_("\nDump of CTF section '%s' in linked file %s:\n"),
+ printf (_("\nDump of type section '%s' in linked file %s:\n"),
printable_section_name (filedata, section),
filedata->file_name);
else
- printf (_("\nDump of CTF section '%s':\n"),
+ printf (_("\nDump of type section '%s':\n"),
printable_section_name (filedata, section));
while ((fp = ctf_archive_next (ctfa, &i, &name, 0, &err)) != NULL)