-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathmacho_retriever.h
More file actions
31 lines (23 loc) · 797 Bytes
/
macho_retriever.h
File metadata and controls
31 lines (23 loc) · 797 Bytes
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
#ifndef MACHO_RETRIEVER_H
#define MACHO_RETRIEVER_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdio.h>
#include <stdlib.h>
struct bitcode_archive {
uint64_t size;
char* buffer;
const char* cpu;
};
struct bitcode_archive* make_bitcode(FILE* stream, const char* cpuname, const uint64_t offset, const uint64_t size);
struct bitcode_archive* extract_bitcode(FILE* stream, const int offset, const int swap_bytes);
struct bitcode_archive* extract_bitcode_64(FILE* stream, const int offset, const int swap_bytes);
struct bitcode_archive* retrieve_bitcode_from_nonfat(FILE* stream, const uint32_t offset);
int max_number_of_archives();
int is_macho(FILE* stream);
void retrieve_bitcode(FILE* stream, struct bitcode_archive* bitcodes[], int* count);
#ifdef __cplusplus
}
#endif
#endif