Always pass a valid section header offset to elf_parse_notes
[deliverable/binutils-gdb.git] / bfd / elf.c
index 5cc938d8117ed449d56debfab8ff0449c39e6412..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);
     }
 
@@ -4254,7 +4254,7 @@ get_program_header_size (bfd *abfd, struct bfd_link_info *info)
         PT_INTERP segment.  In this case, assume we also need a
         PT_PHDR segment, although that may not be true for all
         targets.  */
-      segs += 3;
+      segs += 2;
     }
 
   if (bfd_get_section_by_name (abfd, ".dynamic") != NULL)
This page took 0.024096 seconds and 4 git commands to generate.