struct dwarf_section *section = &debug_displays [debug].section;
bfd *abfd = (bfd *) file;
asection *sec;
+ const char *name;
/* If it is already loaded, do nothing. */
if (section->start != NULL)
return true;
}
/* Locate the debug section. */
- sec = bfd_get_section_by_name (abfd, section->uncompressed_name);
- if (sec != NULL)
- section->name = section->uncompressed_name;
- else
+ name = section->uncompressed_name;
+ sec = bfd_get_section_by_name (abfd, name);
+ if (sec == NULL)
{
- sec = bfd_get_section_by_name (abfd, section->compressed_name);
- if (sec != NULL)
- section->name = section->compressed_name;
- else
- {
- sec = bfd_get_section_by_name (abfd, section->xcoff_name);
- if (sec != NULL)
- section->name = section->xcoff_name;
- }
+ name = section->compressed_name;
+ if (*name)
+ sec = bfd_get_section_by_name (abfd, name);
+ }
+ if (sec == NULL)
+ {
+ name = section->xcoff_name;
+ if (*name)
+ sec = bfd_get_section_by_name (abfd, name);
}
if (sec == NULL)
return false;
+ section->name = name;
return load_specific_debug_section (debug, sec, file);
}
const char *match;
int i;
+ if (*name == 0)
+ return;
+
if (startswith (name, ".gnu.linkonce.wi."))
match = ".debug_info";
else