diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-24 18:23:04 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-24 18:23:04 -0500 |
| commit | 7234bcd7a54eb9aa06c97389e8322ced26c54e6d (patch) | |
| tree | 011799aea6b051ec9362552e606d73653c6a61f4 /runtime/src/pe_loader.cpp | |
| parent | ac73a84127ee49b5ecf9702bed16603b34b7f7ec (diff) | |
| parent | 2376e7d56bc61bf17f9767e21d651071fe74ee6e (diff) | |
Merge main into RT-SLOT108-REBASE (#727)
Three files conflicted; in each, both sides had added something and both
are kept.
runtime/shims/d3d12_xs_device.cpp: this branch still had the Xbox device
slot routes inline, followed by its fixed handlers for slots 86, 101 and
108; main has since moved the same six routes into
route_xbox_device_slot() (#385). The generic path now calls the helper and
then the three fixed handlers, so a configured route still wins over
them, as this branch's second commit intends. device_slot_overridden()
has main's list plus 86, 101 and 108.
runtime/shims/d3d12_xs_device.h: the comment lists both sides' slots.
runtime/test/xs_proxy_mock_test.cpp: the mock device keeps main's case 13
(CheckFeatureSupport) and this branch's case 68
(GetResourceAllocationInfo2); check_xbox_slots keeps main's slot 41 and 61
cases, one combined list of handled slots, and this branch's slot 86, 101
and 108 cases.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/pe_loader.cpp')
| -rw-r--r-- | runtime/src/pe_loader.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/src/pe_loader.cpp b/runtime/src/pe_loader.cpp index c29a288a9..cc4ae88aa 100644 --- a/runtime/src/pe_loader.cpp +++ b/runtime/src/pe_loader.cpp | |||
| @@ -1094,6 +1094,7 @@ Loader::~Loader() { | |||
| 1094 | entry(m.base, DLL_PROCESS_DETACH, nullptr); // explicit unload; the return value is ignored | 1094 | entry(m.base, DLL_PROCESS_DETACH, nullptr); // explicit unload; the return value is ignored |
| 1095 | } | 1095 | } |
| 1096 | } | 1096 | } |
| 1097 | shims::remove_xmem_allocation_hooks(this); | ||
| 1097 | shims::remove_bundled_loader(this); | 1098 | shims::remove_bundled_loader(this); |
| 1098 | shims::remove_module_lookup(this); | 1099 | shims::remove_module_lookup(this); |
| 1099 | for (auto* m : order_) { | 1100 | for (auto* m : order_) { |
| @@ -1498,6 +1499,12 @@ Module& Loader::map_image(const std::filesystem::path& path, const std::string& | |||
| 1498 | // installed here, before bind_imports can return control to the caller and before any image code can run. | 1499 | // installed here, before bind_imports can return control to the caller and before any image code can run. |
| 1499 | initialize_tls(*m); | 1500 | initialize_tls(*m); |
| 1500 | parse_exports(*m); | 1501 | parse_exports(*m); |
| 1502 | if (auto it = m->exports.find("__XMemAllocationHooks__"); it != m->exports.end()) { | ||
| 1503 | const auto offset = static_cast<uint64_t>(static_cast<uint8_t*>(it->second) - m->base); | ||
| 1504 | if (offset <= m->size && m->size - offset >= sizeof(shims::XMemAllocationHooks)) { | ||
| 1505 | shims::add_xmem_allocation_hooks(this, static_cast<const shims::XMemAllocationHooks*>(it->second)); | ||
| 1506 | } | ||
| 1507 | } | ||
| 1501 | return *m; | 1508 | return *m; |
| 1502 | } | 1509 | } |
| 1503 | 1510 | ||