Files
AnyPS5/core/relinker/cli/include/Cli.hpp
T
codingreapermapsandClaude Opus 5.5 430e5c833e feat(relinker): add --trace-imports for Windows executables
With --trace-imports the entry stub resolves TraceImport_nid_no_patch
in libc.prx and passes each function import through it before writing
the slot: every PLT slot, and a GOT slot only when the original symbol
is a function, so data imports such as __stdoutp keep their address.
Without the option the output is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 16:55:31 +02:00

47 lines
1.1 KiB
C++

#ifndef CORE_RELINKER_CLI_INCLUDE_CLI_HPP
#define CORE_RELINKER_CLI_INCLUDE_CLI_HPP
#include <set>
#include <string>
#include <vector>
#include <cstdint>
#include <optional>
namespace Cli {
struct Args {
bool showHelp = false;
bool skipSyscallCheck = false;
bool trapSdkSyscallStubs = false;
bool skipSceModule = false;
bool toIntel = false;
bool toRosetta = false;
bool writeRegistry = false;
bool toWindows = false;
bool toMacos = false;
bool lazyBinding = false;
bool autorun = false;
bool windowsDiagnostics = false;
bool windowsGui = false;
std::optional<std::uint64_t> windowsFixedBase;
bool traceImports = false;
std::uint32_t unusedFilterLevel = 0;
std::string inputPath;
std::string outputPath;
std::string sceModulePath;
std::string runPath = "$ORIGIN/libs";
std::set<std::string> excludedSceModules;
std::vector<std::string> moduleDirectories;
std::vector<std::string> executables;
};
Args ParseArgs(int argc, char* argv[]);
const char* Usage();
int Autorun(const std::string& absPath, bool toWindows);
}
#endif