mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 08:33:12 -05:00
feat(relinker): exclude single sce_module files, tolerate a zero code tail
- --exclude-sce-module <file> (repeatable) drops one title module from guest conversion, e.g. a title libc.prx, while the rest of sce_module is still relinked as guest modules - the instruction scanner stops at zero padding that ends a code segment with an odd byte instead of failing on a truncated `add [rax], al` Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
75a8668b5e
commit
f4f8d5bbce
7 files changed
+31
-4
No files matched your search
@@ -35,6 +35,8 @@ std::vector<InstructionMatch> InstructionScanner::ScanCodeSection(
|
||||
try {
|
||||
length = decoder.Decode(cursor, available);
|
||||
} catch (const CodegenException& e) {
|
||||
// Zero padding at the segment tail decodes as `add [rax], al` pairs; an odd tail leaves one truncated byte.
|
||||
if (std::all_of(cursor, cursor + available, [](const std::uint8_t b) { return b == 0; })) break;
|
||||
throw CodegenException(std::string("Cannot decode instruction: ") + e.what(), codeSectionOffset + i);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user