diff options
Diffstat (limited to 'runtime/src/pe_loader.cpp')
| -rw-r--r-- | runtime/src/pe_loader.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/runtime/src/pe_loader.cpp b/runtime/src/pe_loader.cpp index 54440459d..fc73f37f5 100644 --- a/runtime/src/pe_loader.cpp +++ b/runtime/src/pe_loader.cpp | |||
| @@ -1341,10 +1341,6 @@ void* bundled_load_w(void* ctx, const std::wstring& basename, uint32_t flags, bo | |||
| 1341 | return static_cast<Loader*>(ctx)->load_runtime_module_w(basename, flags, handled); | 1341 | return static_cast<Loader*>(ctx)->load_runtime_module_w(basename, flags, handled); |
| 1342 | } | 1342 | } |
| 1343 | 1343 | ||
| 1344 | bool bundled_module_path(void* ctx, void* module, std::wstring& path) { | ||
| 1345 | return static_cast<Loader*>(ctx)->module_path(module, path); | ||
| 1346 | } | ||
| 1347 | |||
| 1348 | const shims::BundledModuleOps kBundledOps{ | 1344 | const shims::BundledModuleOps kBundledOps{ |
| 1349 | &bundled_find_loaded, | 1345 | &bundled_find_loaded, |
| 1350 | &bundled_load, | 1346 | &bundled_load, |
| @@ -1352,7 +1348,6 @@ const shims::BundledModuleOps kBundledOps{ | |||
| 1352 | &bundled_owns_handle, | 1348 | &bundled_owns_handle, |
| 1353 | &bundled_find_loaded_w, | 1349 | &bundled_find_loaded_w, |
| 1354 | &bundled_load_w, | 1350 | &bundled_load_w, |
| 1355 | &bundled_module_path, | ||
| 1356 | }; | 1351 | }; |
| 1357 | 1352 | ||
| 1358 | // Marks what a run-time load maps as a dynamic load for as long as it is in scope (the caller holds the mutex). | 1353 | // Marks what a run-time load maps as a dynamic load for as long as it is in scope (the caller holds the mutex). |
| @@ -1600,19 +1595,6 @@ bool Loader::find_address(uint64_t address, std::string& module, uint32_t& rva) | |||
| 1600 | return false; | 1595 | return false; |
| 1601 | } | 1596 | } |
| 1602 | 1597 | ||
| 1603 | bool Loader::module_path(void* module_handle, std::wstring& path) const { | ||
| 1604 | if (!module_handle) return false; | ||
| 1605 | std::lock_guard lock(mutex_); | ||
| 1606 | for (const Module* m : order_) | ||
| 1607 | if (m->base == module_handle) { | ||
| 1608 | std::error_code ec; | ||
| 1609 | const std::filesystem::path absolute = std::filesystem::absolute(m->path, ec); | ||
| 1610 | path = (ec ? m->path : absolute).wstring(); | ||
| 1611 | return true; | ||
| 1612 | } | ||
| 1613 | return false; | ||
| 1614 | } | ||
| 1615 | |||
| 1616 | bool Loader::owns_module_handle(void* module_handle) const { | 1598 | bool Loader::owns_module_handle(void* module_handle) const { |
| 1617 | if (!module_handle) return false; | 1599 | if (!module_handle) return false; |
| 1618 | std::lock_guard lock(mutex_); | 1600 | std::lock_guard lock(mutex_); |