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 6722cf0d for ; Mon, 13 Jan 2020 21:41:38 +0000 (UTC) Received: by minnie.tuhs.org (Postfix, from userid 112) id 06ACD9BD48; Tue, 14 Jan 2020 07:41:37 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 8B1439B841; Tue, 14 Jan 2020 07:40:51 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=servium.ch header.i=@servium.ch header.b="sdv/5GsR"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 17BDE9B841; Tue, 14 Jan 2020 07:40:48 +1000 (AEST) Received: from mail-ua1-f49.google.com (mail-ua1-f49.google.com [209.85.222.49]) by minnie.tuhs.org (Postfix) with ESMTPS id 6A3669B804 for ; Tue, 14 Jan 2020 07:40:47 +1000 (AEST) Received: by mail-ua1-f49.google.com with SMTP id f7so3964088uaa.8 for ; Mon, 13 Jan 2020 13:40:47 -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=jEgXJ8vnr1+NkXMjOHVvXbt8yNx3UWz+Mqv8tBRowfU=; b=sdv/5GsRvARATPoZqUqz4RmWWzWICjDIcdxIUT0m+5qUmsWF3pyf43+owYbIIUxd/9 nSr6dB569AyHf7xzpwVLBgKchmQR4EryfDoVYktIx9hSs5xk7Gemy4s+zhQkbr5MyWxN BuTaxNTBPZST9h8CnPHwu+ax641wNXtBxr16M= 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=jEgXJ8vnr1+NkXMjOHVvXbt8yNx3UWz+Mqv8tBRowfU=; b=WXUjEzLUnmG954nUDS2vXqRmGokC16iJERWlTnep7kKb3JjCrf6Ty4DJWi/cr+ok7o 8aMHi9wdL+w1NhkWepC6O5IrnLy3/JyIgMvXW36v4AENlTyzLP59jxE2inrAOW7+/Ew/ QKW5QRzoHXhqhC9V0k3Zi432IkIKtXVUoiIcvv9K+LkS8X3iSVyO8Qe3Fko+O0ArUtrw dSoPW9ccsZ+vXy3ij3M2thZdMi7fmYBxqc6eYobBuDAY5VSfZIZh8dMMbxMxpHbxg1Ty grf3bvy6NOEHbhsOo+muoISEaxm0BRjlOmao1J5HRUWlZMKuFXBkkaVY7716+442Dvhp hDpw== X-Gm-Message-State: APjAAAXS4Dcv+F768cm1ZEkg9JWOEiPv/EhJ4PxuNsOAhmBQOxGCCqwW 7+Wfdmu4Jbau1GPh1zFD2BqBSQ36H2zZb3P3P3+T1A== X-Google-Smtp-Source: APXvYqx+RYWXdytdySYB+VzsXAmowQefza4Zx1rMqxgLTjElL+hIx4aor5PE9dCtVfv60fNmnEmX0nlOZVU1/cl7Oy8= X-Received: by 2002:ab0:48cf:: with SMTP id y15mr11691639uac.26.1578951646418; Mon, 13 Jan 2020 13:40:46 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Rico Pajarola Date: Mon, 13 Jan 2020 13:40:35 -0800 Message-ID: To: Clem Cole Content-Type: multipart/alternative; boundary="00000000000000ad8d059c0c544f" 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" --00000000000000ad8d059c0c544f Content-Type: text/plain; charset="UTF-8" On Mon, Jan 13, 2020 at 1:04 PM Clem Cole wrote: > @ Rico I'm failing sure ELF came from AT&T Summit, not Sun. > yes, but unless my memory is playing tricks, SunOS a.out had this feature. > @ 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. >>> >> --00000000000000ad8d059c0c544f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Jan 13, 2020 at 1:04 PM Clem = Cole <clemc@ccc.com> wrote:
<= /div>
@ Rico I'm failing s= ure ELF came from AT&T Summit, not Sun.=C2=A0
<= div>yes, but unless my memory is playing tricks, SunOS a.out had this featu= re.
=C2=A0
@ S= teve Johnson were you the manager when was created or were=C2=A0you folks s= till using COFF?

Anyway... = There were issues with COFF WRT being architecture-independent=C2=A0and sup= porting=C2=A0dynamic loading well.=C2=A0 Steve Rago would also be a good pe= rson to ask if you want some of the details.=C2=A0 At one point there was a= COFF2 document, but it may have been System Vx licenses only.=C2=A0 =C2=A0= Also, one of the issues was that AT&T had officially=C2=A0tied up COFF = as a proprietary format -- all part of the 'consider it standard' t= rying 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 becom= e 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 E= LF documents (I was on the UI technical board at that point).=C2=A0 I'm= not sure how/why OSF decided to back off, maybe because after ELF became p= ublic it got supported by GCC.

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

On Mon, Jan 13, 2= 020 at 3:47 PM Rico Pajarola <rp@servium.ch> wrote:
This seems to have originated with S= unOS 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 th= ere are other independent implementations in the Unix space.

=

= On Mon, Jan 13, 2020 at 11:59 AM Paul Winalski <paul.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.
--00000000000000ad8d059c0c544f--