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_RPATH_H
17#define LIEF_ELF_DYNAMIC_ENTRY_RPATH_H
32 static constexpr char delimiter =
':';
33 using DynamicEntry::DynamicEntry;
35 DynamicEntry::DynamicEntry(DynamicEntry::TAG::RPATH, 0)
39 DynamicEntry::DynamicEntry(DynamicEntry::TAG::RPATH, 0),
40 rpath_(std::move(rpath))
45 DynamicEntry::DynamicEntry(DynamicEntry::TAG::RPATH, 0)
50 DynamicEntryRpath&
operator=(
const DynamicEntryRpath&) =
default;
53 std::unique_ptr<DynamicEntry>
clone()
const override {
54 return std::unique_ptr<DynamicEntryRpath>(
new DynamicEntryRpath(*
this));
56 const std::string&
rpath()
const {
63 rpath_ = std::move(name);
65 std::vector<std::string>
paths()
const;
68 void paths(
const std::vector<std::string>& paths);
69 DynamicEntryRpath&
insert(
size_t pos,
const std::string& path);
72 DynamicEntryRpath&
append(std::string path);
75 DynamicEntryRpath&
remove(
const std::string& path);
80 return append(std::move(path));
87 static bool classof(
const DynamicEntry* entry) {
88 return entry->
tag() == DynamicEntry::TAG::RPATH;
91 void accept(Visitor& visitor)
const override;
93 std::ostream&
print(std::ostream& os)
const override;
Class which represents a DT_RPATH entry. This attribute is deprecated (cf. man ld) in favour of DT_RU...
Definition DynamicEntryRpath.hpp:30
DynamicEntryRpath(const DynamicEntryRpath &)=default
std::ostream & print(std::ostream &os) const override
const std::string & rpath() const
The actual rpath as a string.
Definition DynamicEntryRpath.hpp:58
void rpath(std::string name)
Definition DynamicEntryRpath.hpp:62
DynamicEntryRpath & insert(size_t pos, const std::string &path)
Insert a path at the given position
std::vector< std::string > paths() const
Paths as a list.
DynamicEntryRpath & operator=(const DynamicEntryRpath &)=default
DynamicEntryRpath & append(std::string path)
Append the given path
DynamicEntryRpath & remove(const std::string &path)
Remove the given path
DynamicEntryRpath & operator-=(const std::string &path)
Definition DynamicEntryRpath.hpp:83
DynamicEntryRpath(const std::vector< std::string > &paths)
Constructor from a list of paths.
Definition DynamicEntryRpath.hpp:44
void accept(Visitor &visitor) const override
void paths(const std::vector< std::string > &paths)
static bool classof(const DynamicEntry *entry)
Definition DynamicEntryRpath.hpp:87
DynamicEntryRpath(std::string rpath)
Definition DynamicEntryRpath.hpp:38
DynamicEntryRpath()
Definition DynamicEntryRpath.hpp:34
std::unique_ptr< DynamicEntry > clone() const override
Definition DynamicEntryRpath.hpp:53
~DynamicEntryRpath()=default
DynamicEntryRpath & operator+=(std::string path)
Definition DynamicEntryRpath.hpp:79
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