The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Paul Winalski <paul.winalski@gmail.com>
To: Clem Cole <clemc@ccc.com>
Cc: The Eunuchs Hysterical Society <tuhs@tuhs.org>,
	Rico Pajarola <rp@servium.ch>
Subject: Re: [TUHS] History of symbol preemption
Date: Mon, 13 Jan 2020 16:42:24 -0500	[thread overview]
Message-ID: <CABH=_VSie4JQkr4Bs0GDbeByBkcP1qALBwOcQFH7q_5rtWhbqA@mail.gmail.com> (raw)
In-Reply-To: <CAC20D2PsgKMtANSSQ2be4of8VDKCZZ5j7jmQYeGa6N5U532mfA@mail.gmail.com>

On 1/13/20, Clem Cole <clemc@ccc.com> 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.

  parent reply	other threads:[~2020-01-13 21:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-13 19:58 Paul Winalski
2020-01-13 20:46 ` Rico Pajarola
2020-01-13 21:04   ` Clem Cole
2020-01-13 21:40     ` Rico Pajarola
2020-01-13 21:44       ` Paul Winalski
2020-01-13 21:45         ` Rico Pajarola
2020-01-13 22:20           ` Larry McVoy
2020-01-13 21:42     ` Paul Winalski [this message]
2020-01-13 22:53       ` Henry Bent
2020-01-14  0:31         ` Clem Cole
2020-01-14  2:53 ` Rob Gingell
2020-01-14 19:21 ` [TUHS] two AIX items [was " Charles H Sauer
2020-01-14 20:31   ` Clem Cole
2020-01-14 23:22   ` Kevin Bowling
2020-01-15 16:41   ` Paul Winalski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABH=_VSie4JQkr4Bs0GDbeByBkcP1qALBwOcQFH7q_5rtWhbqA@mail.gmail.com' \
    --to=paul.winalski@gmail.com \
    --cc=clemc@ccc.com \
    --cc=rp@servium.ch \
    --cc=tuhs@tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).