LIEF: Library to Instrument Executable Formats Version 0.17.0
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
16#ifndef LIEF_ABSTRACT_RELOCATION_H
17#define LIEF_ABSTRACT_RELOCATION_H
42 void swap(Relocation& other) {
43 std::swap(address_, other.address_);
44 std::swap(size_, other.size_);
46 virtual uint64_t
address()
const {
51 virtual size_t size()
const {
61 virtual void size(
size_t size) {
62 size_ = (uint8_t)size;
64 void accept(Visitor& visitor)
const override;
68 virtual bool operator<(
const Relocation& rhs)
const {
71 return address() < rhs.
address();
73 virtual bool operator<=(
const Relocation& rhs)
const {
76 return !(address() > rhs.
address());
78 virtual bool operator>(
const Relocation& rhs)
const {
81 return address() > rhs.
address();
83 virtual bool operator>=(
const Relocation& rhs)
const {
86 return !(address() < rhs.
address());
92 uint64_t address_ = 0;
Class which represents an abstracted Relocation.
Definition Abstract/Relocation.hpp:27
friend std::ostream & operator<<(std::ostream &os, const Relocation &entry)
void swap(Relocation &other)
Definition Abstract/Relocation.hpp:42
virtual void address(uint64_t address)
Definition Abstract/Relocation.hpp:57
Relocation & operator=(const Relocation &)=default
virtual void size(size_t size)
Definition Abstract/Relocation.hpp:61
Relocation(const Relocation &)=default
virtual bool operator<(const Relocation &rhs) const
Comparaison based on the Relocation's address
Definition Abstract/Relocation.hpp:70
virtual size_t size() const
Relocation size in bits
Definition Abstract/Relocation.hpp:53
virtual bool operator<=(const Relocation &rhs) const
Comparaison based on the Relocation's address
Definition Abstract/Relocation.hpp:75
virtual bool operator>(const Relocation &rhs) const
Comparaison based on the Relocation's address
Definition Abstract/Relocation.hpp:80
virtual uint64_t address() const
Relocation's address.
Definition Abstract/Relocation.hpp:48
virtual bool operator>=(const Relocation &rhs) const
Comparaison based on the Relocation's address
Definition Abstract/Relocation.hpp:85
void accept(Visitor &visitor) const override
Method so that the visitor can visit us.
Relocation(uint64_t address, uint8_t size)
Constructor from a relocation's address and size.
Definition Abstract/Relocation.hpp:33
~Relocation() override=default
LIEF namespace.
Definition Abstract/Binary.hpp:36
#define LIEF_API
Definition visibility.h:41