summaryrefslogtreecommitdiff
path: root/le/le_object_table.hpp
diff options
context:
space:
mode:
authorDennis Brentjes <d.brentjes@gmail.com>2016-07-05 17:51:21 +0200
committerDennis Brentjes <d.brentjes@gmail.com>2016-07-05 17:51:21 +0200
commit06336eaddcc6a8f9cc578d8f059117c3aa535c9f (patch)
tree4884cc68161df06112a49a04007fa6d03775d507 /le/le_object_table.hpp
parentb80a82fcc9edc73057796005cede4eea8380e193 (diff)
downloadopenwar-06336eaddcc6a8f9cc578d8f059117c3aa535c9f.tar.gz
openwar-06336eaddcc6a8f9cc578d8f059117c3aa535c9f.tar.bz2
openwar-06336eaddcc6a8f9cc578d8f059117c3aa535c9f.zip
Made the interface somewhat more consistant.
Diffstat (limited to 'le/le_object_table.hpp')
-rw-r--r--le/le_object_table.hpp36
1 files changed, 33 insertions, 3 deletions
diff --git a/le/le_object_table.hpp b/le/le_object_table.hpp
index c840734..c3f584d 100644
--- a/le/le_object_table.hpp
+++ b/le/le_object_table.hpp
@@ -1,13 +1,43 @@
#pragma once
-#include "le_object_table_entry.hpp"
+#include "types.hpp"
#include <map>
namespace le {
-struct ObjectTable {
- std::map<uint32_t, ObjectTableEntry> entries;
+using namespace binparse;
+
+struct ObjectTable {
+ struct Entry {
+ 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,
+ };
+
+ Value32 virtual_size;
+ Offset32 reloc_base_address;
+ Value32 object_flags;
+ Value32 page_table_index;
+ Value32 nr_page_table_entries;
+ Value32 reserved;
+ };
+
+ std::map<uint32_t, Entry> entries;
};
ObjectTable parse_object_table(std::istream& is, Offset32 offset, Value32 nr_objects);