This is the mail archive of the 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]

Revert accidental elf.c change

On Mon, Nov 28, 2016 at 12:56:04PM +1030, Alan Modra wrote:
> >    A recent binutils commit:
> >;a=commitdiff;h=1a9ccd70f9a75dc6b48d340059f28ef3550c107b
> >    has broken kernel builds:
> So this change added space for another header, it seems.  I suspect
> that was accidental, particularly since there was no mention of
> get_program_header_size in the ChangeLog entry.

Nick, was I correct in the above comment?  Two headers I agree with,
but can't see why you need the third?

	* elf.c (get_program_header_size): Revert accidental change.

diff --git a/bfd/elf.c b/bfd/elf.c
index 5cc938d..3d1a28a 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -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)

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]