看板 DFBSD_submit 關於我們 聯絡資訊
On Tue, Dec 21, 2004 at 12:03:21PM -0800, walt wrote: > > > On Tue, 21 Dec 2004, Joerg Sonnenberger wrote: > > > > (a) There are no minor versions from the ELF point of view... > > We solve (a) by not using minor numbers... > > I remember clearly that you explained that to me once before. > There is (obviously) something I don't understand, however. > Where in the system is this policy actually implemented? > > I am guessing that the loader (ld-elf?) determines the policy > regarding the naming of libraries. Am I correct? There are two parts concerned here. Number one is the "normal" linker, which only support filenames and library names to be extended to filenames. The linker reads the SONAME of a shared library and wires that into the executable. Number two is the dynamic linker, which does a lookup of the SONAME of each dependency in the list of already loaded shared objects. If none is found, it does a lookup in the cache build by ldconfig. If that still doesn't lead to any hint, it starts to process the built-in directory list looking for a file named identical to the SONAME. Since this matching is done exactly, there's no notation of major or minor version itself in ELF. We use libNAME.so.MAJOR as SONAME, OpenBSD does it with libNAME.so.MAJOR.MINOR. The big difference is the number of times the version is changing. Joerg