Hi, thank you for creating this amazing ARM64 VMP tool!
I am trying to use VMPacker to protect a .so library (Android JNI) compiled using Android NDK (clang). However, I encountered translation aborts on several functions.
The Error:
[!] 失败: translation aborted: 28 unsupported instruction(s) in w_native_XXXXXX — cannot produce safe output
[!] 失败: translation aborted: 11 unsupported instruction(s) in JNI_OnLoad — cannot produce safe output
Context & Analysis:
After investigating the generated assembly, I found that the aborts are mainly caused by the following instruction types generated by Clang (-O2 optimization):
Jump Tables (Indirect Branching BR Xn): Generated by Clang when compiling switch-case statements. VMPacker currently seems to abort when encountering dynamic indirect branches.
Floating-Point / SIMD Instructions: Clang often performs auto-vectorization or uses FPU registers for memory movement (FADD, FMUL, LDP/STP with Q or D registers), which are currently unsupported by the VMP engine.
System/Kernel Instructions: Inline assembly such as SVC 0 (syscalls) and MRS (e.g., reading cntvct_el0 for anti-debugging) causes translation aborts in functions like JNI_OnLoad.
Hi, thank you for creating this amazing ARM64 VMP tool!
I am trying to use VMPacker to protect a
.solibrary (Android JNI) compiled using Android NDK (clang). However, I encountered translation aborts on several functions.The Error:
Context & Analysis:
After investigating the generated assembly, I found that the aborts are mainly caused by the following instruction types generated by Clang (-O2 optimization):
Jump Tables (Indirect Branching BR Xn): Generated by Clang when compiling switch-case statements. VMPacker currently seems to abort when encountering dynamic indirect branches.
Floating-Point / SIMD Instructions: Clang often performs auto-vectorization or uses FPU registers for memory movement (FADD, FMUL, LDP/STP with Q or D registers), which are currently unsupported by the VMP engine.
System/Kernel Instructions: Inline assembly such as SVC 0 (syscalls) and MRS (e.g., reading cntvct_el0 for anti-debugging) causes translation aborts in functions like JNI_OnLoad.