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.3 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 98492073 for ; Mon, 13 Jan 2020 21:42:53 +0000 (UTC) Received: by minnie.tuhs.org (Postfix, from userid 112) id BE89A9BD3C; Tue, 14 Jan 2020 07:42:52 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 77DB99B880; Tue, 14 Jan 2020 07:42:40 +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="N8kpvAmR"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 5CA319B896; Tue, 14 Jan 2020 07:42:37 +1000 (AEST) Received: from mail-vs1-f68.google.com (mail-vs1-f68.google.com [209.85.217.68]) by minnie.tuhs.org (Postfix) with ESMTPS id AEED99BD47 for ; Tue, 14 Jan 2020 07:42:25 +1000 (AEST) Received: by mail-vs1-f68.google.com with SMTP id v12so6898669vsv.5 for ; Mon, 13 Jan 2020 13:42:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=dZvhVeXer+tBTpX7HzTuNHtp9CNBnJdacqEpTf38w1s=; b=N8kpvAmRrD62HpKZr6t2/PQEGCpcVzSNUv+I6qx/eyUYjcO7Suu4S3MWbU2cvG7Aj8 APmektSIdSH/FuJMUic8lyjqbCMYX+Ln9b0o0ipVGJVgadkr17Y833SSjFHUpnLUXzCj 32HF+wdw0oWv9ZvyBFSCy/q2QvoNDKDs6z30ma8kJvVqDFWb1NNuY3uCmuqzJT/8Vy5p Etd33izReuIJ15nIevpBcIuMAsPEo+gNHzgC1FmF5hXb+9UccngIWtf/8ea8vPJ6ja67 4ShEqCfbbuym4pJDJwZLVKjnAe+2iFyqZj6zVIoVaeOAOY5SWIv5g7M+ODI/nwXA7XCN VTKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=dZvhVeXer+tBTpX7HzTuNHtp9CNBnJdacqEpTf38w1s=; b=P6mqLGz7qkPBmi9RgKHYsYzu52Egr8bRZLXcCzejiMvg441eM1+fkhQt6NlnEVWTWQ HTm7/q3mjKH7kd2mn87JYu9e0RrncZPnhzUjHRGevuBbXnRLXJo+EigldvnGrC0scxQv SsDADPN6ZFgbAUqq8WJYujBxnzf6jiFVryPaJP1qb575e3S+sjiiuT8vW6Mrxw8eFFAj 0Fdzn5ZYOkds1rnIlrr3+WxDZ5B2WHYbhp11DKRBr+TNQOcXCQghbQlrAcGaWbIqSqak Z0lzHRWlV2T2SSFUC0kqAP9e8pNlzH0elm9yVZreGe58ByFywy0JxCWU7o7UFIMHO9gP vhuw== X-Gm-Message-State: APjAAAW4UBZRCNv/7jXBkLfM79gGPR1rdp72LmMBVtBR5ZfUmZoRepV4 hM1ZWNCwnNF3ksR5vDkDTWMPH5tsTp92C8+P1lA= X-Google-Smtp-Source: APXvYqyE/L0YyRNtZnLU1I6XF6rpbU104H2+LpvTScqJqw7qVF1uZgGzd7C1ZnFwdekSUk4J1ZrtuwsKC+xk5wgM1Wk= X-Received: by 2002:a05:6102:3102:: with SMTP id e2mr7432073vsh.179.1578951744897; Mon, 13 Jan 2020 13:42:24 -0800 (PST) MIME-Version: 1.0 Received: by 2002:ab0:3745:0:0:0:0:0 with HTTP; Mon, 13 Jan 2020 13:42:24 -0800 (PST) In-Reply-To: References: From: Paul Winalski Date: Mon, 13 Jan 2020 16:42:24 -0500 Message-ID: To: Clem Cole Content-Type: text/plain; charset="UTF-8" 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 , Rico Pajarola Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" On 1/13/20, Clem Cole wrote: > > 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. Mach-O was decidedly a step up from a.out in terms of flexibility and extensibility, but it is inferior to both COFF and ELF, IMO. Mach-O (at least the Apple OS X implementation) handles global symbols and relocations in a clumsy and baroque way. Of the three object/executable formats, ELF is by far the cleanest and most flexible, and that's possibly why OSF went to it once it became available. Microsoft went with COFF, sort-of, in Windows. But PECOFF (Portable and Extensible Common Object File Format) is different enough from vanilla COFF that when I implemented support for it in GEM I found to better to write an entire new module for PECOFF rather than put conditional code in the existing COFF-handling code. I think this was another of MS's "embrace and extend" gambits to keep control over their development environment. > 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. GEM never had to support Mach-O on any of its target platforms. DEC's Unix on MIPS used COFF. Tru64 used ELF exclusively. I don't know what Apple used for object files before OS X. IIRC NeXT was based on the CMU MACH microkernel and hence used Mach-O. OS X is FreeBSD-based, but it uses Mach-O. Tru64 has symbol preemption. The Tru64 C/C++ compiler by default turns off symbol preemption by using PROTECTED visibility for global symbols, but it does have a --preempt_symbol option. Using that option can have disastrous effects on optimization. Was symbol visibility (default/protected/internal) part of the original ELF spec from the 1990s, or was it added later? -Paul W.