Editing SELF File Format
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
[[Category:Software]]<noinclude>[[Category:Main]]</noinclude> | |||
= File Format = | |||
== ELF Program Headers == | |||
=== Struct === | |||
<source lang="C"> | |||
typedef struct { | |||
uint32_t p_type; /* type of segment */ | |||
uint32_t p_flags; /* segment attributes */ | |||
uint64_t p_offset; /* offset in file */ | |||
uint64_t p_vaddr; /* virtual address in memory */ | |||
uint64_t p_paddr; /* reserved */ | |||
uint64_t p_filesz; /* size of segment in file */ | |||
uint64_t p_memsz; /* size of segment in memory */ | |||
uint64_t p_align; /* alignment of segment */ | |||
} __attribute__((packed)) ELF_PHDR; | |||
</source> | |||
=== Table === | |||
=== Comments === | |||
See Spec here: [http://www.sco.com/developers/gabi/latest/ch5.pheader.html ELF Program Headers] | |||
== ELF Section Headers == | |||
=== Struct === | |||
<source lang="C"> | |||
typedef struct { | |||
uint32_t sh_name; /* section name */ | |||
uint32_t sh_type; /* section type */ | |||
uint64_t sh_flags; /* section attributes */ | |||
uint64_t sh_addr; /* virtual address in memory */ | |||
uint64_t sh_offset; /* offset in file */ | |||
uint64_t sh_size; /* size of section */ | |||
uint32_t sh_link; /* link to other section */ | |||
uint32_t sh_info; /* miscellaneous information */ | |||
uint64_t sh_addralign; /* address alignment boundary */ | |||
uint64_t sh_entsize; /* size of entries, if section has table */ | |||
} __attribute__((packed)) ELF_SHDR; | |||
</source> | |||
=== Table === | |||
=== Comments === |