diff options
author | rsc <rsc> | 2006-07-16 15:41:47 +0000 |
---|---|---|
committer | rsc <rsc> | 2006-07-16 15:41:47 +0000 |
commit | ef2bd07ae4cb2e27d62cfdcb7e71d82948fb80ed (patch) | |
tree | 3c5f126bb04d4c6c26dcb8295959fad224dfbf5d /elf.h | |
parent | 6b765c480f8c810fc495a32baa696bbeb75adc09 (diff) | |
download | xv6-labs-ef2bd07ae4cb2e27d62cfdcb7e71d82948fb80ed.tar.gz xv6-labs-ef2bd07ae4cb2e27d62cfdcb7e71d82948fb80ed.tar.bz2 xv6-labs-ef2bd07ae4cb2e27d62cfdcb7e71d82948fb80ed.zip |
standardize on not using foo_ prefix in struct foo
Diffstat (limited to 'elf.h')
-rw-r--r-- | elf.h | 54 |
1 files changed, 25 insertions, 29 deletions
@@ -1,43 +1,39 @@ -#ifndef JOS_INC_ELF_H -#define JOS_INC_ELF_H - #define ELF_MAGIC 0x464C457FU /* "\x7FELF" in little endian */ struct Elf { - uint32_t e_magic; // must equal ELF_MAGIC - uint8_t e_elf[12]; - uint16_t e_type; - uint16_t e_machine; - uint32_t e_version; - uint32_t e_entry; - uint32_t e_phoff; - uint32_t e_shoff; - uint32_t e_flags; - uint16_t e_ehsize; - uint16_t e_phentsize; - uint16_t e_phnum; - uint16_t e_shentsize; - uint16_t e_shnum; - uint16_t e_shstrndx; + uint32_t magic; // must equal ELF_MAGIC + uint8_t elf[12]; + uint16_t type; + uint16_t machine; + uint32_t version; + uint32_t entry; + uint32_t phoff; + uint32_t shoff; + uint32_t flags; + uint16_t ehsize; + uint16_t phentsize; + uint16_t phnum; + uint16_t shentsize; + uint16_t shnum; + uint16_t shstrndx; }; struct Proghdr { - uint32_t p_type; - uint32_t p_offset; - uint32_t p_va; - uint32_t p_pa; - uint32_t p_filesz; - uint32_t p_memsz; - uint32_t p_flags; - uint32_t p_align; + uint32_t type; + uint32_t offset; + uint32_t va; + uint32_t pa; + uint32_t filesz; + uint32_t memsz; + uint32_t flags; + uint32_t align; }; -// Values for Proghdr::p_type +// Values for Proghdr type #define ELF_PROG_LOAD 1 -// Flag bits for Proghdr::p_flags +// Flag bits for Proghdr flags #define ELF_PROG_FLAG_EXEC 1 #define ELF_PROG_FLAG_WRITE 2 #define ELF_PROG_FLAG_READ 4 -#endif /* !JOS_INC_ELF_H */ |