-G, --stabs Display (in raw form) any STABS info in the file\n\
-W[lLiaprmfFsoRt] or\n\
--dwarf[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,\n\
- =frames-interp,=str,=loc,=Ranges,=pubtypes]\n\
+ =frames-interp,=str,=loc,=Ranges,=pubtypes,\n\
+ =trace_info,=trace_abbrev,=trace_aranges]\n\
Display DWARF info in the file\n\
-t, --syms Display the contents of the symbol table(s)\n\
-T, --dynamic-syms Display the contents of the dynamic symbol table\n\
section->size = bfd_get_section_size (sec);
section->start = (unsigned char *) xmalloc (section->size);
- if (is_relocatable && debug_displays [debug].relocate)
- ret = bfd_simple_get_relocated_section_contents (abfd,
- sec,
- section->start,
- syms) != NULL;
- else
- ret = bfd_get_section_contents (abfd, sec, section->start, 0,
- section->size);
+ ret = bfd_get_section_contents (abfd, sec, section->start, 0,
+ section->size);
if (! ret)
{
section->size = size;
}
+ if (is_relocatable && debug_displays [debug].relocate)
+ {
+ /* We want to relocate the data we've already read (and
+ decompressed), so we store a pointer to the data in
+ the bfd_section, and tell it that the contents are
+ already in memory. */
+ sec->contents = section->start;
+ sec->flags |= SEC_IN_MEMORY;
+ sec->size = section->size;
+
+ ret = bfd_simple_get_relocated_section_contents (abfd,
+ sec,
+ section->start,
+ syms) != NULL;
+
+ if (! ret)
+ {
+ free_debug_section (debug);
+ printf (_("\nCan't get contents for section '%s'.\n"),
+ section->name);
+ return 0;
+ }
+ }
+
return 1;
}