LIEF: Library to Instrument Executable Formats
Version 0.15.1
Loading...
Searching...
No Matches
install
linux
x86_64
sdk
static
include
LIEF
ELF
ELF/Binary.h
Go to the documentation of this file.
1
/* Copyright 2017 - 2024 R. Thomas
2
* Copyright 2017 - 2024 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 LIEF_C_ELF_BINARY_H
17
#define LIEF_C_ELF_BINARY_H
18
19
#include <stddef.h>
20
21
#include "
LIEF/visibility.h
"
22
23
#include "
LIEF/ELF/enums.h
"
24
25
#include "
LIEF/ELF/Section.h
"
26
#include "
LIEF/ELF/Segment.h
"
27
#include "
LIEF/ELF/Header.h
"
28
#include "
LIEF/ELF/DynamicEntry.h
"
29
#include "
LIEF/ELF/Symbol.h
"
30
31
#ifdef __cplusplus
32
extern
"C"
{
33
#endif
34
36
struct
Elf_Binary_t
{
37
void
*
handler
;
38
const
char
*
interpreter
;
39
uint32_t
type
;
40
Elf_Header_t
header
;
41
Elf_Section_t
**
sections
;
42
Elf_Segment_t
**
segments
;
43
Elf_DynamicEntry_t
**
dynamic_entries
;
44
Elf_Symbol_t
**
dynamic_symbols
;
45
Elf_Symbol_t
**
symtab_symbols
;
46
};
47
48
typedef
struct
Elf_Binary_t
Elf_Binary_t
;
49
51
LIEF_API
Elf_Binary_t
*
elf_parse
(
const
char
*file);
52
53
LIEF_API
void
elf_binary_destroy
(
Elf_Binary_t
* binary);
54
56
LIEF_API
int
elf_binary_save_header
(
Elf_Binary_t
* binary);
57
58
#ifdef __cplusplus
59
}
60
#endif
61
62
#endif
DynamicEntry.h
elf_binary_save_header
int elf_binary_save_header(Elf_Binary_t *binary)
elf_binary_destroy
void elf_binary_destroy(Elf_Binary_t *binary)
elf_parse
Elf_Binary_t * elf_parse(const char *file)
Header.h
Section.h
Segment.h
Symbol.h
enums.h
Elf_Binary_t
Definition
ELF/Binary.h:36
Elf_Binary_t::dynamic_symbols
Elf_Symbol_t ** dynamic_symbols
Definition
ELF/Binary.h:44
Elf_Binary_t::segments
Elf_Segment_t ** segments
Definition
ELF/Binary.h:42
Elf_Binary_t::sections
Elf_Section_t ** sections
Definition
ELF/Binary.h:41
Elf_Binary_t::type
uint32_t type
Definition
ELF/Binary.h:39
Elf_Binary_t::symtab_symbols
Elf_Symbol_t ** symtab_symbols
Definition
ELF/Binary.h:45
Elf_Binary_t::interpreter
const char * interpreter
Definition
ELF/Binary.h:38
Elf_Binary_t::header
Elf_Header_t header
Definition
ELF/Binary.h:40
Elf_Binary_t::handler
void * handler
Definition
ELF/Binary.h:37
Elf_Binary_t::dynamic_entries
Elf_DynamicEntry_t ** dynamic_entries
Definition
ELF/Binary.h:43
Elf_DynamicEntry_t
Definition
DynamicEntry.h:25
Elf_Header_t
Definition
ELF/Header.h:26
Elf_Section_t
Definition
ELF/Section.h:25
Elf_Segment_t
Definition
ELF/Segment.h:26
Elf_Symbol_t
Definition
ELF/Symbol.h:26
visibility.h
LIEF_API
#define LIEF_API
Definition
visibility.h:41
Generated by
1.11.0