LIEF: Library to Instrument Executable Formats Version 0.16.0
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
16#ifndef LIEF_ELF_DYNAMIC_ENTRY_RUNPATH_H
17#define LIEF_ELF_DYNAMIC_ENTRY_RUNPATH_H
33 static constexpr char delimiter =
':';
34 using DynamicEntry::DynamicEntry;
37 DynamicEntry::DynamicEntry(DynamicEntry::TAG::RUNPATH, 0)
42 DynamicEntry::DynamicEntry(DynamicEntry::TAG::RUNPATH, 0),
43 runpath_(std::move(runpath))
48 DynamicEntry::DynamicEntry(DynamicEntry::TAG::RUNPATH, 0)
53 DynamicEntryRunPath&
operator=(
const DynamicEntryRunPath&) =
default;
56 std::unique_ptr<DynamicEntry>
clone()
const override {
57 return std::unique_ptr<DynamicEntry>(
new DynamicEntryRunPath(*
this));
59 const std::string&
runpath()
const {
66 runpath_ = std::move(runpath);
68 std::vector<std::string>
paths()
const;
71 void paths(
const std::vector<std::string>& paths);
72 DynamicEntryRunPath&
insert(
size_t pos,
const std::string& path);
75 DynamicEntryRunPath&
append(
const std::string& path);
78 DynamicEntryRunPath&
remove(
const std::string& path);
83 return append(std::move(path));
86 DynamicEntryRunPath&
operator-=(
const std::string& path) {
90 void accept(Visitor& visitor)
const override;
92 static bool classof(
const DynamicEntry* entry) {
93 return entry->
tag() == DynamicEntry::TAG::RUNPATH;
96 std::ostream&
print(std::ostream& os)
const override;
101 std::string runpath_;
Class that represents a DT_RUNPATH wich is used by the loader to resolve libraries (DynamicEntryLibra...
Definition DynamicEntryRunPath.hpp:30
void accept(Visitor &visitor) const override
std::unique_ptr< DynamicEntry > clone() const override
Definition DynamicEntryRunPath.hpp:56
DynamicEntryRunPath & insert(size_t pos, const std::string &path)
Insert a path at the given position
DynamicEntryRunPath(const DynamicEntryRunPath &)=default
DynamicEntryRunPath & operator+=(std::string path)
Definition DynamicEntryRunPath.hpp:82
DynamicEntryRunPath & append(const std::string &path)
Append the given path
DynamicEntryRunPath & remove(const std::string &path)
Remove the given path
DynamicEntryRunPath(std::string runpath)
Constructor from (run)path.
Definition DynamicEntryRunPath.hpp:41
void paths(const std::vector< std::string > &paths)
~DynamicEntryRunPath()=default
DynamicEntryRunPath(const std::vector< std::string > &paths)
Constructor from a list of paths.
Definition DynamicEntryRunPath.hpp:47
void runpath(std::string runpath)
Definition DynamicEntryRunPath.hpp:65
std::ostream & print(std::ostream &os) const override
const std::string & runpath() const
Runpath raw value.
Definition DynamicEntryRunPath.hpp:61
std::vector< std::string > paths() const
Paths as a list.
DynamicEntryRunPath & operator-=(const std::string &path)
Definition DynamicEntryRunPath.hpp:86
static bool classof(const DynamicEntry *entry)
Definition DynamicEntryRunPath.hpp:92
DynamicEntryRunPath()
Definition DynamicEntryRunPath.hpp:36
DynamicEntryRunPath & operator=(const DynamicEntryRunPath &)=default
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