3 ms·
On top of that, libraries can be linked by their SONAME and not the file name. (This is rarely done however.)
by wpollock 2y ago
On top of that, libraries can be linked by their SONAME and not the file name. (This is rarely done however.)
- cylemons 2y agoI thought dynamic linking always uses the soname
- bregma 2y agoStatic linking uses the DT_SONAME of a linked library to create an entry in the DT_NEEDED table. The name in the DT_NEEDED table is used by the dynamic loader to search for a matching filename to load in. So in a very indirect sense the dynamic loader always uses the SONAME that was supplied at build time, but it also uses a search algorithm to find that filename at load time.
- account42 2y agoThe SONAME is the filename used for runtime linking. On the filesystem it may or may not be a symlink but that does not concernt the linker. It may not be (and usually isn't) the same filemame used when bulding the binary. This is because the SONAME is meant to specify a specific ABI version of the library.