-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathelf.h
More file actions
28 lines (23 loc) · 709 Bytes
/
elf.h
File metadata and controls
28 lines (23 loc) · 709 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef ELFDBG_ELF_H
#define ELFDBG_ELF_H 1
#include <elf.h>
#include <sys/stat.h>
#include "compat.h"
typedef struct {
int fd; /* file descriptor */
struct stat sb; /* file stat */
char *mm; /* memory mapping */
char *strtab; /* string table */
size_t strtab_size; /* string table size */
Elf_Ehdr *ehdr; /* header pointer */
size_t ehdr_size; /* header size */
Elf_Shdr *shdr; /* section header pointer */
size_t shdr_size; /* section header size */
} Elf_Obj;
Elf_Obj *elf_init(const char *);
int elf_destroy(Elf_Obj *);
Elf_Shdr *elf_strtab(Elf_Obj *);
char *elf_str_get(Elf_Obj *, size_t);
unsigned int elf_debug_count(Elf_Obj *);
void elf_debug_print(Elf_Obj *);
#endif /* ELFDBG_ELF_H */