On Wed, Nov 20, 2013 at 3:57 AM, Nagaraju Mekala <gnuuser.raj@xxxxxxxxx> wrote: > > In the program header of elf can we have p_offset as 0x00000000. Is > it a vaild elf file if we have p_offset with 0. Yes, this is normal. > Program Header: > LOAD off 0x00000000 vaddr 0xfffc0000 paddr 0xfffc0000 align 2**15 > filesz 0x00015b80 memsz 0x00015b80 flags rwx > > > Sections: > Idx Name Size VMA LMA File off Algn > 0 .text 0000b638 fffc4800 fffc4800 00004800 2**5 > CONTENTS, ALLOC, LOAD, READONLY, CODE The p_offset field is simply the offset of the PT_LOAD segment within the file. This says that the PT_LOAD segment starts at the beginning of the file. This is normal, and means that the segment includes the file header and program headers. The dynamic linker will use that information, so it is convenient to have it loaded into memory. Ian