bash
➜ bin pwd
/Users/xxx/Library/Android/sdk/ndk/21.1.6352462/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64/bin
➜ bin ./aarch64-linux-android-readelf -d /Download/libxxx.so
bash
0x0000000000000001 (NEEDED) Shared library: [liblog.so]
0x0000000000000001 (NEEDED) Shared library: [libm.so]
0x0000000000000001 (NEEDED) Shared library: [libc++_shared.so]
0x0000000000000001 (NEEDED) Shared library: [libdl.so]
0x0000000000000001 (NEEDED) Shared library: [libc.so]
- 静态链接。静态链接会将使用到的stl中代码,链接(拷贝)到so中;静态用.a为后缀
- 动态链接。在链接时,并不会将stl代码拷贝到so中,而是将使用到的STL符号,保存在so的动态链接符号表中,在运行时绑定并调用这些STL中的符号(位于STL的so中)。动态通常用.so为后缀
参考
https://www.jianshu.com/p/11f5c722dce8
https://segmentfault.com/a/1190000041563287
https://zhuanlan.zhihu.com/p/377651202
https://www.cnblogs.com/52php/p/5681711.html