LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
AssemblerConfig.hpp
Go to the documentation of this file.
1/* Copyright 2022 - 2025 R. Thomas
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15#ifndef LIEF_ASM_ASSEMBLER_CONFIG_H
16#define LIEF_ASM_ASSEMBLER_CONFIG_H
17
18#include "LIEF/visibility.h"
19#include "LIEF/optional.hpp"
20
21#include <string>
22
23namespace LIEF {
24
25namespace assembly {
26
30 public:
31 AssemblerConfig() = default;
32
33 AssemblerConfig(const AssemblerConfig &) = default;
35
38
40 enum class DIALECT {
44
47 };
48
51 static AssemblerConfig AC;
52 return AC;
53 }
54
57
82 virtual optional<uint64_t> resolve_symbol(const std::string& /*name*/) {
83 return nullopt();
84 }
85
86 virtual ~AssemblerConfig() = default;
87};
88}
89}
90
91#endif
AssemblerConfig & operator=(const AssemblerConfig &)=default
static AssemblerConfig & default_config()
Default configuration.
Definition AssemblerConfig.hpp:50
DIALECT
The different supported dialects.
Definition AssemblerConfig.hpp:40
@ X86_INTEL
Intel syntax.
Definition AssemblerConfig.hpp:43
@ DEFAULT_DIALECT
Definition AssemblerConfig.hpp:41
@ X86_ATT
AT&T syntax.
Definition AssemblerConfig.hpp:46
AssemblerConfig & operator=(AssemblerConfig &&)=default
AssemblerConfig(const AssemblerConfig &)=default
DIALECT dialect
The dialect of the input assembly code.
Definition AssemblerConfig.hpp:56
AssemblerConfig(AssemblerConfig &&)=default
virtual ~AssemblerConfig()=default
virtual optional< uint64_t > resolve_symbol(const std::string &)
This function aims to be overloaded in order to resolve symbols used in the assembly listing.
Definition AssemblerConfig.hpp:82
Definition optional.hpp:23
Namespace related to assembly/disassembly support.
Definition Abstract/Binary.hpp:47
LIEF namespace.
Definition Abstract/Binary.hpp:40
tl::unexpected< lief_errors > nullopt()
Definition optional.hpp:36
#define LIEF_API
Definition visibility.h:41