fix(relinker): use general pipeline after converting for --to-intel flag

This commit is contained in:
boykopovar
2026-09-26 12:47:31 +03:00
parent 223777d3df
commit 2f30b62a69
+4 -4
View File
@@ -44,12 +44,12 @@ int main(const int argc, char* argv[]) {
const Relinker::ElfReader elfReader(sourceBytes);
const auto converter = Codegen::MakeAmd64OnlyConverter();
auto result = converter->Convert(std::move(sourceBytes), elfReader.ReadCodeSegments());
fileWriter.Write(absPath, std::move(result.Bytes));
auto codeSegments = elfReader.ReadCodeSegments();
auto result = converter->Convert(std::move(sourceBytes), codeSegments);
sourceBytes = std::move(result.Bytes);
std::cout << "OK: " << result.ReplacedCount << " instructions replaced\n";
if (args.autorun) return Cli::Autorun(absPath, args.toWindows);
}
auto elfReader = std::make_shared<Relinker::ElfReader>(sourceBytes);