Categories:
如何使用库?
必看资料
- OpenSSL 安装指南 https://github.com/openssl/openssl/blob/OpenSSL_1_1_1-stable/NOTES.UNIX
- Advanced Programming in the UNIX Environment: Week 11, Segment 3 - Shared Libraries https://www.youtube.com/watch?v=eloJO0ssrfc
其中 OpenSSL 安装指南 是必须看的。里面说了 ELF 搜索动态库的顺序,以及 ELF 如何把路径写死。
动手试一试
有时间在补全….
Static Library
也叫 archive ,就是多个对象合并。
Shared Library
一般配合 -fPIC
参数使用 (可以了解一下 -fpic
和 -fPIC
的区别)
Search Path for Shared Library
其他可用资料
- Advanced Programming in the UNIX Environment: Week 11, Segment 3 - Shared Libraries https://www.youtube.com/watch?v=eloJO0ssrfc
- OpenSSL 安装指南 https://github.com/openssl/openssl/blob/OpenSSL_1_1_1-stable/NOTES.UNIX
- 《程序员的自我修养—链接、装载与库》
- 《The Linux Programming in Terface》
- Clang linking with a .so file https://stackoverflow.com/questions/25160245/clang-linking-with-a-so-file
- Create dynamic library from cpp files and static library with clang https://stackoverflow.com/questions/31988594/create-dynamic-library-from-cpp-files-and-static-library-with-clang
- Using C++ library in C code https://stackoverflow.com/questions/199418/using-c-library-in-c-code
- Static and Dynamic Libraries http://nickdesaulniers.github.io/blog/2016/11/20/static-and-dynamic-libraries/
- Shared Libraries: Understanding Dynamic Loading https://amir.rachum.com/blog/2016/09/17/shared-libraries/
- PIC GOT PLT OMG: how does the procedure linkage table work in linux? https://www.youtube.com/watch?v=Ss2e6JauS0Y
- In-depth: ELF - The Extensible & Linkable Format https://www.youtube.com/watch?v=nC1U1LJQL8o
- Deep Dive Into ELF Binaries - ELF Binary Structure for Pentesters/CyberSecurity https://www.youtube.com/watch?v=ddLB8A1ai_M