diff options
Diffstat (limited to 'utils/libmach/elf.h')
| -rw-r--r-- | utils/libmach/elf.h | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/utils/libmach/elf.h b/utils/libmach/elf.h index b182135b..5d755b7a 100644 --- a/utils/libmach/elf.h +++ b/utils/libmach/elf.h @@ -2,20 +2,20 @@ * Definitions needed for accessing Irix ELF headers */ typedef struct { - unsigned char ident[16]; /* ident bytes */ - ushort type; /* file type */ - ushort machine; /* target machine */ - int version; /* file version */ - ulong elfentry; /* start address */ - ulong phoff; /* phdr file offset */ - ulong shoff; /* shdr file offset */ - int flags; /* file flags */ - ushort ehsize; /* sizeof ehdr */ - ushort phentsize; /* sizeof phdr */ - ushort phnum; /* number phdrs */ - ushort shentsize; /* sizeof shdr */ - ushort shnum; /* number shdrs */ - ushort shstrndx; /* shdr string index */ + uchar ident[16]; /* ident bytes */ + ushort type; /* file type */ + ushort machine; /* target machine */ + int version; /* file version */ + ulong elfentry; /* start address */ + ulong phoff; /* phdr file offset */ + ulong shoff; /* shdr file offset */ + int flags; /* file flags */ + ushort ehsize; /* sizeof ehdr */ + ushort phentsize; /* sizeof phdr */ + ushort phnum; /* number phdrs */ + ushort shentsize; /* sizeof shdr */ + ushort shnum; /* number shdrs */ + ushort shstrndx; /* shdr string index */ } Ehdr; typedef struct { @@ -78,7 +78,9 @@ enum { I860 = 7, /* Intel i860 */ MIPS = 8, /* Mips R2000 */ S370 = 9, /* Amdhal */ + SPARC64 = 18, /* Sun SPARC v9 */ POWER = 20, /* PowerPC */ + ARM = 40, /* ARM */ AMD64 = 62, /* Amd64 */ NO_VERSION = 0, /* version, ident[VERSION] */ @@ -96,6 +98,15 @@ enum { R = 0x4, /* flags */ W = 0x2, X = 0x1, + + /* Shdr Codes */ + Progbits = 1, /* section types */ + Strtab = 3, + Nobits = 8, + + Swrite = 1, /* section attributes */ + Salloc = 2, + Sexec = 4, }; #define ELF_MAG ((0x7f<<24) | ('E'<<16) | ('L'<<8) | 'F') |
