LIEF: Library to Instrument Executable Formats
Version 1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
install
linux
x86_64
sdk
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 <vector>
20
21
#include "
LIEF/asm/AssemblerConfig.hpp
"
22
23
namespace
llvm
{
24
class
MCInst;
25
}
26
27
namespace
LIEF
{
28
namespace
runtime
{
29
46
LIEF_API
std::vector<uint8_t>
assemble
(
47
uint64_t addr,
const
std::string& Asm,
48
assembly::AssemblerConfig
& config =
assembly::AssemblerConfig::default_config
()
49
);
50
53
LIEF_API
std::vector<uint8_t>
assemble
(uint64_t address,
const
llvm::MCInst& inst);
54
57
LIEF_API
std::vector<uint8_t>
assemble
(uint64_t address,
58
const
std::vector<llvm::MCInst>& insts);
59
60
}
61
}
62
#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, const std::string &Asm, assembly::AssemblerConfig &config=assembly::AssemblerConfig::default_config())
Assemble the provided assembly code at the specified (absolute) virtual address.
LIEF
LIEF namespace.
Definition
Abstract/Binary.hpp:41
llvm
Definition
Abstract/Binary.hpp:36
visibility.h
LIEF_API
#define LIEF_API
Definition
visibility.h:45
Generated by
1.18.0