Always pass a valid section header offset to elf_parse_notes
[deliverable/binutils-gdb.git] / bfd / elf.c
index 3d1a28aa7eef24abcbe04040e309158a6db5f851..98be1db6d789728539e047fff4455f3195cc5dda 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -1062,7 +1062,7 @@ _bfd_elf_make_section_from_shdr (bfd *abfd,
       if (!bfd_malloc_and_get_section (abfd, newsect, &contents))
        return FALSE;
 
-      elf_parse_notes (abfd, (char *) contents, hdr->sh_size, -1);
+      elf_parse_notes (abfd, (char *) contents, hdr->sh_size, hdr->sh_offset);
       free (contents);
     }
 
This page took 0.024023 seconds and 4 git commands to generate.