upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/pe_loader.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/src/pe_loader.h')
-rw-r--r--runtime/src/pe_loader.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/runtime/src/pe_loader.h b/runtime/src/pe_loader.h
index 8d9e0a224..9df630ae0 100644
--- a/runtime/src/pe_loader.h
+++ b/runtime/src/pe_loader.h
@@ -49,6 +49,10 @@ public:
49 49
50 const std::vector<Module*>& modules() const { return order_; } 50 const std::vector<Module*>& modules() const { return order_; }
51 51
52 // The order initialise() runs modules in: each module after every module it imports (a cycle is broken at the
53 // module that closed it). modules() is mapping order, which puts an importer before its imports.
54 const std::vector<Module*>& initialisation_order() const { return init_order_; }
55
52 // Runs each loaded module's TLS callbacks and then its DllMain(DLL_PROCESS_ATTACH), dependencies first. 56 // Runs each loaded module's TLS callbacks and then its DllMain(DLL_PROCESS_ATTACH), dependencies first.
53 // Only DLLs get DllMain called: an EXE's entry point is the caller's to run. Throws on a corrupt TLS 57 // Only DLLs get DllMain called: an EXE's entry point is the caller's to run. Throws on a corrupt TLS
54 // directory, a TLS callback outside its image, or a DllMain that returns FALSE. 58 // directory, a TLS callback outside its image, or a DllMain that returns FALSE.
@@ -65,7 +69,8 @@ private:
65 69
66 std::filesystem::path game_dir_; 70 std::filesystem::path game_dir_;
67 std::map<std::string, Module*> by_name_; // lower-case file name 71 std::map<std::string, Module*> by_name_; // lower-case file name
68 std::vector<Module*> order_; 72 std::vector<Module*> order_; // mapping order; owns the modules
73 std::vector<Module*> init_order_; // dependencies first, see initialisation_order()
69}; 74};
70 75
71std::string lower(std::string s); 76std::string lower(std::string s);