The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Dan Cross <crossd@gmail.com>
To: Perry Metzger <perry@piermont.com>
Cc: TUHS main list <tuhs@minnie.tuhs.org>
Subject: Re: [TUHS] About Unix header files
Date: Wed, 22 Aug 2018 12:04:15 -0400	[thread overview]
Message-ID: <CAEoi9W70cNU3pL7eAOMe89G0EV3HFwqnjhEZ0JEqfFH1Ji-U1g@mail.gmail.com> (raw)
In-Reply-To: <20180822094452.73ca043f@jabberwock.cb.piermont.com>

[-- Attachment #1: Type: text/plain, Size: 966 bytes --]

On Wed, Aug 22, 2018 at 9:45 AM Perry E. Metzger <perry@piermont.com> wrote:

> On Tue, 21 Aug 2018 16:37:43 -0500 Cornelius Keck <ckeck@texoma.net>
> wrote:
> > Early C-compilers didn't care much about prototypes. The default
> > return type of a function would be an int. It was up to the code's
> > author to pass the right (amount, order, type). The linker didn't
> > care about signatures as long as the symbol resolved.
>
> To my knowledge, object file formats still don't have information
> about type signatures, and linkers still don't care about types. This
> is actually a problem. It would probably prevent a lot of errors if
> those things changed.
>

One can embed type information in existing object file formats (e.g. ELF)
by placing it in dedicated sections. This is what Go does, for example. The
Go linker does some type analysis for reflection, though if symbols line up
it does not detect or prevent e.g. signature mismatches.

        - Dan C.

[-- Attachment #2: Type: text/html, Size: 1393 bytes --]

  parent reply	other threads:[~2018-08-22 16:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-21  4:55 Caipenghui
2018-08-21  6:00 ` Warren Toomey
2018-08-21 21:37 ` Cornelius Keck
2018-08-22  4:25   ` [TUHS] Cornelius Keck Caipenghui
2018-08-22 13:44   ` [TUHS] About Unix header files Perry E. Metzger
2018-08-22 15:29     ` Paul Winalski
2018-08-22 15:36       ` Caipenghui
2018-08-22 15:46       ` Perry E. Metzger
2018-08-22 15:52         ` G. Branden Robinson
2018-08-22 15:56         ` Paul Winalski
2018-08-22 16:04     ` Dan Cross [this message]
2018-08-23  2:23       ` George Michaelson
2018-08-22 22:00 Doug McIlroy
2018-08-22 23:05 ` Erik E. Fair

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=CAEoi9W70cNU3pL7eAOMe89G0EV3HFwqnjhEZ0JEqfFH1Ji-U1g@mail.gmail.com \
    --to=crossd@gmail.com \
    --cc=perry@piermont.com \
    --cc=tuhs@minnie.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).