use cc instead of as

Co-authored-by: Jan Beich <jbeich@FreeBSD.org>
This commit is contained in:
Vaxry 2023-12-26 19:35:45 +01:00 committed by GitHub
parent d9651eab99
commit d8ca95be76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -104,7 +104,7 @@ CFunctionHook::SAssembly CFunctionHook::fixInstructionProbeRIPCalls(const SInstr
std::ofstream ofs("/tmp/hypr/.hookcode.asm", std::ios::trunc);
ofs << assemblyBuilder;
ofs.close();
execAndGet("as /tmp/hypr/.hookcode.asm -o /tmp/hypr/.hookbinary.o && objcopy -O binary -j .text /tmp/hypr/.hookbinary.o /tmp/hypr/.hookbinary2.o");
execAndGet("cc -x assembler -c /tmp/hypr/.hookcode.asm -o /tmp/hypr/.hookbinary.o && objcopy -O binary -j .text /tmp/hypr/.hookbinary.o /tmp/hypr/.hookbinary2.o");
if (!std::filesystem::exists("/tmp/hypr/.hookbinary2.o")) {
std::filesystem::remove("/tmp/hypr/.hookcode.asm");
std::filesystem::remove("/tmp/hypr/.hookbinary.asm");