|
LIEF: Library to Instrument Executable Formats Version 1.0.0
|
#include <DynamicEntryFlags.hpp>


Public Types | |
| enum class | FLAG : uint64_t { ORIGIN = 0x00000001 , SYMBOLIC = 0x00000002 , TEXTREL = 0x00000004 , BIND_NOW = 0x00000008 , STATIC_TLS = 0x00000010 , NOW = BASE + 0x000000001 , GLOBAL = BASE + 0x000000002 , GROUP = BASE + 0x000000004 , NODELETE = BASE + 0x000000008 , LOADFLTR = BASE + 0x000000010 , INITFIRST = BASE + 0x000000020 , NOOPEN = BASE + 0x000000040 , HANDLE_ORIGIN = BASE + 0x000000080 , DIRECT = BASE + 0x000000100 , TRANS = BASE + 0x000000200 , INTERPOSE = BASE + 0x000000400 , NODEFLIB = BASE + 0x000000800 , NODUMP = BASE + 0x000001000 , CONFALT = BASE + 0x000002000 , ENDFILTEE = BASE + 0x000004000 , DISPRELDNE = BASE + 0x000008000 , DISPRELPND = BASE + 0x000010000 , NODIRECT = BASE + 0x000020000 , IGNMULDEF = BASE + 0x000040000 , NOKSYMS = BASE + 0x000080000 , NOHDR = BASE + 0x000100000 , EDITED = BASE + 0x000200000 , NORELOC = BASE + 0x000400000 , SYMINTPOSE = BASE + 0x000800000 , GLOBAUDIT = BASE + 0x001000000 , SINGLETON = BASE + 0x002000000 , PIE = BASE + 0x008000000 , KMOD = BASE + 0x010000000 , WEAKFILTER = BASE + 0x020000000 , NOCOMMON = BASE + 0x040000000 } |
| using | flags_list_t = std::vector<FLAG> |
| Public Types inherited from LIEF::ELF::DynamicEntry | |
| enum class | TAG : uint64_t { UNKNOWN = uint64_t(-1) , DT_NULL_ = 0 , NEEDED = 1 , PLTRELSZ = 2 , PLTGOT = 3 , HASH = 4 , STRTAB = 5 , SYMTAB = 6 , RELA = 7 , RELASZ = 8 , RELAENT = 9 , STRSZ = 10 , SYMENT = 11 , INIT = 12 , FINI = 13 , SONAME = 14 , RPATH = 15 , SYMBOLIC = 16 , REL = 17 , RELSZ = 18 , RELENT = 19 , PLTREL = 20 , DEBUG_TAG = 21 , TEXTREL = 22 , JMPREL = 23 , BIND_NOW = 24 , INIT_ARRAY = 25 , FINI_ARRAY = 26 , INIT_ARRAYSZ = 27 , FINI_ARRAYSZ = 28 , RUNPATH = 29 , FLAGS = 30 , PREINIT_ARRAY = 32 , PREINIT_ARRAYSZ = 33 , SYMTAB_SHNDX = 34 , RELRSZ = 35 , RELR = 36 , RELRENT = 37 , GNU_HASH = 0x6FFFFEF5 , RELACOUNT = 0x6FFFFFF9 , RELCOUNT = 0x6FFFFFFA , FLAGS_1 = 0x6FFFFFFB , VERSYM = 0x6FFFFFF0 , VERDEF = 0x6FFFFFFC , VERDEFNUM = 0x6FFFFFFD , VERNEED = 0x6FFFFFFE , VERNEEDNUM = 0x6FFFFFFF , ANDROID_REL_OFFSET = 0x6000000D , ANDROID_REL_SIZE = 0x6000000E , ANDROID_REL = 0x6000000F , ANDROID_RELSZ = 0x60000010 , ANDROID_RELA = 0x60000011 , ANDROID_RELASZ = 0x60000012 , ANDROID_RELR = 0x6FFFE000 , ANDROID_RELRSZ = 0x6FFFE001 , ANDROID_RELRENT = 0x6FFFE003 , ANDROID_RELRCOUNT = 0x6FFFE005 , MIPS_RLD_VERSION = MIPS_DISC + 0x70000001 , MIPS_TIME_STAMP = MIPS_DISC + 0x70000002 , MIPS_ICHECKSUM = MIPS_DISC + 0x70000003 , MIPS_IVERSION = MIPS_DISC + 0x70000004 , MIPS_FLAGS = MIPS_DISC + 0x70000005 , MIPS_BASE_ADDRESS = MIPS_DISC + 0x70000006 , MIPS_MSYM = MIPS_DISC + 0x70000007 , MIPS_CONFLICT = MIPS_DISC + 0x70000008 , MIPS_LIBLIST = MIPS_DISC + 0x70000009 , MIPS_LOCAL_GOTNO = MIPS_DISC + 0x7000000a , MIPS_CONFLICTNO = MIPS_DISC + 0x7000000b , MIPS_LIBLISTNO = MIPS_DISC + 0x70000010 , MIPS_SYMTABNO = MIPS_DISC + 0x70000011 , MIPS_UNREFEXTNO = MIPS_DISC + 0x70000012 , MIPS_GOTSYM = MIPS_DISC + 0x70000013 , MIPS_HIPAGENO = MIPS_DISC + 0x70000014 , MIPS_RLD_MAP = MIPS_DISC + 0x70000016 , MIPS_DELTA_CLASS = MIPS_DISC + 0x70000017 , MIPS_DELTA_CLASS_NO = MIPS_DISC + 0x70000018 , MIPS_DELTA_INSTANCE = MIPS_DISC + 0x70000019 , MIPS_DELTA_INSTANCE_NO = MIPS_DISC + 0x7000001A , MIPS_DELTA_RELOC = MIPS_DISC + 0x7000001B , MIPS_DELTA_RELOC_NO = MIPS_DISC + 0x7000001C , MIPS_DELTA_SYM = MIPS_DISC + 0x7000001D , MIPS_DELTA_SYM_NO = MIPS_DISC + 0x7000001E , MIPS_DELTA_CLASSSYM = MIPS_DISC + 0x70000020 , MIPS_DELTA_CLASSSYM_NO = MIPS_DISC + 0x70000021 , MIPS_CXX_FLAGS = MIPS_DISC + 0x70000022 , MIPS_PIXIE_INIT = MIPS_DISC + 0x70000023 , MIPS_SYMBOL_LIB = MIPS_DISC + 0x70000024 , MIPS_LOCALPAGE_GOTIDX = MIPS_DISC + 0x70000025 , MIPS_LOCAL_GOTIDX = MIPS_DISC + 0x70000026 , MIPS_HIDDEN_GOTIDX = MIPS_DISC + 0x70000027 , MIPS_PROTECTED_GOTIDX = MIPS_DISC + 0x70000028 , MIPS_OPTIONS = MIPS_DISC + 0x70000029 , MIPS_INTERFACE_SIZE = MIPS_DISC + 0x7000002C , MIPS_RLD_TEXT_RESOLVE_ADDR = MIPS_DISC + 0x7000002D , MIPS_PERF_SUFFIX = MIPS_DISC + 0x7000002E , MIPS_COMPACT_SIZE = MIPS_DISC + 0x7000002F , MIPS_GP_VALUE = MIPS_DISC + 0x70000030 , MIPS_AUX_DYNAMIC = MIPS_DISC + 0x70000031 , MIPS_PLTGOT = MIPS_DISC + 0x70000032 , MIPS_RWPLT = MIPS_DISC + 0x70000034 , MIPS_RLD_MAP_REL = MIPS_DISC + 0x70000035 , MIPS_XHASH = MIPS_DISC + 0x70000036 , AARCH64_BTI_PLT = AARCH64_DISC + 0x70000001 , AARCH64_PAC_PLT = AARCH64_DISC + 0x70000003 , AARCH64_VARIANT_PCS = AARCH64_DISC + 0x70000005 , AARCH64_MEMTAG_MODE = AARCH64_DISC + 0x70000009 , AARCH64_MEMTAG_HEAP = AARCH64_DISC + 0x7000000b , AARCH64_MEMTAG_STACK = AARCH64_DISC + 0x7000000c , AARCH64_MEMTAG_GLOBALS = AARCH64_DISC + 0x7000000d , AARCH64_MEMTAG_GLOBALSSZ = AARCH64_DISC + 0x7000000f , HEXAGON_SYMSZ = HEXAGON_DISC + 0x70000000 , HEXAGON_VER = HEXAGON_DISC + 0x70000001 , HEXAGON_PLT = HEXAGON_DISC + 0x70000002 , PPC_GOT = PPC_DISC + 0x70000000 , PPC_OPT = PPC_DISC + 0x70000001 , PPC64_GLINK = PPC64_DISC + 0x70000000 , PPC64_OPT = PPC64_DISC + 0x70000003 , RISCV_VARIANT_CC = RISCV_DISC + 0x70000003 , X86_64_PLT = X86_64_DISC + 0x70000000 , X86_64_PLTSZ = X86_64_DISC + 0x70000001 , X86_64_PLTENT = X86_64_DISC + 0x70000003 , IA_64_PLT_RESERVE = IA_64_DISC + (0x70000000 + 0) , IA_64_VMS_SUBTYPE = IA_64_DISC + (0x60000000 + 0) , IA_64_VMS_IMGIOCNT = IA_64_DISC + (0x60000000 + 2) , IA_64_VMS_LNKFLAGS = IA_64_DISC + (0x60000000 + 8) , IA_64_VMS_VIR_MEM_BLK_SIZ = IA_64_DISC + (0x60000000 + 10) , IA_64_VMS_IDENT = IA_64_DISC + (0x60000000 + 12) , IA_64_VMS_NEEDED_IDENT = IA_64_DISC + (0x60000000 + 16) , IA_64_VMS_IMG_RELA_CNT = IA_64_DISC + (0x60000000 + 18) , IA_64_VMS_SEG_RELA_CNT = IA_64_DISC + (0x60000000 + 20) , IA_64_VMS_FIXUP_RELA_CNT = IA_64_DISC + (0x60000000 + 22) , IA_64_VMS_FIXUP_NEEDED = IA_64_DISC + (0x60000000 + 24) , IA_64_VMS_SYMVEC_CNT = IA_64_DISC + (0x60000000 + 26) , IA_64_VMS_XLATED = IA_64_DISC + (0x60000000 + 30) , IA_64_VMS_STACKSIZE = IA_64_DISC + (0x60000000 + 32) , IA_64_VMS_UNWINDSZ = IA_64_DISC + (0x60000000 + 34) , IA_64_VMS_UNWIND_CODSEG = IA_64_DISC + (0x60000000 + 36) , IA_64_VMS_UNWIND_INFOSEG = IA_64_DISC + (0x60000000 + 38) , IA_64_VMS_LINKTIME = IA_64_DISC + (0x60000000 + 40) , IA_64_VMS_SEG_NO = IA_64_DISC + (0x60000000 + 42) , IA_64_VMS_SYMVEC_OFFSET = IA_64_DISC + (0x60000000 + 44) , IA_64_VMS_SYMVEC_SEG = IA_64_DISC + (0x60000000 + 46) , IA_64_VMS_UNWIND_OFFSET = IA_64_DISC + (0x60000000 + 48) , IA_64_VMS_UNWIND_SEG = IA_64_DISC + (0x60000000 + 50) , IA_64_VMS_STRTAB_OFFSET = IA_64_DISC + (0x60000000 + 52) , IA_64_VMS_SYSVER_OFFSET = IA_64_DISC + (0x60000000 + 54) , IA_64_VMS_IMG_RELA_OFF = IA_64_DISC + (0x60000000 + 56) , IA_64_VMS_SEG_RELA_OFF = IA_64_DISC + (0x60000000 + 58) , IA_64_VMS_FIXUP_RELA_OFF = IA_64_DISC + (0x60000000 + 60) , IA_64_VMS_PLTGOT_OFFSET = IA_64_DISC + (0x60000000 + 62) , IA_64_VMS_PLTGOT_SEG = IA_64_DISC + (0x60000000 + 64) , IA_64_VMS_FPMODE = IA_64_DISC + (0x60000000 + 66) } |
| Public Types inherited from LIEF::Object | |
| template<class T> | |
| using | output_t = add_pointer_t<decay_t<T>> |
| template<class T> | |
| using | output_const_t = add_pointer_t<add_const_t<decay_t<T>>> |
Public Member Functions | |
| DynamicEntryFlags ()=delete | |
| DynamicEntryFlags & | operator= (const DynamicEntryFlags &)=default |
| DynamicEntryFlags (const DynamicEntryFlags &)=default | |
| std::unique_ptr< DynamicEntry > | clone () const override |
| bool | has (FLAG f) const |
| If the current entry has the given FLAG. | |
| flags_list_t | flags () const |
| Return flags as a list of integers. | |
| uint64_t | raw_flags () const |
| void | add (FLAG f) |
| Add the given FLAG. | |
| void | remove (FLAG f) |
| Remove the given FLAG. | |
| DynamicEntryFlags & | operator+= (FLAG f) |
| DynamicEntryFlags & | operator-= (FLAG f) |
| void | accept (Visitor &visitor) const override |
| ~DynamicEntryFlags ()=default | |
| std::ostream & | print (std::ostream &os) const override |
| DynamicEntry ()=default | |
| DynamicEntry (const details::Elf64_Dyn &header, ARCH arch) | |
| DynamicEntry (const details::Elf32_Dyn &header, ARCH arch) | |
| DynamicEntry (TAG tag, uint64_t value) | |
| DynamicEntry (const DynamicEntry &)=default | |
| Public Member Functions inherited from LIEF::ELF::DynamicEntry | |
| DynamicEntry ()=default | |
| DynamicEntry (const details::Elf64_Dyn &header, ARCH arch) | |
| DynamicEntry (const details::Elf32_Dyn &header, ARCH arch) | |
| DynamicEntry (TAG tag, uint64_t value) | |
| DynamicEntry & | operator= (const DynamicEntry &)=default |
| DynamicEntry (const DynamicEntry &)=default | |
| ~DynamicEntry () override=default | |
| TAG | tag () const |
| Tag of the current entry. The most common tags are: DT_NEEDED, DT_INIT, ... | |
| uint64_t | value () const |
| Return the entry's value. | |
| void | tag (TAG tag) |
| void | value (uint64_t value) |
| std::string | to_string () const |
| template<class T> | |
| const T * | cast () const |
| template<class T> | |
| T * | cast () |
| Public Member Functions inherited from LIEF::Object | |
| Object () | |
| Object (const Object &other) | |
| Object & | operator= (const Object &other) |
| Object (Object &&other) noexcept=default | |
| Object & | operator= (Object &&other) noexcept=default |
| template<class T> | |
| output_t< T > | as () |
| template<class T> | |
| output_const_t< T > | as () const |
| virtual bool | operator== (const Object &other) const |
| virtual bool | operator!= (const Object &other) const |
| virtual | ~Object () |
Static Public Member Functions | |
| static DynamicEntryFlags | create_dt_flag (uint64_t value) |
| static DynamicEntryFlags | create_dt_flag_1 (uint64_t value) |
| static bool | classof (const DynamicEntry *entry) |
| Static Public Member Functions inherited from LIEF::ELF::DynamicEntry | |
| static TAG | from_value (uint64_t value, ARCH arch) |
| static uint64_t | to_value (TAG tag) |
| static std::unique_ptr< DynamicEntry > | create (TAG tag, uint64_t value) |
| static std::unique_ptr< DynamicEntry > | create (TAG tag) |
Static Public Attributes | |
| static constexpr uint64_t | BASE = 0x100000000 |
| Static Public Attributes inherited from LIEF::ELF::DynamicEntry | |
| static constexpr uint64_t | MIPS_DISC = 0x100000000 |
| static constexpr uint64_t | AARCH64_DISC = 0x200000000 |
| static constexpr uint64_t | HEXAGON_DISC = 0x300000000 |
| static constexpr uint64_t | PPC_DISC = 0x400000000 |
| static constexpr uint64_t | PPC64_DISC = 0x500000000 |
| static constexpr uint64_t | RISCV_DISC = 0x600000000 |
| static constexpr uint64_t | X86_64_DISC = 0x700000000 |
| static constexpr uint64_t | IA_64_DISC = 0x800000000 |
| using LIEF::ELF::DynamicEntryFlags::flags_list_t = std::vector<FLAG> |
|
strong |
| Enumerator | |
|---|---|
| ORIGIN | The object may reference $ORIGIN. |
| SYMBOLIC | Search the shared lib before searching the exe. |
| TEXTREL | Relocations may modify a non-writable segment. |
| BIND_NOW | Process all relocations on load. |
| STATIC_TLS | Reject attempts to load dynamically. |
| NOW | Set RTLD_NOW for this object. |
| GLOBAL | Set RTLD_GLOBAL for this object. |
| GROUP | Set RTLD_GROUP for this object. |
| NODELETE | Set RTLD_NODELETE for this object. |
| LOADFLTR | Trigger filtee loading at runtime. |
| INITFIRST | Set RTLD_INITFIRST for this object. |
| NOOPEN | Set RTLD_NOOPEN for this object. |
| HANDLE_ORIGIN | $ORIGIN must be handled. |
| DIRECT | Direct binding enabled. |
| TRANS | |
| INTERPOSE | Object is used to interpose. |
| NODEFLIB | Ignore default lib search path. |
| NODUMP | Object can't be dldump'ed. |
| CONFALT | Configuration alternative created. |
| ENDFILTEE | Filtee terminates filters search. |
| DISPRELDNE | Disp reloc applied at build time. |
| DISPRELPND | Disp reloc applied at run-time. |
| NODIRECT | Object has no-direct binding. |
| IGNMULDEF | |
| NOKSYMS | |
| NOHDR | |
| EDITED | Object is modified after built. |
| NORELOC | |
| SYMINTPOSE | Object has individual interposers. |
| GLOBAUDIT | Global auditing required. |
| SINGLETON | Singleton symbols are used. |
| PIE | Singleton symbols are used. |
| KMOD | |
| WEAKFILTER | |
| NOCOMMON | |
|
delete |
Referenced by clone(), create_dt_flag(), create_dt_flag_1(), DynamicEntryFlags(), operator+=(), operator-=(), operator=(), and print().
|
default |
References DynamicEntryFlags().
|
default |
|
overridevirtual |
Reimplemented from LIEF::ELF::DynamicEntry.
| void LIEF::ELF::DynamicEntryFlags::add | ( | FLAG | f | ) |
Add the given FLAG.
Referenced by operator+=().
|
inlinestatic |
|
inlineoverridevirtual |
Reimplemented from LIEF::ELF::DynamicEntry.
References DynamicEntryFlags().
|
inlinestatic |
|
inlinestatic |
| LIEF::ELF::DynamicEntry::DynamicEntry | ( | const details::Elf32_Dyn & | header, |
| ARCH | arch ) |
| LIEF::ELF::DynamicEntry::DynamicEntry | ( | const details::Elf64_Dyn & | header, |
| ARCH | arch ) |
|
default |
|
inline |
| flags_list_t LIEF::ELF::DynamicEntryFlags::flags | ( | ) | const |
Return flags as a list of integers.
Referenced by print(), and raw_flags().
|
inline |
References add(), and DynamicEntryFlags().
|
inline |
References DynamicEntryFlags(), and remove().
|
default |
References DynamicEntryFlags().
|
overridevirtual |
Reimplemented from LIEF::ELF::DynamicEntry.
References DynamicEntry(), DynamicEntryFlags(), flags(), and LIEF::ELF::DynamicEntry::tag().
|
inline |
References flags(), and LIEF::ELF::DynamicEntry::value().
| void LIEF::ELF::DynamicEntryFlags::remove | ( | FLAG | f | ) |
Remove the given FLAG.
Referenced by operator-=().
|
staticconstexpr |