SELF File Format: Difference between revisions

From Vita Developer wiki
Jump to navigation Jump to search
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
[[Category:Software]]<noinclude>[[Category:Main]]</noinclude>
#REDIRECT [https://www.psdevwiki.com/ps3/SELF_-_SPRX]
 
= 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 ===

Latest revision as of 23:40, 30 January 2020

  1. REDIRECT [1]