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.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,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 8529c3c0 for ; Tue, 14 Jan 2020 02:54:11 +0000 (UTC) Received: by minnie.tuhs.org (Postfix, from userid 112) id ABA129B880; Tue, 14 Jan 2020 12:54:10 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id A6EEB9B843; Tue, 14 Jan 2020 12:53:43 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="DyOMaFCk"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 0B3FC9B843; Tue, 14 Jan 2020 12:53:40 +1000 (AEST) Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) by minnie.tuhs.org (Postfix) with ESMTPS id 7D1919B841 for ; Tue, 14 Jan 2020 12:53:36 +1000 (AEST) Received: by mail-pg1-f170.google.com with SMTP id s64so5667097pgb.9 for ; Mon, 13 Jan 2020 18:53:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:reply-to:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ODERVASzhw5p++3mGACFuPvENZ0/YI/QX8kaXdaW6y0=; b=DyOMaFCkQOT4tBLd/PQ3bKIqPkIAriv6qrk2RhksKLsRXgoxPFuOr8Iy3IYYluw38T vcY+V72FSCs/lgmEGnJCvTC+2gTequd01X1X66lqJz2a3NdeuHL1d5uo65QRNpuiAV9b zYor7NMr8rosgeS9O1eR43Fo7h73mUfLRHuD/63vBHI2U/QQSdKiCJC4nqj+S7/+ef54 foKRKZKw7qUM6/L8rYzLofn6qiHLOL+UQ3IeZ7Tac8S5FxIOmaC2kYIIu0/1Dy1homfv eYRqcLIsiPfh6fJ2VaOsZpBnvbbafqhGHqjeQ0YxhpX8ng7ptZMwNswLEU5xTt1skK1F Z3Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:reply-to:subject:to:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=ODERVASzhw5p++3mGACFuPvENZ0/YI/QX8kaXdaW6y0=; b=JmZqFWaxNkqdxkNiDbi+0tX2VqnOR/55sDUit+dYBdtmIgnDWSUk5GVryNdYpO4YLh MAQIctyZITL2PlcRCE+ywQwFHumOqQlfJy5bttbaAeMjljwWzgdrPwwRu0wq3mnyu5HU hs7jlH/aQ6ZL8gF5uEAUxwL+FnBWeFk2nwVq0hp9ymAAIWtJht9reTPXbqHJaTFssVUu reNPIRYBJKiI4SlJ8rYSctPdxWQK2x80TcyHWO8jQR+eknrd3GkDQHP0RSpzZ82Nhh/j tWF1OqbtBOFJV8R7SzAsjEwKuMfD2q+rCHPVBkG+r5QqbKrODv8EBzHGQwPWZXqGdwUs +CPQ== X-Gm-Message-State: APjAAAWci1L6IxIfk2NAhfzkNeMYmqIP4mnjto2/UNvYed9NVYghugC4 Ui1yvUEb5I4u/FVRY0/KMulRiTcT X-Google-Smtp-Source: APXvYqyxwZkmrEFpC+h75rVWZJI8copVm0gySWrEKI18X29hpr5+KWhGaBS3qt5ALTmS4JHBeBMERQ== X-Received: by 2002:a63:a357:: with SMTP id v23mr24551537pgn.223.1578970415224; Mon, 13 Jan 2020 18:53:35 -0800 (PST) Received: from ?IPv6:2603:3024:1580:4800:7ddd:182a:a8a4:a998? ([2603:3024:1580:4800:7ddd:182a:a8a4:a998]) by smtp.gmail.com with ESMTPSA id u20sm14696587pgf.29.2020.01.13.18.53.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Jan 2020 18:53:34 -0800 (PST) To: Paul Winalski , The Eunuchs Hysterical Society References: From: Rob Gingell Message-ID: <5e9784ef-155a-6982-50dc-73a863b13028@computer.org> Date: Mon, 13 Jan 2020 18:53:33 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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: , Reply-To: gingell@computer.org Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" On 1/13/2020 11:58 AM, Paul Winalski wrote: > When was symbol preemption when loading shared objects first > implemented in Unix? Are there versions of Unix that don't do symbol > preemption? The behavior described was in dynamic linking as introduced in SunOS 4.0. There had been a couple of earlier shared library implementations, notably System V Shared Libraries but I couldn't speak to whether any of them had the behavior. The reason the behavior is present is to (try to) preserve the behavior of an "ld" command line with respect to how the order of library specification impacted which definition of a given symbol was used to resolve references to it. With archive libraries the ordering could be used to effect interposition in sometimes obscure and questionable ways especially when archives were unordered. With shared objects, given that the whole object is always present, the usual intent of the ordering of libraries with respect to interposition is preserved by having the first definition be used to resolve all references. (And the reason "ld"'s behavior was relevant is that the idea was to make link editing an ongoing process as code assembled rather than a one time thing. So yes the run-time link-editor does it but that's because it's conceptually the functionality of the static link-editor continuing its work to knit together the still-assembling program.) The evolution of link editors in Solaris eventually resulted in the ability to effect more granular scoping and binding operations, including shared objects whose references to internal symbols could not be interposed upon and thus perhaps reflected the behavior of other systems mentioned in the original question. But the interposition / preemption behavior was the one which, at the time dynamic linking was introduced, best satisfied the "Principle of Least Surprise". On 1/13/2020 12:46 PM, Rico Pajarola wrote: > I believe a good proxy for > finding anything that inherited from or was inspired by this is a linker > that recognizes LD_PRELOAD. On 1/13/2020 2:20 PM, Larry McVoy wrote: > You could, and people did, make a shared lib that overloaded > the default gethostbyname(3) that wanted to do YP, the lib would provide > a DNS based one instead. Handling interposition in this way turned it into an explicit feature. Once multiple definitions for a symbol could exist in a program (or, definitions not yet referenced), devices to permit the navigation of the interposition like LD_PRELOAD, or the Name Service Switch, or Pluggable Authentication Modules became things that could be built around the functionality. On 1/13/2020 1:04 PM, Clem Cole wrote: > @ Rico I'm failing sure ELF came from AT&T Summit, not Sun. Yes, SunOS 4.0 rode the a.out object file format. ELF originated at Summit and as others have noted was a vast improvement.