LIEF: Library to Instrument Executable Formats Version 0.17.0
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
16#ifndef LIEF_ELF_DYNAMIC_ENTRY_ARRAY_H
17#define LIEF_ELF_DYNAMIC_ENTRY_ARRAY_H
37 using array_t = std::vector<uint64_t>;
38 using DynamicEntry::DynamicEntry;
43 array_(std::move(array))
46 DynamicEntryArray&
operator=(
const DynamicEntryArray&) =
default;
49 std::unique_ptr<DynamicEntry>
clone()
const override {
50 return std::unique_ptr<DynamicEntryArray>(
new DynamicEntryArray(*
this));
61 void array(
const array_t& array) {
64 DynamicEntryArray&
insert(
size_t pos, uint64_t function);
67 DynamicEntryArray&
append(uint64_t function) {
70 array_.push_back(function);
73 DynamicEntryArray&
remove(uint64_t function);
93 void accept(Visitor& visitor)
const override;
95 std::ostream&
print(std::ostream& os)
const override;
99 static bool classof(
const DynamicEntry* entry) {
100 const DynamicEntry::TAG tag = entry->
tag();
101 return tag == DynamicEntry::TAG::INIT_ARRAY ||
102 tag == DynamicEntry::TAG::FINI_ARRAY ||
103 tag == DynamicEntry::TAG::PREINIT_ARRAY;
Class that represent an Array in the dynamic table. This entry is associated with constructors:
Definition DynamicEntryArray.hpp:35
DynamicEntryArray()=delete
DynamicEntryArray(DynamicEntry::TAG tag, array_t array)
Definition DynamicEntryArray.hpp:41
DynamicEntryArray & remove(uint64_t function)
Remove the given function.
const array_t & array() const
Definition DynamicEntryArray.hpp:58
DynamicEntryArray(const DynamicEntryArray &)=default
static bool classof(const DynamicEntry *entry)
Definition DynamicEntryArray.hpp:99
uint64_t & operator[](size_t idx)
std::unique_ptr< DynamicEntry > clone() const override
Definition DynamicEntryArray.hpp:49
DynamicEntryArray & operator+=(uint64_t value)
Definition DynamicEntryArray.hpp:82
~DynamicEntryArray() override=default
DynamicEntryArray & operator-=(uint64_t value)
Definition DynamicEntryArray.hpp:86
std::ostream & print(std::ostream &os) const override
DynamicEntryArray & append(uint64_t function)
Append the given function.
Definition DynamicEntryArray.hpp:69
DynamicEntryArray & operator=(const DynamicEntryArray &)=default
size_t size() const
Number of function registred in this array.
Definition DynamicEntryArray.hpp:78
DynamicEntryArray & insert(size_t pos, uint64_t function)
Insert the given function at pos
const uint64_t & operator[](size_t idx) const
void accept(Visitor &visitor) const override
void array(const array_t &array)
Definition DynamicEntryArray.hpp:61
array_t & array()
Return the array values (list of pointers)
Definition DynamicEntryArray.hpp:54
Class which represents an entry in the dynamic table These entries are located in the ....
Definition DynamicEntry.hpp:36
TAG tag() const
Tag of the current entry. The most common tags are: DT_NEEDED, DT_INIT, ...
Definition DynamicEntry.hpp:205
Namespace related to the LIEF's ELF module.
Definition Abstract/Header.hpp:28
LIEF namespace.
Definition Abstract/Binary.hpp:36
#define LIEF_API
Definition visibility.h:41