13.13 LD Version Scripts

The lib-symbol-versions module can be used to add shared
library versioning support. Currently, only GNU LD and the Solaris
linker supports this.

Version scripts provides information that can be used by GNU/Linux
distribution packaging tools. For example, Debian has a tool
dpkg-shlibdeps that can determine the minimal required version
of each dependency (by looking at the symbol list) and stuff the
information into the Debian specific packaging files.

If you target platforms that do not support linker scripts (i.e., all
platforms that doesn’t use GNU LD) you may want to consider a more
portable but less powerful alternative: libtool
-export-symbols. It will hide internal symbols from your
library, but will not add ELF versioning symbols. Your usage would
then be something like: