#pragma once #include "types.hpp" namespace le { using binparse::Value32; using binparse::Offset32; enum class ObjectFlags { readable = 0x1, writable = 0x2, executable = 0x4, resource = 0x8, discardable = 0x10, shared = 0x20, has_preload_pages = 0x40, has_invalid_pages = 0x80, has_zero_filled_pages = 0x100, is_resident = 0x200, is_resident_and_contiguous = 0x300, is_resident_and_long_lockable = 0x400, alias_16_16_required = 0x1000, big_bit_setting = 0x2000, is_conforming_for_code = 0x4000, IO_privilege_level = 0x8000, }; struct ObjectTableEntry { Value32 virtual_size; Offset32 reloc_base_address; Value32 ojbect_flags; Value32 page_table_index; Value32 nr_page_table_entries; Value32 reserved; }; ObjectTableEntry parse_object_table_entry(std::istream& is); std::ostream& operator<<(std::ostream& os, ObjectTableEntry const& entry); }