elf64.h - scc - simple c99 compiler
HTML git clone git://git.simple-cc.org/scc
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
elf64.h (745B)
---
1 #include <scc/elf/elftypes.h>
2 #include <scc/elf/elfhdr.h>
3 #include <scc/elf/elfphdr.h>
4 #include <scc/elf/elfshdr.h>
5 #include <scc/elf/elfent.h>
6
7 #define Elf_Ehdr Elf64_Ehdr
8 #define Elf_Phdr Elf64_Phdr
9 #define Elf_Shdr Elf64_Shdr
10 #define Elf_Sym Elf64_Sym
11 #define ELFHSZ ELFH64SZ
12 #define ELFPSZ ELFP64SZ
13 #define ELFSSZ ELFS64SZ
14 #define ELFESZ ELFE64SZ
15
16
17 #define SEC_STRTBL 0
18 #define SYM_STRTBL 1
19
20 typedef struct elf64 Elf64;
21
22 struct elf64 {
23 Elf_Ehdr hdr;
24 Elf_Phdr *phdr;
25 Elf_Shdr *shdr;
26 Elf_Shdr *symtab;
27 Elf_Sym *syms;
28
29 char *strtbl[2];
30 size_t strsiz[2];
31
32 size_t nsec;
33 size_t nsym;
34 };
35
36 struct arch {
37 char *name;
38 int mach;
39 int endian;
40 int type;
41 };
42
43 char *elf64str(Obj *, int n, long);
44
45 /* globals */
46 extern struct arch elf64archs[];