-
Notifications
You must be signed in to change notification settings - Fork 5
/
XB1nLib.h
49 lines (36 loc) · 904 Bytes
/
XB1nLib.h
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//
// Created by xia0 on 2019/11/7.
//
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dlfcn.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <assert.h>
#include "xia0.h"
#include "macho64.h"
#include "arch/arm64.h"
#include "arch/arm.h"
#include "exec_elf.h"
#pragma once
typedef struct XRange
{
uint64_t start;
uint64_t end;
}XRange;
#ifdef __cplusplus
extern "C"
{
#endif
char* hex_dump(void* target_addr, uint64_t size);
void show_hex_dump(void* target_addr, uint64_t size);
void* map_file_2_mem(const char* file_path);
XRange* macho64_get_sec_range_by_name(struct mach_header_64* mh, const char* seg_name, const char* sec_name);
XRange* elf32_get_sec_range_by_name(Elf32_Ehdr* elfh, const char* sec_name);
XRange* elf64_get_sec_range_by_name(Elf64_Ehdr* elfh, const char* sec_name);
#ifdef __cplusplus
}
#endif