This is the mail archive of the libc-hacker@cygnus.com mailing list for the glibc project.


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

Re: coping with PT_PHDR not being in loaded segment


   From: Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
   Date: 11 May 1999 10:21:04 +0200

   I think this is a bug in the testsuite.  The linker script elf-offset.ld
   sets the load offset without taking the headers into account, which causes
   the linker to add padding to make it page aligned.  Could you please try
   this patch?

That patch does fix the problem.

However, my thinking is that the ELF standard never states that a
PT_PHDR segment is required, nor does it state that the program
headers must be in memory which is loaded at runtime (e.g., PT_LOAD
segments).  In fact, it implies that having program headers in
non-loadable memory is perfectly fine.

This test case creates a case in which the linker does not put the
progam headers in a loadable segment, but that is not wrong; the
dynamic linker should be able to cope.

Ian


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