From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from minnie.tuhs.org (minnie.tuhs.org [45.79.103.53]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 69d61a60 for ; Mon, 13 Jan 2020 20:47:34 +0000 (UTC) Received: by minnie.tuhs.org (Postfix, from userid 112) id 9298F9BD75; Tue, 14 Jan 2020 06:47:32 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 7D6DD9B841; Tue, 14 Jan 2020 06:47:07 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=pass (1024-bit key; unprotected) header.d=servium.ch header.i=@servium.ch header.b="Xosdq/26"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 81B359B841; Tue, 14 Jan 2020 06:47:05 +1000 (AEST) Received: from mail-vk1-f172.google.com (mail-vk1-f172.google.com [209.85.221.172]) by minnie.tuhs.org (Postfix) with ESMTPS id 768EA9B804 for ; Tue, 14 Jan 2020 06:47:04 +1000 (AEST) Received: by mail-vk1-f172.google.com with SMTP id w67so2981718vkf.1 for ; Mon, 13 Jan 2020 12:47:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=servium.ch; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aZI+E0JNTIrUR1OmV1Yd3pn4G0pbW7hkKGaCKebsZ9U=; b=Xosdq/26OD6QQaPHd09/eiU61SzU7bbgB8hAQy4Zmar+KHcyB8pJDDaTzyi8koH9VY xU6YzRS7nnh8CytYU/fv7evsuSXQdsEsVY9SVw/+c4/gRpwpc0Y+s/McdgWV8Y8F6gS1 5iaLl/6g3rSnydx9jGAE9q7H6hZ/WmM2XeRrM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aZI+E0JNTIrUR1OmV1Yd3pn4G0pbW7hkKGaCKebsZ9U=; b=YfkA+QsXQVtX35LBR++ctdP1mmNuIKzQpfQt9n9uM8PRJnEv+AevmXPttv3/hrV/3Z +LAnyd0ZkhKWaKDYA4LS7ntU90r/UH6IbpnhqSa/UmGVUA/ka2rOVeIgp9nVGZZeMKug sX6cddhOSCJOQuLgj1WeTOrYbolXDtTk5fL3WWgddmicF6YeaFNs+SclCRs7LwsCdDW6 DomxpJSKoIFHwFFGksbPN0MTtYZU0oCI5TJaJ0dMXt0GimJCYFD0oBmvmTxIufY3f2uO tZzpVDKTNigQJQbs5sEV+8iuZE2CrLYlCP3geLLWETyK/DSk4QZjkWh9rgepZuhFnnVv Gyxw== X-Gm-Message-State: APjAAAXkAysqIVny1m9MjbOce3/aepHxD+U2jNmxHatCQQBw33GccNtG uJ7BoyhgWAFeI/7fRbSWSl5OYJDXM7WADCM2mZFK/6vj X-Google-Smtp-Source: APXvYqz5ADjDebu/6Wz5t3fgiddAXtvuxeg4PUTumeIW6Q0DeWvHCn6/d/v5yExcgAO5a5lOiqH7JJFle/yBA6ZXAuA= X-Received: by 2002:a1f:2197:: with SMTP id h145mr8771084vkh.75.1578948423441; Mon, 13 Jan 2020 12:47:03 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Rico Pajarola Date: Mon, 13 Jan 2020 12:46:52 -0800 Message-ID: To: Paul Winalski Content-Type: multipart/alternative; boundary="000000000000e5f992059c0b9353" Subject: Re: [TUHS] History of symbol preemption X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: The Eunuchs Hysterical Society Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" --000000000000e5f992059c0b9353 Content-Type: text/plain; charset="UTF-8" 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 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. > --000000000000e5f992059c0b9353 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
This seems to have originated with SunOS 4. I believe a go= od proxy for finding anything that inherited from or was inspired by this i= s a linker that recognizes LD_PRELOAD. I wonder if there are other independ= ent implementations in the Unix space.


On Mon, Jan 13, 2020= at 11:59 AM Paul Winalski <p= aul.winalski@gmail.com> wrote:
The Executable and Linkable Format (ELF) is the moder= n standard for
object files in Unix and Unix-like OSes (e.g., Linux), and even for
OpenVMS.=C2=A0 LInux, AIX and probably other implementations of ELF have a<= br> feature in the runtime loader called symbol preemption.=C2=A0 When loading<= br> a shared library, the runtime loader examines the library's symbol
table.=C2=A0 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.=C2=A0 The existing value thus preempts the definition in the library.

I'm curious about the history of symbol preemption.=C2=A0 It does not e= xist
in other implementations of shared libraries, such as IBM OS/370 and
its descendants, OpenVMS, and Microsoft Windows NT.=C2=A0 ELF apparently was designed in the mid-1990s.=C2=A0 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?=C2=A0 Are there versions of Unix that don't do sym= bol
preemption?

-Paul W.
--000000000000e5f992059c0b9353--