minecraft-pi-reborn/libreborn/include/libreborn/elf.h

23 lines
443 B
C
Raw Normal View History

2021-06-17 21:32:24 +00:00
#pragma once
#include <unistd.h>
#include <string.h>
#include <sys/mman.h>
#include <elf.h>
2021-09-12 03:18:12 +00:00
#include <link.h>
2021-06-17 21:32:24 +00:00
#include "log.h"
2021-08-16 03:11:03 +00:00
#include "exec.h"
2021-06-17 21:32:24 +00:00
2022-03-14 23:09:25 +00:00
#ifdef __cplusplus
extern "C" {
#endif
2021-06-17 21:32:24 +00:00
// Find And Iterate Over All .text Sections In Current Binary
2021-09-12 03:18:12 +00:00
typedef void (*text_section_callback_t)(ElfW(Addr) section, ElfW(Word) size, void *data);
2022-03-14 23:09:25 +00:00
void iterate_text_sections(text_section_callback_t callback, void *data);
2021-06-17 21:32:24 +00:00
2022-03-14 23:09:25 +00:00
#ifdef __cplusplus
2021-06-17 21:32:24 +00:00
}
2022-03-14 23:09:25 +00:00
#endif