From afd625894142da44b4fd9acd04cb96b616c08efc Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Mon, 12 Jul 2010 18:56:11 -0700 Subject: [PATCH] Shared library wording updates Update the wording of the proposed patch based on suggestions from Raphael Hertzog and Steve Langasek. Remove the footnote discussing shared libraries without versioning information, since they're not Policy-compliant in other ways and are all weird special cases. Rephrase the footnote about shared library file naming conventions. Add a reference to the deb-symbols man page. --- policy.sgml | 62 +++++++++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 33 deletions(-) diff --git a/policy.sgml b/policy.sgml index 15b34a9..415aff9 100644 --- a/policy.sgml +++ b/policy.sgml @@ -5116,44 +5116,39 @@ Replaces: mail-transport-agent

- A shared library must be uniquely identified by an SONAME - attribute stored in its dynamic section. When a binary is linked - against a shared library, the SONAME of the shared - library is recorded in the binary's NEEDED section so - that the dynamic linker knows that library must be loaded at - runtime. The full name of the shared library (which usually - contains additional version information not needed in - the SONAME) is therefore not referenced directly. - Instead, the shared library is loaded by its SONAME, - which exists on the file system as a symlink pointing to the full - name of the shared library. - Some unusual libraries have an SONAME which matches the - full library name, but normally there is a minor revision that - changes even though the ABI has not changed in a - backward-incompatible way. The SONAME only changes - when binaries linked with the earlier version of the shared - library may no longer work. See - for more information. - - This symlink is updated and its location cached - by ldconfig, but must also be created by the + A shared library is identified by the SONAME attribute + stored in its dynamic section. When a binary is linked against a + shared library, the SONAME of the shared library is + recorded in the binary's NEEDED section so that the + dynamic linker knows that library must be loaded at runtime. The + shared library file's full name (which usually contains additional + version information not needed in the SONAME) is + therefore normally not referenced directly. Instead, the shared + library is loaded by its SONAME, which exists on the file + system as a symlink pointing to the full name of the shared + library. This symlink must be provided by the package. describes how to do this. + + This is a convention of shared library versioning, but not a + requirement. Some libraries use the SONAME as the full + library file name instead and therefore do not need a symlink. + Most, however, encode additional information about + backwards-compatible revisions as a minor version number in the + file name. The SONAME itself only changes when + binaries linked with the earlier version of the shared library + may no longer work, but the filename may change with each + release of the library. See for + more information. +

When linking a binary or another shared library against a shared library, the SONAME for that shared library is not yet - known. Instead, the shared library is found by library name - with .so appended. This file exists on the file system - as a symlink pointing to the shared library. - Some shared libraries have no version information in - their SONAME and therefore need no symlink since the - file found when linking is the same as the library name. This - is highly unusual, however, and means the shared library cannot - be versioned. It is used only for very special situations where - the shared library provides a tiny set of symbols and must not - be versioned for some reason. - + known. Instead, the shared library is found by looking for a file + matching the library name with .so appended. This file + exists on the file system as a symlink pointing to the shared + library.

@@ -5235,7 +5230,8 @@ Replaces: mail-transport-agent dependencies on the newer shared library by binaries that use the new interfaces is handled via the shilbs - system. + system or via symbols files (see + ).

-- 2.39.5