eden-miror/src/core
xbzk 3f78512c83
[ro] add TLS patching for runtime NROs (#4492)
- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions).
- [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md)
- [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability.

-------------------

Aimed to fix Biomutant which stucks in a bootloop due to guest being unable to reach correct thread local storage (TLS)
This fixes runtime NRO loading by properly patching the guest TLS (TPIDR_EL0) path. Steps:
-Read the loaded NRO image into a temporary buffer.
-Run the NCE patcher on it.
-Produce a patch section / relocated code.
-Map that patch section as executable memory in the target process.
Game still has intermittent visual issues which can be solved with GPU level accurate, but that causes a huge performance drop in exchange. Someone else will resume this one.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4492
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: lizzie <lizzie@eden-emu.dev>
2026-09-30 00:58:29 +02:00
..
arm [dynarmic] Coalesce non-exclusive Write/Read fallback functions (#4158) 2026-09-19 01:39:46 +02:00
crypto [common] rework BitField and BitUtil, use concepts whenever possible (#4076) 2026-07-09 03:47:04 +02:00
debugger [cmake] Fix some macOS compilation errors (#4350) 2026-09-05 23:43:46 +02:00
file_sys [common] Use std::make_unique_for_overwrite<T> in ScratchBuffer, remove polyfill (#4432) 2026-09-25 07:54:49 +02:00
frontend [applet] ReconfigureControllers fallback unconditional disconnect fix (#4420) 2026-09-15 21:53:07 +02:00
hle [ro] add TLS patching for runtime NROs (#4492) 2026-09-30 00:58:29 +02:00
internal_network [internal_network] Fix WiFi scanner compilation on GCC 15.3.0 (#4279) 2026-08-21 23:29:24 +02:00
loader [loader] add ZBIC (zstd variant) NSO decompression support for Switch 22.0+ (#4482) 2026-09-27 12:48:45 +02:00
memory [core, hle, video_core, memory] Improve multi-process, display layers, dynamic shader cache and rework overlay (#4238) 2026-08-29 01:04:02 +02:00
tools [dynarmic] Coalesce non-exclusive Write/Read fallback functions (#4158) 2026-09-19 01:39:46 +02:00
CMakeLists.txt [frontend] Unify cmdline parsing (#4424) 2026-09-23 14:51:51 +02:00
constants.cpp [core] Use a eden profile picture instead of the default grey one. (#3350) 2026-01-20 18:32:08 +01:00
constants.h [core] Use a eden profile picture instead of the default grey one. (#3350) 2026-01-20 18:32:08 +01:00
core.cpp [fs] moved temp folder cleanup upstream (per-application level) to avoid per-program retrigger (#4375) 2026-09-10 22:30:07 +02:00
core.h [service, nvhost] added machinery to allow microsleep between nvdec read requests to avoid guest panic in some games (#4316) 2026-08-29 14:22:09 +02:00
core_timing.cpp [core, gpu, threads] Multithreading refactor (#4254) 2026-08-08 04:39:47 +02:00
core_timing.h [core/core_timing] better MWAITX and WAITPKG delays (#3984) 2026-05-30 21:59:10 +02:00
cpu_manager.cpp [core, gpu, threads] Multithreading refactor (#4254) 2026-08-08 04:39:47 +02:00
cpu_manager.h [video_core, hle] remove redundant parent references in system structs (#3908) 2026-06-23 06:31:25 +02:00
device_memory.cpp core: Define HAS_NCE macro 2023-11-25 00:47:36 -05:00
device_memory.h [common/core/dynarmic] Optimize page table allocations (#4219) 2026-09-09 21:35:49 +02:00
device_memory_manager.h [common/core/dynarmic] Optimize page table allocations (#4219) 2026-09-09 21:35:49 +02:00
device_memory_manager.inc [common/core/dynarmic] Optimize page table allocations (#4219) 2026-09-09 21:35:49 +02:00
game_settings.cpp [common/logging] Simplify logging logic and fix issues when logging before system is created (#3688) 2026-03-12 18:29:15 +01:00
game_settings.h [core] Add overridable game setting functionality (#2963) 2025-12-17 03:59:27 +01:00
gpu_dirty_memory_manager.h Core: Eliminate core/memory dependancies. 2024-01-18 21:12:30 -05:00
guest_memory.h Solves warning about GuestMemory having internal linkage. 2025-04-04 03:40:47 +02:00
hardware_properties.h [dynarmic] jit fix branch v2 (#203) 2025-08-27 06:49:50 +02:00
launch_params.cpp [frontend] Unify cmdline parsing (#4424) 2026-09-23 14:51:51 +02:00
launch_params.h [frontend] Unify cmdline parsing (#4424) 2026-09-23 14:51:51 +02:00
launch_timestamp_cache.cpp [common] Switch to boost::unordered_flat containers (#4326) 2026-08-31 02:58:09 +02:00
launch_timestamp_cache.h [tests] fix compile+linking issues with PlayTime (#3345) 2026-01-19 16:27:18 +01:00
memory.cpp [common/core/dynarmic] Optimize page table allocations (#4219) 2026-09-09 21:35:49 +02:00
memory.h Revert "[core/memory] Remove defered heap allocation on Linux." (#2974) 2025-11-09 22:42:09 +01:00
perf_stats.cpp [frontend] Slow and Turbo modes (#3525) 2026-02-12 01:31:55 +01:00
perf_stats.h
reporter.cpp [core, hle, video_core, memory] Improve multi-process, display layers, dynamic shader cache and rework overlay (#4238) 2026-08-29 01:04:02 +02:00
reporter.h [prepo] Add support for missing PlayReport commands (#3674) 2026-03-06 15:02:59 +01:00