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;
43 runpath_(std::move(runpath))
56 std::unique_ptr<DynamicEntry>
clone()
const override {
66 runpath_ = std::move(runpath);
70 std::vector<std::string>
paths()
const;
71 void paths(
const std::vector<std::string>& paths);
83 return append(std::move(path));
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
Definition DynamicEntry.hpp:45
TAG tag() const
Tag of the current entry. The most common tags are: DT_NEEDED, DT_INIT, ...
Definition DynamicEntry.hpp:200
Definition Visitor.hpp:224
LIEF namespace.
Definition Abstract/Binary.hpp:32
#define LIEF_API
Definition visibility.h:41