Pages

Wednesday, May 2, 2018

Shared Libraries - Solaris 11.3

Although I've already posted about shared library naming and versioning conventions and have already given a first example I consider interesting, there's, of course, much more about this subject.

It seems that fortunately Solaris 11.3 Information Library on its section on Developing Applications For Use With Solaris 11 at the chapter on Solaris 11.3 Linkers and Libraries Guide provides a lot of knowledgeable information on the topics. From what I've seen, a must read for expanding the vision on yet more powerful options that may lead someone to the next level towards the elite.

For instance, shared libraries a,k,a. shared objects is just one form of output artifact from the link-edit phase. The others are: dynamic or static executable, position-independent executable and relocatable object. This terminology gets rather confusing because in the end everything turns out be be relocatable objects although with slightly different specifics.

In fact, the topic deals with very important information about the creation and loading of binary artifacts which will ultimately leads to runnable processes in the systems. In this interim two tools are paramount:
  • ld(1) - The link-editor
  • ld.so.1(1) - The run-time linker
The run-time linker could be roughly understood as combination of dynamic linker and loader (or loader interface), because it further combines (binds) the objects generated by the link-editor right before they are loaded as a runnable process in the system.

By the way, these artifacts are collectively called object files which in the current version of Solaris conforms to the so-called ELF format, where ELF means Executable and Linking Format.

Static executables are those that aren't executed under the supervision of the run-time linker. But since Solaris 10 they are not supported anymore and the detailed reasons have been described on the official links above. It's basically because static artifacts negatively affects system life-cycle and evolution.