This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix PR14926


Applied.

	PR ld/14926
	* elf.c (_bfd_elf_map_sections_to_segments): Include elf header
	size when determining phdr_in_segment.

Index: bfd/elf.c
===================================================================
RCS file: /cvs/src/src/bfd/elf.c,v
retrieving revision 1.577
diff -u -p -r1.577 elf.c
--- bfd/elf.c	21 Nov 2012 21:31:17 -0000	1.577
+++ bfd/elf.c	7 Dec 2012 02:05:20 -0000
@@ -3874,6 +3874,7 @@ _bfd_elf_map_sections_to_segments (bfd *
 
 	  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

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]