aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index a936636..f010f5a 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -3874,6 +3874,7 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info)
if (phdr_size == (bfd_size_type) -1)
phdr_size = get_program_header_size (abfd, info);
+ phdr_size += bed->s->sizeof_ehdr;
if ((abfd->flags & D_PAGED) == 0
|| (sections[0]->lma & addr_mask) < phdr_size
|| ((sections[0]->lma & addr_mask) % maxpagesize