LIEF: Library to Instrument Executable Formats
Version 1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
lief-install
x86_64
static
include
LIEF
MachO
MachO/Binary.h
Go to the documentation of this file.
1
/* Copyright 2017 - 2026 R. Thomas
2
* Copyright 2017 - 2026 Quarkslab
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
#ifndef C_LIEF_MACHO_BINARY_H_
17
#define C_LIEF_MACHO_BINARY_H_
18
19
#include <stdint.h>
20
21
#include "
LIEF/visibility.h
"
22
23
#include "
LIEF/MachO/Header.h
"
24
#include "
LIEF/MachO/LoadCommand.h
"
25
#include "
LIEF/MachO/Symbol.h
"
26
#include "
LIEF/MachO/Section.h
"
27
#include "
LIEF/MachO/Segment.h
"
28
29
#ifdef __cplusplus
30
extern
"C"
{
31
#endif
32
34
struct
Macho_Binary_t
{
35
void
*
handler
;
36
uint64_t
imagebase
;
37
Macho_Header_t
header
;
38
Macho_Command_t
**
commands
;
39
Macho_Symbol_t
**
symbols
;
40
Macho_Section_t
**
sections
;
41
Macho_Segment_t
**
segments
;
42
43
};
44
45
typedef
struct
Macho_Binary_t
Macho_Binary_t
;
46
48
LIEF_API
Macho_Binary_t
**
macho_parse
(
const
char
*file);
49
50
LIEF_API
void
macho_binaries_destroy
(
Macho_Binary_t
** binaries);
51
52
#ifdef __cplusplus
53
}
54
#endif
55
56
57
#endif
LoadCommand.h
macho_parse
Macho_Binary_t ** macho_parse(const char *file)
Wrapper on LIEF::MachO::Parser::parse.
macho_binaries_destroy
void macho_binaries_destroy(Macho_Binary_t **binaries)
Header.h
Section.h
Segment.h
Symbol.h
Macho_Binary_t
LIEF::MachO::Binary C Handler.
Definition
MachO/Binary.h:34
Macho_Binary_t::handler
void * handler
Definition
MachO/Binary.h:35
Macho_Binary_t::header
Macho_Header_t header
Definition
MachO/Binary.h:37
Macho_Binary_t::sections
Macho_Section_t ** sections
Definition
MachO/Binary.h:40
Macho_Binary_t::segments
Macho_Segment_t ** segments
Definition
MachO/Binary.h:41
Macho_Binary_t::commands
Macho_Command_t ** commands
Definition
MachO/Binary.h:38
Macho_Binary_t::imagebase
uint64_t imagebase
Definition
MachO/Binary.h:36
Macho_Binary_t::symbols
Macho_Symbol_t ** symbols
Definition
MachO/Binary.h:39
Macho_Command_t
Definition
LoadCommand.h:25
Macho_Header_t
Definition
MachO/Header.h:26
Macho_Section_t
Definition
MachO/Section.h:25
Macho_Segment_t
Definition
MachO/Segment.h:26
Macho_Symbol_t
Definition
MachO/Symbol.h:26
visibility.h
LIEF_API
#define LIEF_API
Definition
visibility.h:41
Generated by
1.17.0