mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-10 01:28:44 +02: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:
@@ -71,6 +71,7 @@ int main(const int argc, char* argv[]) {
|
||||
|
||||
std::cout << "System: " << (args.toWindows ? "Windows" : "Linux") << "; unused-filter=" << args.unusedFilterLevel << "\n";
|
||||
std::cout << "sce_module/sce_modules processing: " << (args.skipSceModule ? "disabled (--skip-sce-module)" : "enabled") << '\n';
|
||||
for (const auto& name : args.excludedSceModules) std::cout << "sce_module excluded: " << name << '\n';
|
||||
auto result = pipeline->Relink(sourceBytes);
|
||||
for (const auto& patch : result.Patches) {
|
||||
if (patch.Offset > sourceBytes.size() || patch.Bytes.size() > sourceBytes.size() - patch.Offset)
|
||||
@@ -80,7 +81,7 @@ int main(const int argc, char* argv[]) {
|
||||
|
||||
std::vector<Relinker::GuestArtifact> guestArtifacts;
|
||||
if (!args.skipSceModule) {
|
||||
guestArtifacts = Relinker::GuestModuleBuilder().Build(args.inputPath, absPath, result.DynamicSection, args.toWindows, args.toIntel, *syscallScanner, args.lazyBinding, args.runPath);
|
||||
guestArtifacts = Relinker::GuestModuleBuilder().Build(args.inputPath, absPath, result.DynamicSection, args.toWindows, args.toIntel, *syscallScanner, args.lazyBinding, args.runPath, args.excludedSceModules);
|
||||
}
|
||||
|
||||
if (args.writeRegistry) {
|
||||
|
||||
Reference in New Issue
Block a user