LIEF: Library to Instrument Executable Formats Version 1.0.0
Loading...
Searching...
No Matches
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
22
23namespace llvm {
24class MCInst;
25}
26
27namespace LIEF {
28namespace runtime {
29
46LIEF_API std::vector<uint8_t> assemble(
47 uint64_t addr, const std::string& Asm,
49);
50
53LIEF_API std::vector<uint8_t> assemble(uint64_t address, const llvm::MCInst& inst);
54
57LIEF_API std::vector<uint8_t> assemble(uint64_t address,
58 const std::vector<llvm::MCInst>& insts);
59
60}
61}
62#endif
This class exposes the different elements that can be configured to assemble code.
Definition AssemblerConfig.hpp:29
static AssemblerConfig & default_config()
Default configuration.
Definition AssemblerConfig.hpp:50
Definition android/Host.hpp:24
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 namespace.
Definition Abstract/Binary.hpp:41
Definition Abstract/Binary.hpp:36
#define LIEF_API
Definition visibility.h:45