61bcdefg / Hikari-LLVM15

A fork of Hikari Obfuscator [WIP]
562 stars 150 forks source link

Linking process fail #22

Closed udishamir closed 1 year ago

udishamir commented 1 year ago

[100%] Linking CXX executable ../../../../bin/clang-repl /usr/bin/ld: ../../lib/libLLVMObfuscation.a(AntiDebugging.cpp.o): in function llvm::AntiDebugging::runOnFunction(llvm::Function&)': AntiDebugging.cpp:(.text._ZN4llvm13AntiDebugging13runOnFunctionERNS_8FunctionE[_ZN4llvm13AntiDebugging13runOnFunctionERNS_8FunctionE]+0x920): undefined reference tollvm::Linker::linkModules(llvm::Module&, std::unique_ptr<llvm::Module, std::default_delete >, unsigned int, std::function<void (llvm::Module&, llvm::StringSet const&)>)' /usr/bin/ld: ../../lib/libLLVMObfuscation.a(AntiHooking.cpp.o): in function llvm::AntiHook::doInitialization(llvm::Module&)': AntiHooking.cpp:(.text._ZN4llvm8AntiHook16doInitializationERNS_6ModuleE[_ZN4llvm8AntiHook16doInitializationERNS_6ModuleE]+0x362): undefined reference tollvm::Linker::linkModules(llvm::Module&, std::unique_ptr<llvm::Module, std::default_delete >, unsigned int, std::function<void (llvm::Module&, llvm::StringSet const&)>)' collect2: error: ld returned 1 exit status make[2]: [tools/llc/CMakeFiles/llc.dir/build.make:234: bin/llc] Error 1 make[1]: [CMakeFiles/Makefile2:88233: tools/llc/CMakeFiles/llc.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... /usr/bin/ld: ../../lib/libLLVMObfuscation.a(AntiDebugging.cpp.o): in function llvm::AntiDebugging::runOnFunction(llvm::Function&)': AntiDebugging.cpp:(.text._ZN4llvm13AntiDebugging13runOnFunctionERNS_8FunctionE[_ZN4llvm13AntiDebugging13runOnFunctionERNS_8FunctionE]+0x920): undefined reference tollvm::Linker::linkModules(llvm::Module&, std::unique_ptr<llvm::Module, std::default_delete >, unsigned int, std::function<void (llvm::Module&, llvm::StringSet const&)>)' /usr/bin/ld: ../../lib/libLLVMObfuscation.a(AntiHooking.cpp.o): in function llvm::AntiHook::doInitialization(llvm::Module&)': AntiHooking.cpp:(.text._ZN4llvm8AntiHook16doInitializationERNS_6ModuleE[_ZN4llvm8AntiHook16doInitializationERNS_6ModuleE]+0x362): undefined reference tollvm::Linker::linkModules(llvm::Module&, std::unique_ptr<llvm::Module, std::default_delete >, unsigned int, std::function<void (llvm::Module&, llvm::StringSet const&)>)' [100%] Linking CXX executable ../../../../bin/clang-linker-wrapper collect2: error: ld returned 1 exit status make[2]: [tools/llvm-opt-fuzzer/CMakeFiles/llvm-opt-fuzzer.dir/build.make:257: bin/llvm-opt-fuzzer] Error 1 make[1]: [CMakeFiles/Makefile2:94954: tools/llvm-opt-fuzzer/CMakeFiles/llvm-opt-fuzzer.dir/all] Error 2 [100%] Linking CXX executable ../../bin/lli [100%] Built target LTO /usr/bin/ld: ../../lib/libLLVMObfuscation.a(AntiDebugging.cpp.o): in function llvm::AntiDebugging::runOnFunction(llvm::Function&)': AntiDebugging.cpp:(.text._ZN4llvm13AntiDebugging13runOnFunctionERNS_8FunctionE[_ZN4llvm13AntiDebugging13runOnFunctionERNS_8FunctionE]+0x920): undefined reference tollvm::Linker::linkModules(llvm::Module&, std::unique_ptr<llvm::Module, std::default_delete >, unsigned int, std::function<void (llvm::Module&, llvm::StringSet const&)>)' /usr/bin/ld: ../../lib/libLLVMObfuscation.a(AntiHooking.cpp.o): in function llvm::AntiHook::doInitialization(llvm::Module&)': AntiHooking.cpp:(.text._ZN4llvm8AntiHook16doInitializationERNS_6ModuleE[_ZN4llvm8AntiHook16doInitializationERNS_6ModuleE]+0x362): undefined reference tollvm::Linker::linkModules(llvm::Module&, std::unique_ptr<llvm::Module, std::default_delete >, unsigned int, std::function<void (llvm::Module&, llvm::StringSet const&)>)' [100%] Built target dsymutil collect2: error: ld returned 1 exit status make[2]: [tools/llvm-lto2/CMakeFiles/llvm-lto2.dir/build.make:231: bin/llvm-lto2] Error 1 make[1]: [CMakeFiles/Makefile2:93029: tools/llvm-lto2/CMakeFiles/llvm-lto2.dir/all] Error 2 [100%] Linking CXX executable ../../bin/opt [100%] Built target llvm-dwarfutil [100%] Built target llvm-lto [100%] Built target lli [100%] Built target bugpoint [100%] Built target clang-check [100%] Linking CXX executable ../../bin/llvm-exegesis [100%] Linking CXX executable ../../../../bin/clang-scan-deps [100%] Linking CXX executable ../../bin/llvm-reduce [100%] Linking CXX shared library ../../../../lib/libclang.so [100%] Built target clang-linker-wrapper [100%] Built target llvm-exegesis [100%] Built target clang-repl /usr/bin/ld: ../../lib/libLLVMObfuscation.a(AntiDebugging.cpp.o): in function llvm::AntiDebugging::runOnFunction(llvm::Function&)': AntiDebugging.cpp:(.text._ZN4llvm13AntiDebugging13runOnFunctionERNS_8FunctionE[_ZN4llvm13AntiDebugging13runOnFunctionERNS_8FunctionE]+0x920): undefined reference tollvm::Linker::linkModules(llvm::Module&, std::unique_ptr<llvm::Module, std::default_delete >, unsigned int, std::function<void (llvm::Module&, llvm::StringSet const&)>)' /usr/bin/ld: ../../lib/libLLVMObfuscation.a(AntiHooking.cpp.o): in function llvm::AntiHook::doInitialization(llvm::Module&)': AntiHooking.cpp:(.text._ZN4llvm8AntiHook16doInitializationERNS_6ModuleE[_ZN4llvm8AntiHook16doInitializationERNS_6ModuleE]+0x362): undefined reference tollvm::Linker::linkModules(llvm::Module&, std::unique_ptr<llvm::Module, std::default_delete >, unsigned int, std::function<void (llvm::Module&, llvm::StringSet const&)>)' collect2: error: ld returned 1 exit status make[2]: [tools/opt/CMakeFiles/opt.dir/build.make:321: bin/opt] Error 1 make[1]: [CMakeFiles/Makefile2:97589: tools/opt/CMakeFiles/opt.dir/all] Error 2 [100%] Built target llvm-reduce /usr/bin/ld: ../../../../lib/libLLVMObfuscation.a(AntiDebugging.cpp.o): in function llvm::AntiDebugging::runOnFunction(llvm::Function&)': AntiDebugging.cpp:(.text._ZN4llvm13AntiDebugging13runOnFunctionERNS_8FunctionE[_ZN4llvm13AntiDebugging13runOnFunctionERNS_8FunctionE]+0x920): undefined reference tollvm::Linker::linkModules(llvm::Module&, std::unique_ptr<llvm::Module, std::default_delete >, unsigned int, std::function<void (llvm::Module&, llvm::StringSet const&)>)' /usr/bin/ld: ../../../../lib/libLLVMObfuscation.a(AntiHooking.cpp.o): in function llvm::AntiHook::doInitialization(llvm::Module&)': AntiHooking.cpp:(.text._ZN4llvm8AntiHook16doInitializationERNS_6ModuleE[_ZN4llvm8AntiHook16doInitializationERNS_6ModuleE]+0x362): undefined reference tollvm::Linker::linkModules(llvm::Module&, std::unique_ptr<llvm::Module, std::default_delete >, unsigned int, std::function<void (llvm::Module&, llvm::StringSet const&)>)' collect2: error: ld returned 1 exit status make[2]: [tools/clang/tools/clang-scan-deps/CMakeFiles/clang-scan-deps.dir/build.make:277: bin/clang-scan-deps] Error 1 make[1]: *** [CMakeFiles/Makefile2:43581: tools/clang/tools/clang-scan-deps/CMakeFiles/clang-scan-deps.dir/all] Error 2 [100%] Built target libclang

61bcdefg commented 1 year ago

What is your build environment?

udishamir commented 1 year ago

Ubuntu 22.0.4 Clang 14 ( default)

On Sun, Dec 4, 2022 at 3:49 PM abcdefg @.***> wrote:

What is your build environment?

— Reply to this email directly, view it on GitHub https://github.com/NeHyci/Hikari-LLVM15/issues/22#issuecomment-1336554112, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB2IRGZWKBNPSZ2OQ4H6ZLWLUUXPANCNFSM6AAAAAASTP5PQI . You are receiving this because you authored the thread.Message ID: @.***>

-- Udi Shamir Malware Researcher & Kernel Developer.

61bcdefg commented 1 year ago

This question looks very strange, I didn't meet on Mac, declaration of the function exists in llvm/include/llvm/Linker/Linker.h, and llvm/lib/Linker/LinkModules.cpp has its implementation. I don't have a Linux computer, maybe I can't help you.

61bcdefg commented 1 year ago

Please try the latest commit

udishamir commented 1 year ago

Ok, will give it a try now Udi Shamir Malware Researcher & Kernel Developer.

On Sun, Dec 4, 2022 at 4:37 PM abcdefg @.***> wrote:

Please try the latest commit

— Reply to this email directly, view it on GitHub https://github.com/NeHyci/Hikari-LLVM15/issues/22#issuecomment-1336574222, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB2IRBCMCCQSPTRPEJPZ23WLU2MLANCNFSM6AAAAAASTP5PQI . You are receiving this because you authored the thread.Message ID: @.***>

udishamir commented 1 year ago

Thanks, the commit works and it was compiled smoothly on Linux. I'll check its functionality now. Great job on porting HIkari to newer LLVM, i think you should focus on Linux more than macOS (personal opinion here, server infrastructure is huge). I might be able to help you with Linux server / workstation if you are ok working on the cloud.

Let me know.

Udi Shamir Malware Researcher & Kernel Developer. https://www.threatoptix.ai

On Sun, Dec 4, 2022 at 4:57 PM Ehud (Udi) Shamir @.***> wrote:

Ok, will give it a try now Udi Shamir Malware Researcher & Kernel Developer.

On Sun, Dec 4, 2022 at 4:37 PM abcdefg @.***> wrote:

Please try the latest commit

— Reply to this email directly, view it on GitHub https://github.com/NeHyci/Hikari-LLVM15/issues/22#issuecomment-1336574222, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB2IRBCMCCQSPTRPEJPZ23WLU2MLANCNFSM6AAAAAASTP5PQI . You are receiving this because you authored the thread.Message ID: @.***>