jmpews / Dobby

a lightweight, multi-platform, multi-architecture hook framework.
Apache License 2.0
4k stars 833 forks source link

Can't build on android ndk r22 #124

Closed 0xRF closed 3 years ago

0xRF commented 3 years ago

Dobby version latest master (Version: Dobby-20210102-cf50347) ANDROID NDK: android-ndk-r22-darwin-x86_64 Compiler: Clang

.../bin/_deps/dobby-src/source/UserMode/ExecMemory/clear-cache-tool-all.cc:47:20: error: write to reserved register 'R7' __asm __volatile("svc 0x0" : "=r"(start_reg) : "r"(syscall_nr), "r"(start_reg), "r"(end_reg), "r"(flags)); ^ 1 error generated. I've managed to compile my project with ndk r19, but not with r22. As this change https://reviews.llvm.org/D76848 seems to break functionality

yujincheng08 commented 3 years ago

Read carefully about what efriedma says in the link you posted. He says

if you use -fomit-frame-pointer, it should compile successfully

jmpews commented 3 years ago

fixed