Go to the documentation of this file.
16#ifndef LIEF_ABSTRACT_HEADER_H
17#define LIEF_ABSTRACT_HEADER_H
42 enum class ARCHITECTURES {
57 enum class ENDIANNESS {
63 enum MODES : uint64_t {
74 enum class OBJECT_TYPES {
81 static Header
from(
const LIEF::ELF::Binary& elf);
82 static Header
from(
const LIEF::PE::Binary& pe);
83 static Header
from(
const LIEF::MachO::Binary& macho);
103 bool is(MODES m)
const {
104 return ((uint64_t)m & (uint64_t)modes_) != 0;
119 return ((uint64_t)modes_ & (uint64_t)MODES::BITS_32) != 0;
123 return ((uint64_t)modes_ & (uint64_t)MODES::BITS_64) != 0;
126 void accept(Visitor& visitor)
const override;
131 ARCHITECTURES architecture_ = ARCHITECTURES::UNKNOWN;
132 OBJECT_TYPES object_type_ = OBJECT_TYPES::UNKNOWN;
133 uint64_t entrypoint_ = 0;
134 ENDIANNESS endianness_ = ENDIANNESS::UNKNOWN;
135 MODES modes_ = MODES::NONE;
Class which represents an ELF binary.
Definition ELF/Binary.hpp:59
Class which represents a MachO binary.
Definition MachO/Binary.hpp:86
Class which represents a PE binary This is the main interface to manage and modify a PE executable.
Definition PE/Binary.hpp:52
#define ENABLE_BITMASK_OPERATORS(X)
Definition enums.hpp:24
Namespace related to the LIEF's ELF module.
Definition Abstract/Header.hpp:28
Namespace related to the LIEF's Mach-O module.
Definition Abstract/Header.hpp:36
Namespace related to the LIEF's PE module.
Definition Abstract/Header.hpp:32
LIEF namespace.
Definition Abstract/Binary.hpp:36
const char * to_string(Binary::VA_TYPES e)
#define LIEF_API
Definition visibility.h:41