Implement ELF file opening

This commit is contained in:
2022-10-16 20:51:29 +02:00
parent dd9eb898a8
commit fb5f527f45
6 changed files with 165 additions and 15 deletions

View File

@@ -0,0 +1,17 @@
#ifndef _ELFPATCH_H_
#define _ELFPATCH_H_
#include <libelf.h>
struct elfpatch {
int fd;
Elf *elf;
};
int elf_patch_open(struct elfpatch *ep, const char *path);
void elf_patch_print_stats(const struct elfpatch *ep);
void elf_patch_close(struct elfpatch *ep);
#endif /* _ELFPATCH_H_ */

View File

@@ -0,0 +1,10 @@
#ifndef _REPORTING_H_
#define _REPORTING_H_
#define print_err(fmt, ...) fprintf(stderr, (fmt), ## __VA_ARGS__);
void print_debug(const char *fmt, ...);
void reporting_enable_verbose(void);
#endif /* _REPORTING_H_ */