nm -D /path/to/libxxx.so
在 android ndk 提供的標準庫中, android-16 中的stdlib.h 中的abs(..) 方法是 inline 的, 而在 android-23 中的stdlib.h 的 abs(..) 不是inline 的, 因此在不一樣編譯條件下產生的so 文件中的方法列表是不同的;android
在 android-23 條件下編譯的so 拿到 android-16 的系統去用會發生crash ,由於android-16 下的libc.so 中不存在 abs(..) 方法。rest
compileSdkVersion = 16
的條件下編譯的so:U AAssetManager_fromJava U AAssetManager_open 0000d014 D ALGORITHM_RSA 0000b068 R DECRYPT_MODE 00002d7c T JNI_OnLoad 00002e9c T JNI_OnUnload 000029a0 T Java_com_thestore_core_security_NativeBridge_base64Decode 0000b06c R MAX_DECRYPT_BLOCK 0000705c T MD5_File 00008c70 T _Unwind_Backtrace 00008188 T _Unwind_Complete 0000818c T _Unwind_DeleteException 00008c4c T _Unwind_ForcedUnwind 0000802c T _Unwind_GetCFA 00009114 T _Unwind_GetDataRelBase 000090f8 T _Unwind_GetLanguageSpecificData 000090e8 T _Unwind_GetRegionStart 0000911c T _Unwind_GetTextRelBase 00008be0 T _Unwind_RaiseException 00008c04 T _Unwind_Resume 00008c28 T _Unwind_Resume_or_Rethrow 000081a4 T _Unwind_VRS_Get 00008780 T _Unwind_VRS_Pop 00008228 T _Unwind_VRS_Set 00008c70 T ___Unwind_Backtrace 00008c4c T ___Unwind_ForcedUnwind 00008be0 T ___Unwind_RaiseException 00008c04 T ___Unwind_Resume 00008c28 T ___Unwind_Resume_or_Rethrow U __aeabi_memclr U __aeabi_memclr4 U __aeabi_memcpy 00008768 T __aeabi_unwind_cpp_pr0 00008770 W __aeabi_unwind_cpp_pr1 00008778 W __aeabi_unwind_cpp_pr2 U __android_log_print 0000d05c A __bss_start U __cxa_atexit 00000000 w __cxa_begin_cleanup 00000000 w __cxa_call_unexpected U __cxa_finalize 00000000 w __cxa_type_match 000082b0 T __gnu_Unwind_Backtrace 00000000 w __gnu_Unwind_Find_exidx 000080d8 T __gnu_Unwind_ForcedUnwind 00008034 T __gnu_Unwind_RaiseException 00008b00 T __gnu_Unwind_Restore_VFP 00008b10 T __gnu_Unwind_Restore_VFP_D 00008b20 T __gnu_Unwind_Restore_VFP_D_16_to_31 00008bb8 T __gnu_Unwind_Restore_WMMXC 00008b30 T __gnu_Unwind_Restore_WMMXD 000080f4 T __gnu_Unwind_Resume 00008168 T __gnu_Unwind_Resume_or_Rethrow 00008b08 T __gnu_Unwind_Save_VFP 00008b18 T __gnu_Unwind_Save_VFP_D 00008b28 T __gnu_Unwind_Save_VFP_D_16_to_31 00008bcc T __gnu_Unwind_Save_WMMXC 00008b74 T __gnu_Unwind_Save_WMMXD 00008d20 T __gnu_unwind_execute 000090a8 T __gnu_unwind_frame 00008aec T __restore_core_regs U __stack_chk_fail U __stack_chk_guard 0000d05c A _edata 0000d094 A _end U abort 00007828 T base64_decode ...
compileSdkVersion = 23
的條件下編譯的so:U AAssetManager_fromJava U AAssetManager_open 0000d014 D ALGORITHM_RSA 0000b04c R DECRYPT_MODE 00002dac T JNI_OnLoad 00002ecc T JNI_OnUnload 000029d0 T Java_com_thestore_core_security_NativeBridge_base64Decode 0000b050 R MAX_DECRYPT_BLOCK 00007048 T MD5_File 00008c5c T _Unwind_Backtrace 00008174 T _Unwind_Complete 00008178 T _Unwind_DeleteException 00008c38 T _Unwind_ForcedUnwind 00008018 T _Unwind_GetCFA 00009100 T _Unwind_GetDataRelBase 000090e4 T _Unwind_GetLanguageSpecificData 000090d4 T _Unwind_GetRegionStart 00009108 T _Unwind_GetTextRelBase 00008bcc T _Unwind_RaiseException 00008bf0 T _Unwind_Resume 00008c14 T _Unwind_Resume_or_Rethrow 00008190 T _Unwind_VRS_Get 0000876c T _Unwind_VRS_Pop 00008214 T _Unwind_VRS_Set 00008c5c T ___Unwind_Backtrace 00008c38 T ___Unwind_ForcedUnwind 00008bcc T ___Unwind_RaiseException 00008bf0 T ___Unwind_Resume 00008c14 T ___Unwind_Resume_or_Rethrow U __aeabi_memclr U __aeabi_memclr4 U __aeabi_memcpy 00008754 T __aeabi_unwind_cpp_pr0 0000875c W __aeabi_unwind_cpp_pr1 00008764 W __aeabi_unwind_cpp_pr2 U __android_log_print 0000d05c A __bss_start U __cxa_atexit 00000000 w __cxa_begin_cleanup 00000000 w __cxa_call_unexpected U __cxa_finalize 00000000 w __cxa_type_match 0000829c T __gnu_Unwind_Backtrace 00000000 w __gnu_Unwind_Find_exidx 000080c4 T __gnu_Unwind_ForcedUnwind 00008020 T __gnu_Unwind_RaiseException 00008aec T __gnu_Unwind_Restore_VFP 00008afc T __gnu_Unwind_Restore_VFP_D 00008b0c T __gnu_Unwind_Restore_VFP_D_16_to_31 00008ba4 T __gnu_Unwind_Restore_WMMXC 00008b1c T __gnu_Unwind_Restore_WMMXD 000080e0 T __gnu_Unwind_Resume 00008154 T __gnu_Unwind_Resume_or_Rethrow 00008af4 T __gnu_Unwind_Save_VFP 00008b04 T __gnu_Unwind_Save_VFP_D 00008b14 T __gnu_Unwind_Save_VFP_D_16_to_31 00008bb8 T __gnu_Unwind_Save_WMMXC 00008b60 T __gnu_Unwind_Save_WMMXD 00008d0c T __gnu_unwind_execute 00009094 T __gnu_unwind_frame 00008ad8 T __restore_core_regs U __stack_chk_fail U __stack_chk_guard 0000d05c A _edata 0000d094 A _end U abort U abs 00007814 T base64_decode ...