This is the mail archive of the
libc-hacker@cygnus.com
mailing list for the glibc project.
Re: coping with PT_PHDR not being in loaded segment
- To: schwab@issan.cs.uni-dortmund.de
- Subject: Re: coping with PT_PHDR not being in loaded segment
- From: Ian Lance Taylor <ian@zembu.com>
- Date: Tue, 11 May 1999 08:54:09 -0700
- CC: Franz.Sirl-kernel@lauterbach.com, drepper@cygnus.com, roland@frob.com, libc-hacker@gnu.org
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