LIEF: Library to Instrument Executable Formats
Version 2.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
lief-install
x86_64
static
include
LIEF
runtime
assembler.hpp
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 LIEF_RUNTIME_ASSEMBLER_H
17
#define LIEF_RUNTIME_ASSEMBLER_H
18
#include "
LIEF/visibility.h
"
19
#include <string_view>
20
#include <vector>
21
22
#include "
LIEF/asm/AssemblerConfig.hpp
"
23
24
namespace
llvm
{
25
class
MCInst;
26
}
27
28
29
namespace
LIEF::runtime
{
30
47
LIEF_API
std::vector<uint8_t>
assemble
(
48
uint64_t addr, std::string_view Asm,
49
assembly::AssemblerConfig
& config =
assembly::AssemblerConfig::default_config
()
50
);
51
54
LIEF_API
std::vector<uint8_t>
assemble
(uint64_t address,
const
llvm::MCInst& inst);
55
58
LIEF_API
std::vector<uint8_t>
assemble
(uint64_t address,
59
const
std::vector<llvm::MCInst>& insts);
60
61
}
62
63
#endif
AssemblerConfig.hpp
LIEF::assembly::AssemblerConfig
This class exposes the different elements that can be configured to assemble code.
Definition
AssemblerConfig.hpp:29
LIEF::assembly::AssemblerConfig::default_config
static AssemblerConfig & default_config()
Default configuration.
Definition
AssemblerConfig.hpp:50
LIEF::runtime
Definition
android/Host.hpp:24
LIEF::runtime::assemble
std::vector< uint8_t > assemble(uint64_t addr, std::string_view Asm, assembly::AssemblerConfig &config=assembly::AssemblerConfig::default_config())
Assemble the provided assembly code at the specified (absolute) virtual address.
llvm
Definition
Abstract/Binary.hpp:37
visibility.h
LIEF_API
#define LIEF_API
Definition
visibility.h:45
Generated by
1.19.0