summaryrefslogtreecommitdiff
path: root/utils/libmach/elf.h
diff options
context:
space:
mode:
authorforsyth <forsyth@vitanuova.com>2010-04-27 12:51:13 +0100
committerforsyth <forsyth@vitanuova.com>2010-04-27 12:51:13 +0100
commitd67b7dad77bb8aa973dad1f7c3ab0c309b114278 (patch)
tree6794120fb327d6de19cf05eed53f80d877781a3e /utils/libmach/elf.h
parent09da2e137d5eb0c940df35d989e4c31ec0654fc4 (diff)
20100427-1251
Diffstat (limited to 'utils/libmach/elf.h')
-rw-r--r--utils/libmach/elf.h39
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')