16#ifndef LIEF_ELF_DYNAMIC_ENTRY_FLAGS_H
17#define LIEF_ELF_DYNAMIC_ENTRY_FLAGS_H
31 static constexpr uint64_t
BASE = 0x100000000;
34 enum class FLAG : uint64_t {
36 SYMBOLIC = 0x00000002,
38 BIND_NOW = 0x00000008,
39 STATIC_TLS = 0x00000010,
42 GLOBAL =
BASE + 0x000000002,
43 GROUP =
BASE + 0x000000004,
44 NODELETE =
BASE + 0x000000008,
45 LOADFLTR =
BASE + 0x000000010,
46 INITFIRST =
BASE + 0x000000020,
47 NOOPEN =
BASE + 0x000000040,
48 HANDLE_ORIGIN =
BASE + 0x000000080,
49 DIRECT =
BASE + 0x000000100,
50 TRANS =
BASE + 0x000000200,
51 INTERPOSE =
BASE + 0x000000400,
52 NODEFLIB =
BASE + 0x000000800,
53 NODUMP =
BASE + 0x000001000,
54 CONFALT =
BASE + 0x000002000,
55 ENDFILTEE =
BASE + 0x000004000,
56 DISPRELDNE =
BASE + 0x000008000,
57 DISPRELPND =
BASE + 0x000010000,
58 NODIRECT =
BASE + 0x000020000,
59 IGNMULDEF =
BASE + 0x000040000,
60 NOKSYMS =
BASE + 0x000080000,
61 NOHDR =
BASE + 0x000100000,
62 EDITED =
BASE + 0x000200000,
63 NORELOC =
BASE + 0x000400000,
64 SYMINTPOSE =
BASE + 0x000800000,
65 GLOBAUDIT =
BASE + 0x001000000,
66 SINGLETON =
BASE + 0x002000000,
69 WEAKFILTER =
BASE + 0x020000000,
70 NOCOMMON =
BASE + 0x040000000,
91 std::unique_ptr<DynamicEntry>
clone()
const override {
103 return std::accumulate(
flags.begin(),
flags.end(), uint64_t(0),
105 return value + (uint64_t)f;
134 std::ostream&
print(std::ostream& os)
const override;
static DynamicEntryFlags create_dt_flag_1(uint64_t value)
Definition DynamicEntryFlags.hpp:84
FLAG
Definition DynamicEntryFlags.hpp:34
DynamicEntryFlags & operator-=(FLAG f)
Definition DynamicEntryFlags.hpp:120
static constexpr uint64_t BASE
Definition DynamicEntryFlags.hpp:31
bool has(FLAG f) const
If the current entry has the given FLAG.
std::ostream & print(std::ostream &os) const override
static bool classof(const DynamicEntry *entry)
Definition DynamicEntryFlags.hpp:127
std::vector< FLAG > flags_list_t
Definition DynamicEntryFlags.hpp:74
void add(FLAG f)
Add the given FLAG.
~DynamicEntryFlags() override=default
DynamicEntryFlags()=delete
void remove(FLAG f)
Remove the given FLAG.
uint64_t raw_flags() const
Definition DynamicEntryFlags.hpp:101
std::unique_ptr< DynamicEntry > clone() const override
Definition DynamicEntryFlags.hpp:91
DynamicEntryFlags & operator+=(FLAG f)
Definition DynamicEntryFlags.hpp:115
DynamicEntryFlags & operator=(const DynamicEntryFlags &)=default
flags_list_t flags() const
Return flags as a list of integers.
DynamicEntryFlags(const DynamicEntryFlags &)=default
void accept(Visitor &visitor) const override
static DynamicEntryFlags create_dt_flag(uint64_t value)
Definition DynamicEntryFlags.hpp:80
TAG
Definition DynamicEntry.hpp:49
@ FLAGS
Definition DynamicEntry.hpp:81
@ FLAGS_1
Definition DynamicEntry.hpp:95
TAG tag() const
Tag of the current entry. The most common tags are: DT_NEEDED, DT_INIT, ...
Definition DynamicEntry.hpp:252
uint64_t value() const
Return the entry's value.
Definition DynamicEntry.hpp:260
Definition Visitor.hpp:212
Namespace related to the LIEF's ELF module.
Definition Abstract/Header.hpp:28
const char * to_string(DynamicEntry::TAG e)
LIEF namespace.
Definition Abstract/Binary.hpp:40
#define LIEF_API
Definition visibility.h:45