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.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 1fa14d85 for ; Mon, 13 Jan 2020 21:05:12 +0000 (UTC) Received: by minnie.tuhs.org (Postfix, from userid 112) id F1D079B88E; Tue, 14 Jan 2020 07:05:10 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 031AF9BCAB; Tue, 14 Jan 2020 07:04:44 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ccc.com header.i=@ccc.com header.b="rUeSuEsD"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 66A549B841; Tue, 14 Jan 2020 07:04:42 +1000 (AEST) Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) by minnie.tuhs.org (Postfix) with ESMTPS id 9EB659B804 for ; Tue, 14 Jan 2020 07:04:41 +1000 (AEST) Received: by mail-qt1-f180.google.com with SMTP id n15so10433980qtp.5 for ; Mon, 13 Jan 2020 13:04:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ccc.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jKlyUbJYRNHLxN2GpcafOlzxvO+FZH+WqZYGcbGnIW0=; b=rUeSuEsD3SgFgTLv2wyDb6yKB9mUNMOovy71VI6X9Y3S/d2yWKnlbmDtLJNx/8gBeV 2lWUDrOMARCjp+HZZFWvUI1FGrS7a5vE6Ww1BD3L2WK9hPtPVMeiYosJZrRvaTS3uJ6g GIqrooKJDsQStyXSOftq0olsKVW+0u3IHpE1Y= 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=jKlyUbJYRNHLxN2GpcafOlzxvO+FZH+WqZYGcbGnIW0=; b=h/jF8GhVJtmf3MZPiDYgVl70jFfCsseK+TJ7yIu9dhueWzoRAzEf0bV7iOaIzuGgnb jLkNR0VRZE7CRBjfzEc5+jUZvm3yFCfYqxWYe3W0fXPtSrXRAIcR6+/nW7KV9R1mrKQ3 I9gW/gp3CL933ZguVVIBQ+wvB/igtoI6P7yCHcdor3IQefKkbkABQUulZYnqBMOyn2K1 R/MntTldLL2Y4/K5upPfzYeeoNvfg1b5rXCtCMkO614FJjYDnkONKSYWDBDlDe6aQv1h UG664vb94Td+Ua2y3VrP6RVZnMBJmLHn2n29C8uP6pi5uQB/Vk6pDID28bqx65eCTAUW vT3Q== X-Gm-Message-State: APjAAAUJKLuzXIPUrob5H2siVu9YO84cXwh3QKESFoeIwXEM3+bfBH0H SD/i/yw+M8Pe4Rj8zRfqZ6hH7FNnDdE5Xt3ZBzx2GQ== X-Google-Smtp-Source: APXvYqzOdXnKykLMmmT7sG0Hnmw1/rQX/BKBC3Eeb4zKebZIJhTv8cW1kkI3XXwsz0wK/NeITddLuNF1seMO4mqiL7U= X-Received: by 2002:aed:3eee:: with SMTP id o43mr526097qtf.33.1578949480713; Mon, 13 Jan 2020 13:04:40 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Clem Cole Date: Mon, 13 Jan 2020 16:04:14 -0500 Message-ID: To: Rico Pajarola Content-Type: multipart/alternative; boundary="000000000000ea9d73059c0bd244" 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" --000000000000ea9d73059c0bd244 Content-Type: text/plain; charset="UTF-8" @ Rico I'm failing sure ELF came from AT&T Summit, not Sun. @ Steve Johnson were you the manager when was created or were you folks still using COFF? Anyway... There were issues with COFF WRT being architecture-independent and supporting dynamic loading well. Steve Rago would also be a good person to ask if you want some of the details. At one point there was a COFF2 document, but it may have been System Vx licenses only. Also, one of the issues was that AT&T had officially tied up COFF as a proprietary format -- all part of the 'consider it standard' trying to force their lunch down all the other UNIX systems throat which was not having it. As a result, CMU's MachO was about to become the default format (OSF and Apple were already using it for that reason), and Unix International stepped in and convinced AT&T to released the ELF documents (I was on the UI technical board at that point). I'm not sure how/why OSF decided to back off, maybe because after ELF became public it got supported by GCC. Now my memory is a little hazy... I think OSF/1-386 used MachO originally, but I've forgotten. Switching the kernel to use ELF was one of the differences between OSF1 and Tru64 IIRC. On Mon, Jan 13, 2020 at 3:47 PM Rico Pajarola wrote: > 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. >> > --000000000000ea9d73059c0bd244 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
@ Rico I'm failing sure ELF came from AT&T Summ= it, not Sun.=C2=A0
@ Steve Johnson were you the manager when was cr= eated or were=C2=A0you folks still using COFF?

Anyway.= .. There were issues with COFF WRT being architecture-independent=C2=A0and = supporting=C2=A0dynamic loading well.=C2=A0 Steve Rago would also be a good= person to ask if you want some of the details.=C2=A0 At one point there wa= s a COFF2 document, but it may have been System Vx licenses only.=C2=A0 =C2= =A0Also, one of the issues was that AT&T had officially=C2=A0tied up CO= FF as a proprietary format -- all part of the 'consider it standard'= ; trying to force their lunch down all the other UNIX systems throat which = was not having it.=C2=A0 =C2=A0As a result, CMU's MachO was about to be= come the default format (OSF and Apple were already using it for that reaso= n), and Unix International stepped in and convinced AT&T to released th= e ELF documents (I was on the UI technical board at that point).=C2=A0 I= 9;m not sure how/why OSF decided to back off, maybe because after ELF becam= e public it got supported by GCC.

Now my memory is a= little hazy... I think OSF/1-386 used MachO originally, but I've forgo= tten.=C2=A0 =C2=A0Switching the kernel to use ELF was one of the difference= s between OSF1 and Tru64 IIRC.

On Mon, Jan 13, 2020 at 3:47 PM Rico Pa= jarola <rp@servium.ch> wrote:
T= his seems to have originated with SunOS 4. I believe a good proxy for findi= ng anything that inherited from or was inspired by this is a linker that re= cognizes LD_PRELOAD. I wonder if there are other independent implementation= s in the Unix space.


On Mon, Jan 13, 2020 at 11:59 AM Paul Wi= nalski <pau= l.winalski@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.=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.
--000000000000ea9d73059c0bd244--