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.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 039e9e49 for ; Tue, 7 Jan 2020 20:14:50 +0000 (UTC) Received: by minnie.tuhs.org (Postfix, from userid 112) id 4286C9BCC3; Wed, 8 Jan 2020 06:14:49 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id CD8DF9BCA8; Wed, 8 Jan 2020 06:14:31 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ewe2.ninja header.i=@ewe2.ninja header.b="AAAjuap6"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 212D29BCA8; Wed, 8 Jan 2020 06:14:30 +1000 (AEST) X-Greylist: delayed 578 seconds by postgrey-1.36 at minnie.tuhs.org; Wed, 08 Jan 2020 06:14:29 AEST Received: from mail.ewe2.ninja (ewe2.ninja [38.240.3.172]) by minnie.tuhs.org (Postfix) with ESMTPS id 64267945FC for ; Wed, 8 Jan 2020 06:14:29 +1000 (AEST) Received: by mail.ewe2.ninja (Postfix, from userid 1001) id EA8F640514; Tue, 7 Jan 2020 15:04:47 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ewe2.ninja; s=mail; t=1578427488; bh=IziPGHXl3hYRG5SuK38isH5YvXNNXff+KIGui06j3+8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AAAjuap68j2KpSbLUMDsPfA2ur97m6MWSt4qSm0QnaPzGYqi/uj48EnCWpjRDCpVB znAT11brQZ3OEOpPJJy6/Zzphq2SrAzB9wyvhpdF7ela1cpRUQF0bGMyoCvchSkIHl I4wC3rmr9mU4WYSMaYEYkhKt5D+ZYGDBg655zrU/dgYSIiifnARLS1rt8qiTWXLPra 2hjuaRqTlyD7QdQR04Ws/RTo36xcJZLSMURLt1vcFKMOcJkGlT5BwfBrwwq2hYEx91 HAdW+SrU5sailNjgPsuMBcb3vZAviYyzyWwZ1hywdAK8665tsR5e4rmj8CEyXkQXwG PHVutlob07Z/w== Date: Tue, 7 Jan 2020 15:04:47 -0500 To: Warner Losh Message-ID: <20200107200447.GA3211@mail.ewe2.ninja> References: <42cf63eb-d51e-d1ab-34ed-fbff94e18999@gmail.com> <682F5EA8-A1D2-4A5A-933F-C46B3631030E@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Homepage: https://ewe2.ninja X-Operating-System: Linux, kernel 5.2.0-3-amd64 User-Agent: Mutt/1.12.2 (2019-09-21) Subject: Re: [TUHS] wump.c for v6 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: , From: Sean Dwyer via TUHS Reply-To: Sean Dwyer Cc: TUHS main list Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" On Mon, Jan 06, 2020 at 11:48:02AM -0700, Warner Losh wrote: > On Mon, Jan 6, 2020 at 11:38 AM Will Senn wrote: > > > On 1/6/20 12:29 PM, Warner Losh wrote: > > > > The good news is that disassembly will tell you right away if it was > > written in C or not. > > > > > > OK. I give up. How? > > > > Generally, the C compiler generates code that's quite distinctive (at least > PCC does, not sure about Dennis' compiler). People writing free assembler > tend to do really weird things for function entry / return. > > And it will likely tell you if it's some weird wrapper around another > binary, though that wasn't too common at bell labs. > > Warner A while back I did some analysis (https://ewe2.ninja/computers/cno/) of another source-less v6 binary, cno. Fortunately, it hadn't been stripped but I still did some disasembly because of the interesting differences. v6 binaries have a different crt0 preamble and simpler subroutine setup, and I narrowed dowh the library code to an intermediate stage of iolib (which IIRC still exists in the UNSW archive on TUHS). There's a few cribs in that essay to help you figure out some basic things, pdp11 assembly isn't hard to decode. -- I love deadlines. I love the whooshing noise as they fly by.