![]() Solving versioned shared libraries dependencies at runtime directories listed inthe /etc/ld.so.conf file.default directories, normally /lib and /usr/lib.directories specified in DT_RUNPATH or DT_RPATH of a shared library are searched for shared libraries needed by it.directories specified by the environment variable LD_LIBRARY_PATH.directories specified by the environment variable LD_RUN_PATH.directories specified by -rpath options (more on that later).directories specified by -rpath-link options (more on that later).The linker uses the following search paths to locate required shared libraries: usr/lib/libfoobar.so -> libfoobar.so.1.5.3 Static librariesĪ static library is simply an archive of object files conventionally starting with the lib prefix and ending with the. ![]() I will only focus here on static and shared libraries. There are three kind of libraries in Linux: static, shared and dynamically loaded (DL).ĭynamically loaded libraries are very specific to some use cases like plugins, and would deserve an article on their own. Man pages for the linux linker and loader are also a good source of information. This paragraph is only a brief summary of what is very well described in The Linux Documentation Project library howto. There is also a small repository on github with the mentioned samples. This blog post is to summarize what I have now understood. Morin that not only did I use the wrong solution for that particular problem, but that my understanding of the gcc linking process was not as good as I had imagined. I only realized today in a discussion with my friend Yann E. Better understanding Linux secondary dependencies solving with examples by David CorvoysierĪ few months ago I stumbled upon a linking problem with secondary dependencies I couldn’t solved without overlinking the corresponding libraries.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |