diff options
| author | jaybeebabageyus <jaybeebabageyus@users.noreply.github.com> | 2026-11-22 20:57:07 +0100 |
|---|---|---|
| committer | jaybeebabageyus <jaybeebabageyus@users.noreply.github.com> | 2026-11-22 20:57:07 +0100 |
| commit | 50e9dd32fa8d9ebb6ba22e559ca62fa95920b88d (patch) | |
| tree | d5b82116e556cfc96f96b7e575b91a049dd42fb9 /runtime/src/pe_loader.h | |
| parent | 1188e6406e31870119a7e50c5972599db554a406 (diff) | |
| parent | 162821017ea3c286c8bec860f3ff94f037912061 (diff) | |
Merge remote-tracking branch 'upstream/main' into 2070-lifecycle-fix
# Conflicts:
# runtime/src/pe_loader.cpp
# runtime/src/pe_loader.h
# runtime/test/loader_tls_test.cpp
Diffstat (limited to 'runtime/src/pe_loader.h')
| -rw-r--r-- | runtime/src/pe_loader.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/runtime/src/pe_loader.h b/runtime/src/pe_loader.h index 0861259ab..8fb24349f 100644 --- a/runtime/src/pe_loader.h +++ b/runtime/src/pe_loader.h | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | #include <cstdint> | 8 | #include <cstdint> |
| 9 | #include <filesystem> | 9 | #include <filesystem> |
| 10 | #include <map> | 10 | #include <map> |
| 11 | #include <mutex> | ||
| 11 | #include <string> | 12 | #include <string> |
| 12 | #include <vector> | 13 | #include <vector> |
| 13 | 14 | ||
| @@ -105,6 +106,12 @@ public: | |||
| 105 | void install_tls_for_thread(Module& m); | 106 | void install_tls_for_thread(Module& m); |
| 106 | void uninstall_tls_for_thread(Module& m); | 107 | void uninstall_tls_for_thread(Module& m); |
| 107 | 108 | ||
| 109 | // Run-time module lookup/loading used by the library_loader shim for bundled package DLLs. | ||
| 110 | void* find_loaded_module(const std::string& dll_lower) const; | ||
| 111 | void* load_runtime_module(const std::string& dll_lower, uint32_t flags, bool& handled); | ||
| 112 | void* resolve_module_export(void* module_handle, const std::string& sym, bool& owns_handle); | ||
| 113 | bool owns_module_handle(void* module_handle) const; | ||
| 114 | |||
| 108 | private: | 115 | private: |
| 109 | void initialise(Module& m); | 116 | void initialise(Module& m); |
| 110 | static void set_initialised(Module& m, bool value); | 117 | static void set_initialised(Module& m, bool value); |
| @@ -117,6 +124,7 @@ private: | |||
| 117 | void protect_sections(Module& m); | 124 | void protect_sections(Module& m); |
| 118 | void register_unwind(Module& m); | 125 | void register_unwind(Module& m); |
| 119 | 126 | ||
| 127 | mutable std::recursive_mutex mutex_; | ||
| 120 | std::filesystem::path game_dir_; | 128 | std::filesystem::path game_dir_; |
| 121 | std::map<std::string, Module*> by_name_; // lower-case file name | 129 | std::map<std::string, Module*> by_name_; // lower-case file name |
| 122 | std::vector<Module*> order_; // mapping order; owns the modules | 130 | std::vector<Module*> order_; // mapping order; owns the modules |