Enable cirrus continous integration task for freebsd
[elfdbg/.git] / elf.h
... / ...
CommitLineData
1#ifndef ELFDBG_ELF_H
2#define ELFDBG_ELF_H 1
3
4#include <elf.h>
5#include <sys/stat.h>
6
7#include "compat.h"
8
9typedef struct Elf_Obj {
10 int fd; /* file descriptor */
11 struct stat sb; /* file stat */
12 char *mm; /* memory mapping */
13 char *strtab; /* string table */
14 size_t strtab_size; /* string table size */
15 Elf_Ehdr *ehdr; /* header pointer */
16 size_t ehdr_size; /* header size */
17 Elf_Shdr *shdr; /* section header pointer */
18 size_t shdr_size; /* section header size */
19} Elf_Obj;
20
21Elf_Obj *elf_init(const char *);
22int elf_destroy(Elf_Obj *);
23Elf_Shdr *elf_strtab(Elf_Obj *);
24char *elf_str_get(Elf_Obj *, int);
25int elf_debug_count(Elf_Obj *);
26void elf_debug_print(Elf_Obj *);
27
28#endif /* ELFDBG_ELF_H */