summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/binutils/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/binutils/bfd')
-rw-r--r--gnu/usr.bin/binutils/bfd/elf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gnu/usr.bin/binutils/bfd/elf.c b/gnu/usr.bin/binutils/bfd/elf.c
index 0b5b9b16bde..17893e1bd69 100644
--- a/gnu/usr.bin/binutils/bfd/elf.c
+++ b/gnu/usr.bin/binutils/bfd/elf.c
@@ -2272,7 +2272,7 @@ get_program_header_size (abfd)
{
struct elf_segment_map *m;
- segs = 1;
+ segs = 0;
for (m = elf_tdata (abfd)->segment_map; m != NULL; m = m->next)
++segs;
elf_tdata (abfd)->program_header_size = segs * bed->s->sizeof_phdr;
@@ -2281,7 +2281,7 @@ get_program_header_size (abfd)
/* Assume we will need exactly two PT_LOAD segments: one for text
and one for data. */
- segs = 3;
+ segs = 2;
s = bfd_get_section_by_name (abfd, ".interp");
if (s != NULL && (s->flags & SEC_LOAD) != 0)