ld
ldd 查看依赖
mgg@forever:~/Test/linking_order$ which ld
/usr/bin/ld
mgg@forever:~/Test/linking_order$ which ldd
/usr/bin/ldd
mgg@forever:~/Test/linking_order$ ldd /usr/bin/ls
linux-vdso.so.1 (0x0000ffff81275000)
libselinux.so.1 => /lib/aarch64-linux-gnu/libselinux.so.1 (0x0000ffff811da000)
libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000ffff81067000)
/lib/ld-linux-aarch64.so.1 (0x0000ffff81245000)
libpcre2-8.so.0 => /lib/aarch64-linux-gnu/libpcre2-8.so.0 (0x0000ffff80fd9000)
libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000ffff80fc5000)
libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000ffff80f94000)
mgg@forever:~/Test/linking_order$
~/An/CmakeTest/a/b/i/merged_n/d/o/l/arm64-v8a on main !2 ❯ readelf -p .bugly_version libbuglyversion.so
String dump of section '.bugly_version':
[ 0] 999.999.999
~/An/CmakeTest/a/b/i/merged_n/d/o/l/arm64-v8a on main !2 ❯ readelf -d libbuglyversion.so | grep 'NEEDED'
0x0000000000000001 (NEEDED) Shared library: [liblog.so]
0x0000000000000001 (NEEDED) Shared library: [libm.so]
0x0000000000000001 (NEEDED) Shared library: [libdl.so]
0x0000000000000001 (NEEDED) Shared library: [libc.so]
~/An/CmakeTest/a/b/i/merged_n/d/o/l/arm64-v8a on main !2 ❯
网友评论