Implement ELF file opening
This commit is contained in:
17
include/patchelfcrc/elfpatch.h
Normal file
17
include/patchelfcrc/elfpatch.h
Normal 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_ */
|
10
include/patchelfcrc/reporting.h
Normal file
10
include/patchelfcrc/reporting.h
Normal 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_ */
|
Reference in New Issue
Block a user