LIEF: Library to Instrument Executable Formats Version 0.15.0
Loading...
Searching...
No Matches
ELF/Binary.h
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
32extern "C" {
33#endif
34
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
48typedef struct Elf_Binary_t Elf_Binary_t;
49
51LIEF_API Elf_Binary_t* elf_parse(const char *file);
52
53LIEF_API void elf_binary_destroy(Elf_Binary_t* binary);
54
56LIEF_API int elf_binary_save_header(Elf_Binary_t* binary);
57
58#ifdef __cplusplus
59}
60#endif
61
62#endif
Definition ELF/Binary.h:36
Definition DynamicEntry.h:25
Definition ELF/Header.h:26
Definition ELF/Section.h:25
Definition ELF/Segment.h:26
Definition ELF/Symbol.h:26