+2017-10-01 Alan Modra <amodra@gmail.com>
+
+ PR 22232
+ PR 22230
+ * objdump.c (load_specific_debug_section): Introduce a temp to
+ stop bfd_get_full_section_contents NULLing out section->start.
+
2017-10-01 Alan Modra <amodra@gmail.com>
PR 22230
{
struct dwarf_section *section = &debug_displays [debug].section;
bfd *abfd = (bfd *) file;
+ bfd_byte *contents;
bfd_boolean ret;
/* If it is already loaded, do nothing. */
section->num_relocs = 0;
section->address = bfd_get_section_vma (abfd, sec);
section->size = bfd_get_section_size (sec);
- section->start = malloc (section->size + 1);
+ section->start = contents = malloc (section->size + 1);
section->user_data = sec;
if (section->start == NULL
- || !bfd_get_full_section_contents (abfd, sec, §ion->start))
+ || !bfd_get_full_section_contents (abfd, sec, &contents))
{
free_debug_section (debug);
printf (_("\nCan't get contents for section '%s'.\n"),