This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Permission of overlapping segments
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: "Udo A. Steinberg" <us15 at os dot inf dot tu-dresden dot de>
- Cc: binutils at sourceware dot org
- Date: Fri, 10 Aug 2007 16:36:48 +0930
- Subject: Re: Permission of overlapping segments
- References: <20070809202029.6ca5e98b@laptop.hypervisor.org>
On Thu, Aug 09, 2007 at 08:20:29PM +0200, Udo A. Steinberg wrote:
> LOAD off 0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2**12
> filesz 0x00000595 memsz 0x00000595 flags r-x
> LOAD off 0x00000598 vaddr 0x00400598 paddr 0x00400598 align 2**12
> filesz 0x00000008 memsz 0x00001000 flags rw-
>
> What should an ELF loader do here - merge permissions such that 0x400000
> is rwx or is such a segment layout illegal?
You're asking for trouble. The loader may refuse to load this file,
or it may mmap the pages occupied by the second PT_LOAD segment on top
of the first.
--
Alan Modra
Australia Development Lab, IBM