LIEF: Library to Instrument Executable Formats
Version 0.17.4
Toggle main menu visibility
Loading...
Searching...
No Matches
install
linux
x86_64
sdk
static
include
LIEF
asm
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
23
namespace
LIEF
{
24
25
namespace
assembly
{
26
29
class
LIEF_API
AssemblerConfig
{
30
public
:
31
AssemblerConfig
() =
default
;
32
33
AssemblerConfig
(
const
AssemblerConfig
&) =
default
;
34
AssemblerConfig
&
operator=
(
const
AssemblerConfig
&) =
default
;
35
36
AssemblerConfig
(
AssemblerConfig
&&) =
default
;
37
AssemblerConfig
&
operator=
(
AssemblerConfig
&&) =
default
;
38
40
enum class
DIALECT
{
41
DEFAULT_DIALECT = 0,
43
X86_INTEL,
44
46
X86_ATT,
47
};
48
50
static
AssemblerConfig
&
default_config
() {
51
static
AssemblerConfig
AC;
52
return
AC;
53
}
54
56
DIALECT
dialect
=
DIALECT::DEFAULT_DIALECT
;
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
LIEF::assembly::AssemblerConfig::operator=
AssemblerConfig & operator=(const AssemblerConfig &)=default
LIEF::assembly::AssemblerConfig::AssemblerConfig
AssemblerConfig()=default
LIEF::assembly::AssemblerConfig::default_config
static AssemblerConfig & default_config()
Default configuration.
Definition
AssemblerConfig.hpp:50
LIEF::assembly::AssemblerConfig::DIALECT
DIALECT
The different supported dialects.
Definition
AssemblerConfig.hpp:40
LIEF::assembly::AssemblerConfig::DIALECT::DEFAULT_DIALECT
@ DEFAULT_DIALECT
Definition
AssemblerConfig.hpp:41
LIEF::assembly::AssemblerConfig::operator=
AssemblerConfig & operator=(AssemblerConfig &&)=default
LIEF::assembly::AssemblerConfig::AssemblerConfig
AssemblerConfig(const AssemblerConfig &)=default
LIEF::assembly::AssemblerConfig::dialect
DIALECT dialect
The dialect of the input assembly code.
Definition
AssemblerConfig.hpp:56
LIEF::assembly::AssemblerConfig::AssemblerConfig
AssemblerConfig(AssemblerConfig &&)=default
LIEF::assembly::AssemblerConfig::~AssemblerConfig
virtual ~AssemblerConfig()=default
LIEF::assembly::AssemblerConfig::resolve_symbol
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
LIEF::optional
Definition
optional.hpp:23
LIEF::assembly
Namespace related to assembly/disassembly support.
Definition
Abstract/Binary.hpp:47
LIEF
LIEF namespace.
Definition
Abstract/Binary.hpp:40
LIEF::nullopt
tl::unexpected< lief_errors > nullopt()
Definition
optional.hpp:36
optional.hpp
visibility.h
LIEF_API
#define LIEF_API
Definition
visibility.h:41
Generated by
1.17.0