Permission of overlapping segments
Alan Modra
amodra@bigpond.net.au
Fri Aug 10 07:06:00 GMT 2007
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
More information about the Binutils
mailing list