[TUHS] History of symbol preemption

Rico Pajarola rp at servium.ch
Tue Jan 14 06:46:52 AEST 2020


This seems to have originated with SunOS 4. I believe a good proxy for
finding anything that inherited from or was inspired by this is a linker
that recognizes LD_PRELOAD. I wonder if there are other independent
implementations in the Unix space.


On Mon, Jan 13, 2020 at 11:59 AM Paul Winalski <paul.winalski at gmail.com>
wrote:

> The Executable and Linkable Format (ELF) is the modern standard for
> object files in Unix and Unix-like OSes (e.g., Linux), and even for
> OpenVMS.  LInux, AIX and probably other implementations of ELF have a
> feature in the runtime loader called symbol preemption.  When loading
> a shared library, the runtime loader examines the library's symbol
> table.  If there is a global symbol with default visibility, and a
> value for that symbol has already been loaded, all references to the
> symbol in the library being loaded are rebound to the existing
> definition.  The existing value thus preempts the definition in the
> library.
>
> I'm curious about the history of symbol preemption.  It does not exist
> in other implementations of shared libraries, such as IBM OS/370 and
> its descendants, OpenVMS, and Microsoft Windows NT.  ELF apparently
> was designed in the mid-1990s.  I have found a copy of the System V
> Application Binary Interface from April 2001 that describes symbol
> preemption in the section on the ELF symbol table.
>
> When was symbol preemption when loading shared objects first
> implemented in Unix?  Are there versions of Unix that don't do symbol
> preemption?
>
> -Paul W.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20200113/de4c1184/attachment.html>


More information about the TUHS mailing list