LIEF: Library to Instrument Executable Formats
Version 1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
lief-install
x86_64
static
include
LIEF
MachO
RelocationDyld.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_MACHO_RELOCATION_DYLD_COMMAND_H
17
#define LIEF_MACHO_RELOCATION_DYLD_COMMAND_H
18
#include <ostream>
19
20
#include "
LIEF/visibility.h
"
21
22
#include "
LIEF/MachO/Relocation.hpp
"
23
24
namespace
LIEF
{
25
namespace
MachO
{
26
27
class
BinaryParser
;
28
33
class
LIEF_API
RelocationDyld
:
public
Relocation
{
34
35
friend
class
BinaryParser
;
36
37
public
:
38
using
Relocation::Relocation
;
39
using
LIEF::Relocation::operator<;
40
using
LIEF::Relocation::operator<=;
41
using
LIEF::Relocation::operator>;
42
using
LIEF::Relocation::operator>=;
43
RelocationDyld
() =
default
;
44
45
RelocationDyld
&
operator=
(
const
RelocationDyld
&) =
default
;
46
RelocationDyld
(
const
RelocationDyld
&) =
default
;
47
48
~RelocationDyld
()
override
=
default
;
49
50
std::unique_ptr<Relocation>
clone
()
const override
{
51
return
std::unique_ptr<RelocationDyld>(
new
RelocationDyld
(*
this
));
52
}
53
59
bool
is_pc_relative
()
const override
;
60
63
ORIGIN
origin
()
const override
{
64
return
ORIGIN::DYLDINFO
;
65
}
66
67
void
pc_relative
(
bool
val)
override
;
68
69
bool
operator<
(
const
RelocationDyld
& rhs)
const
;
70
bool
operator>=
(
const
RelocationDyld
& rhs)
const
{
71
return
!(*
this
< rhs);
72
}
73
74
bool
operator>
(
const
RelocationDyld
& rhs)
const
;
75
bool
operator<=
(
const
RelocationDyld
& rhs)
const
{
76
return
!(*
this
> rhs);
77
}
78
79
void
accept
(
Visitor
& visitor)
const override
;
80
81
static
bool
classof
(
const
Relocation
& r) {
82
return
r.
origin
() ==
Relocation::ORIGIN::DYLDINFO
;
83
}
84
85
std::ostream&
print
(std::ostream& os)
const override
{
86
return
Relocation::print
(os);
87
}
88
};
89
90
}
91
}
92
#endif
Relocation.hpp
LIEF::MachO::BinaryParser
Class used to parse a single binary (i.e. non-FAT).
Definition
BinaryParser.hpp:78
LIEF::MachO::RelocationDyld::RelocationDyld
RelocationDyld(const RelocationDyld &)=default
LIEF::MachO::RelocationDyld::origin
ORIGIN origin() const override
Origin of the relocation. For this concrete object, it should be Relocation::ORIGIN::DYLDINFO.
Definition
RelocationDyld.hpp:63
LIEF::MachO::RelocationDyld::pc_relative
void pc_relative(bool val) override
LIEF::MachO::RelocationDyld::RelocationDyld
RelocationDyld()=default
LIEF::MachO::RelocationDyld::print
std::ostream & print(std::ostream &os) const override
Definition
RelocationDyld.hpp:85
LIEF::MachO::RelocationDyld::is_pc_relative
bool is_pc_relative() const override
Indicates whether the item containing the address to be relocated is part of a CPU instruction that u...
LIEF::MachO::RelocationDyld::BinaryParser
friend class BinaryParser
Definition
RelocationDyld.hpp:35
LIEF::MachO::RelocationDyld::clone
std::unique_ptr< Relocation > clone() const override
Definition
RelocationDyld.hpp:50
LIEF::MachO::RelocationDyld::operator<
bool operator<(const RelocationDyld &rhs) const
LIEF::MachO::RelocationDyld::operator>=
bool operator>=(const RelocationDyld &rhs) const
Definition
RelocationDyld.hpp:70
LIEF::MachO::RelocationDyld::operator=
RelocationDyld & operator=(const RelocationDyld &)=default
LIEF::MachO::RelocationDyld::operator>
bool operator>(const RelocationDyld &rhs) const
LIEF::MachO::RelocationDyld::operator<=
bool operator<=(const RelocationDyld &rhs) const
Definition
RelocationDyld.hpp:75
LIEF::MachO::RelocationDyld::Relocation
Relocation()=default
LIEF::MachO::RelocationDyld::~RelocationDyld
~RelocationDyld() override=default
LIEF::MachO::RelocationDyld::accept
void accept(Visitor &visitor) const override
LIEF::MachO::RelocationDyld::classof
static bool classof(const Relocation &r)
Definition
RelocationDyld.hpp:81
LIEF::MachO::Relocation::origin
virtual ORIGIN origin() const =0
Origin of the relocation.
LIEF::MachO::Relocation::ORIGIN
ORIGIN
Definition
MachO/Relocation.hpp:48
LIEF::MachO::Relocation::ORIGIN::DYLDINFO
@ DYLDINFO
Definition
MachO/Relocation.hpp:50
LIEF::MachO::Relocation::print
virtual std::ostream & print(std::ostream &os) const
LIEF::MachO::Relocation::Relocation
Relocation()=default
LIEF::Visitor
Definition
Visitor.hpp:210
LIEF::MachO
Namespace related to the LIEF's Mach-O module.
Definition
Abstract/Header.hpp:36
LIEF
LIEF namespace.
Definition
Abstract/Binary.hpp:40
visibility.h
LIEF_API
#define LIEF_API
Definition
visibility.h:41
Generated by
1.17.0