Writes of the title's that change nothing are not made: faulting stores and copies beside the guards, and flags it sets that are set (VICTORY_WRITE_SITES=<file>: places changed at load to look first; off without it)
A store that faults, or a part of a copy into a guarded block, whose bytes are there already is left out (with VICTORY_STORE_BESIDE, VICTORY_COPY_BESIDE). The places in the title's code where that is the rule and the instruction is an `or` of a byte with a constant are written into the file, and made to look before they write at the next start. The file holds offsets, no code. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
f19e55b8b6
commit
83a1bcf5b7
8 files changed
+437
-18
No files matched your search
@@ -162,6 +162,11 @@ pub fn run(
|
||||
}
|
||||
let exe_name = exe.file_name().unwrap_or_default().to_string_lossy();
|
||||
show(&exe_name, image.bind_imports(&with_dlls, policy)?);
|
||||
if execute {
|
||||
let (name, size) = (prepared.file_name(), image.info().size_of_image as usize);
|
||||
// SAFETY: the image stays mapped, and nothing of it has run yet.
|
||||
unsafe { victory_loader::write_sites::apply_asked(&name, image.base(), size) };
|
||||
}
|
||||
if !execute {
|
||||
println!("not executing (pass --execute to start the title)");
|
||||
return Ok(());
|
||||
|
||||
Reference in new issue
Block a user