From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: tuhs-bounces@minnie.tuhs.org X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 Received: from minnie.tuhs.org (minnie.tuhs.org [45.79.103.53]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 1838004b for ; Wed, 22 Aug 2018 16:05:11 +0000 (UTC) Received: by minnie.tuhs.org (Postfix, from userid 112) id 719FDA1C91; Thu, 23 Aug 2018 02:05:10 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 53163A1A89; Thu, 23 Aug 2018 02:04:55 +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=hEmrCJp3; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 5DD55A1A97; Thu, 23 Aug 2018 02:04:52 +1000 (AEST) Received: from mail-qk0-f194.google.com (mail-qk0-f194.google.com [209.85.220.194]) by minnie.tuhs.org (Postfix) with ESMTPS id DAD7FA1A94 for ; Thu, 23 Aug 2018 02:04:51 +1000 (AEST) Received: by mail-qk0-f194.google.com with SMTP id z78-v6so1592044qka.0 for ; Wed, 22 Aug 2018 09:04:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9vHRM/ZUOTaU51bwMi3x/xa5IBBP2aLHbpVDZ+Ar8KY=; b=hEmrCJp32bNImagh5LSzJEm2Fflp3JmS8gJ2w0zmsRHpipRiLtpUvyb9nWKQvCno7+ EJB2nrkWIogvCFj9JSK3/rI6sKxyyW+CDpIgj5lvEY4VBDayl9AoVYTFeM/w2Y+pSqLA RXEZi9/Er1/JhqYSNdJKrtm9zU+0FTqJVQUuTlYAKJ4fD0Vlzj8JWWPCKMH3t+EpZYUK QP8FAuDMfVR4VkxHUusfxg1ISRkxry1OFpJgvvwfoNFuosnGyGLIbHj0gGUqGSwfiB4P Bj25DoDTYTP5A/CgD6gcBZs4oP67ReS3YX+r837iFFR63i0FbEzwQDp8PZ/AGHHBsgsl u9UQ== 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=9vHRM/ZUOTaU51bwMi3x/xa5IBBP2aLHbpVDZ+Ar8KY=; b=WEKzltX0bZ6DBTYWsLQfRC12xJCIf6ecWd7l2hBONqWXCqtepcnhfCmZn8l1I4XiE8 iRaaid/JADZP30XreloY1J8D0ZyzLa018zVaRMpSh1rvTKYFF/RdLcBliNWUOJ8K+f7A 6H/LszCyNwLbyUS25M2y9p6xBlKf6ccm85QO0ivFhaqfNjxEJxCQTHLB61cx4N42z1LL nUBIb0X7NqiRZcPof/V6irbgEgrB/WCUcQKntHOflkwGBPNWl12AvyTA7rm0NPuYRQ2q n3Zs9FB3+QSwju2vbB6zVyKqWquawM+dP88iZade/2tdTtvmXo/hi2YKkMWl3Xc0viAC MLDA== X-Gm-Message-State: AOUpUlGevRTyLEOmPVFt+5yEal8zirlyo/vDk+qlELUNvpM5jyUkDlrZ xiJLOzNEwbA9th0SeztewTNK/AxhGyZ2XQ7EMOQ= X-Google-Smtp-Source: AA+uWPzzrQZoqr3etIT5x/ICZeyRiFLaoAG9EvGI1Ft5tuNUPNKgn6wEnWj4vfLKBlc6WfMlZRNWRnyQ4LjDXinl2io= X-Received: by 2002:a37:1866:: with SMTP id j99-v6mr21476429qkh.344.1534953891077; Wed, 22 Aug 2018 09:04:51 -0700 (PDT) MIME-Version: 1.0 References: <88DDC574-96EA-4B3D-97A2-28157BF3B9D7@163.com> <20180821213743.4931661.91186.9539@texoma.net> <20180822094452.73ca043f@jabberwock.cb.piermont.com> In-Reply-To: <20180822094452.73ca043f@jabberwock.cb.piermont.com> From: Dan Cross Date: Wed, 22 Aug 2018 12:04:15 -0400 Message-ID: To: Perry Metzger Content-Type: multipart/alternative; boundary="0000000000006ca5190574084d00" Subject: Re: [TUHS] About Unix header files X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: TUHS main list Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" --0000000000006ca5190574084d00 Content-Type: text/plain; charset="UTF-8" On Wed, Aug 22, 2018 at 9:45 AM Perry E. Metzger wrote: > On Tue, 21 Aug 2018 16:37:43 -0500 Cornelius Keck > 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. --0000000000006ca5190574084d00 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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<= br> > 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 typ= e information in existing object file formats (e.g. ELF) by placing it in d= edicated sections. This is what Go does, for example. The Go linker does so= me type analysis for reflection, though if symbols line up it does not dete= ct or prevent e.g. signature mismatches.

=C2=A0 = =C2=A0 =C2=A0 =C2=A0 - Dan C.

--0000000000006ca5190574084d00--