With a mod plugin on, read-only module data stays writable on the host, so Zonai Fieldworks can swap main's RELRO entries when a member is switched on in play (#1451)

QueryMemory still reports the permission the game asked for. Material Columns swaps 11 dispatch slots in main's
RELRO from its own code at switch time; on the platforms the mod is made for that write goes through, here it
faulted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Valiantsin DzerakhandClaude Opus 5.5 committed 2026-11-25 21:06:27 +03:00
1 parent d4794238d4
commit 5c5c6d1dd0
3 files changed
+14 -3

No files matched your search

+1
View File
@@ -708,6 +708,7 @@ int plugins_start(Cpu *c, const RtLoaded *sdk) {
for (int i = 0; i < naliases; i++) live += aliases[i].live;
rt_log("plugins: %d of %d plugins on in %llu ms (%d process-memory maps, %d kept)", on, nrun,
(unsigned long long)(plat_now_ms() - t0), naliases, live);
mem_plugin_writes = on > 0; // before main's DT_INIT seals its RELRO (memory.c mem_set_permission)
if (on && cfg_bool("TOTK_PLUGIN_TRACE")) trace_entries();
return 1;
#else