This is the mail archive of the binutils@sourceware.org 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]

Re: Permission of overlapping segments


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


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