aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2012-12-07 04:58:36 +0000
committerAlan Modra <amodra@gmail.com>2012-12-07 04:58:36 +0000
commitd2bcb0d1aaa0d73b3c7625d6d7a58e013969c28b (patch)
tree8309c9e972021150bdedd95b606f1423eae23e69 /bfd/elf.c
parentae2eea65c66ca86d63e6f46ec9926ae0ac7eb2f7 (diff)
downloadgdb-d2bcb0d1aaa0d73b3c7625d6d7a58e013969c28b.zip
gdb-d2bcb0d1aaa0d73b3c7625d6d7a58e013969c28b.tar.gz
gdb-d2bcb0d1aaa0d73b3c7625d6d7a58e013969c28b.tar.bz2
PR ld/14926
* elf.c (_bfd_elf_map_sections_to_segments): Include elf header size when determining phdr_in_segment.
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