Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for llvm-14.x #14

Closed
sr-tream opened this issue Apr 3, 2022 · 14 comments
Closed

Support for llvm-14.x #14

sr-tream opened this issue Apr 3, 2022 · 14 comments

Comments

@sr-tream
Copy link

sr-tream commented Apr 3, 2022

Patch for recent commit fd98b0f1a6a1

How to install

git clone -b release/14.x https://github.com/llvm/llvm-project.git
cd llvm-project
git checkout fd98b0f1a6a1
wget https://github.com/heroims/obfuscator/files/8426512/ollvm-14.patch.txt
git apply ollvm-14.patch.txt

Done! Now you have sources llvm-14.0.1 with obfuscation support. Next, you can follow instruction from Wiki to build it.

P.S. Integrate with android-ndk

@sr-tream
Copy link
Author

sr-tream commented Apr 3, 2022

P.S. To disable new pass manager add cmake flag -DLLVM_ENABLE_NEW_PASS_MANAGER=OFF

@sr-tream
Copy link
Author

sr-tream commented Apr 3, 2022

Also with support new pass manager

ollvm-14.patch.txt

NOTE: When llvm builded with new pass manager by default, then flags doesn't work with -flegacy-pass-manager, but you can use function annotation.

@sr-tream sr-tream mentioned this issue Apr 4, 2022
@ghost
Copy link

ghost commented Apr 5, 2022

Does it work on Android NDK 24 that just got released?

@sr-tream
Copy link
Author

sr-tream commented Apr 6, 2022

@VanHoevenTR yes, it work. but this patches may contain bugs - use fork from my PR #15 (bugs is fixed in PR)

@sr-tream
Copy link
Author

sr-tream commented Apr 6, 2022

Patch witch fixed bugs and improve performance ( like in PR #15 ) - ollvm-14.patch.txt

@HarukaMomono
Copy link

I don't know why string obfuscation doesn't work use "-mllvm sobf"

@sr-tream
Copy link
Author

sr-tream commented Apr 6, 2022

@HarukaMomono string obfuscator is disabled for new pass manager, because it crash compiler. You can use any constexpr string obfuscator since C++11

@heroims
Copy link
Owner

heroims commented Apr 8, 2022

0001-support-llvm14-StringObfuscation.patch.txt

@heroims heroims closed this as completed Apr 8, 2022
@HarukaMomono
Copy link

It can work normally~~

sr-tream added a commit to sr-tream/obfuscator that referenced this issue Apr 9, 2022
@sr-tream
Copy link
Author

sr-tream commented Apr 9, 2022

@ghost
Copy link

ghost commented May 11, 2022

@VanHoevenTR yes, it work. but this patches may contain bugs - use fork from my PR #15 (bugs is fixed in PR)

sorry for late reply, you tried this way to install NDK right? just making sure because last time i tried i got libunwind error.

@sr-tream
Copy link
Author

@ghost
Copy link

ghost commented May 11, 2022

Thanks

@Dfault0
Copy link

Dfault0 commented Oct 24, 2023

@HarukaMomono ,hello is the "-mllvm sobf" work in yur machine? how did you get it, i apply https://github.com/heroims/obfuscator/files/8455883/ollvm-14.patch.txt on llvm 14.x but the "-mllvm sobf" was not work. What can I do to solve this problem? thans for your reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants