]> sbz's 6dev Repos - elfdbg/.git/blame - elf.h
Rewrite ELF parsing from scratch w/o dependency of elf(3) and gelf(3)
[elfdbg/.git] / elf.h
CommitLineData
1960d10e
SB
1#include <elf.h>
2#include <sys/stat.h>
3
4typedef struct Elf_Obj {
5 int fd;
6 struct stat sb;
7 char *mm;
8 char *strtab;
9 size_t strtab_size;
10 Elf_Ehdr *ehdr;
11 size_t ehdr_size;
12 Elf_Shdr *shdr;
13 size_t shdr_size;
14} Elf_Obj;
15
16Elf_Obj *elf_init(const char *filename);
17int elf_destroy(Elf_Obj *);
18Elf_Shdr *elf_strtab(Elf_Obj *);
19int elf_debug(Elf_Obj *);