diff options
| author | ItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com> | 2026-11-21 15:47:56 -0500 |
|---|---|---|
| committer | ItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com> | 2026-11-21 15:47:56 -0500 |
| commit | 7ec7511da0e2c1b8a47d2b920106d4dc67cbb3a7 (patch) | |
| tree | 797236f73f0bf04053ce39e71110a0f8c75de07c /runtime/src/pe_loader.h | |
| parent | 556fc4a1db007067d17eb90d3e014231243f0a00 (diff) | |
| parent | da499ab9113015ba91c2218895abc51f0aa4baf3 (diff) | |
Merge pull request #140 from IAmNotSiob
Diffstat (limited to 'runtime/src/pe_loader.h')
| -rw-r--r-- | runtime/src/pe_loader.h | 7 |
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 | ||
| 71 | std::string lower(std::string s); | 76 | std::string lower(std::string s); |