23 lines
422 B
C
Raw Normal View History

2021-06-17 17:32:24 -04:00
#pragma once
#include <unistd.h>
#include <string.h>
#include <sys/mman.h>
#include <elf.h>
2021-09-11 23:18:12 -04:00
#include <link.h>
2021-06-17 17:32:24 -04:00
#include "log.h"
2021-08-15 23:11:03 -04:00
#include "exec.h"
2021-06-17 17:32:24 -04:00
2022-03-14 19:09:25 -04:00
#ifdef __cplusplus
extern "C" {
#endif
2022-05-29 22:54:57 -04:00
// Find And Iterate Over All Segments In Current Binary
typedef void (*segment_callback_t)(ElfW(Addr) section, ElfW(Word) size, void *data);
void iterate_segments(segment_callback_t callback, void *data);
2021-06-17 17:32:24 -04:00
2022-03-14 19:09:25 -04:00
#ifdef __cplusplus
2021-06-17 17:32:24 -04:00
}
2022-03-14 19:09:25 -04:00
#endif