The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Sean Dwyer via TUHS <tuhs@minnie.tuhs.org>
To: Warner Losh <imp@bsdimp.com>
Cc: TUHS main list <tuhs@minnie.tuhs.org>
Subject: Re: [TUHS] wump.c for v6
Date: Tue, 7 Jan 2020 15:04:47 -0500	[thread overview]
Message-ID: <20200107200447.GA3211@mail.ewe2.ninja> (raw)
In-Reply-To: <CANCZdfoEhGBzy13mGvw8jJNz0pvYVjBFy3-9BQ0mN8-4HB7bLw@mail.gmail.com>

On Mon, Jan 06, 2020 at 11:48:02AM -0700, Warner Losh wrote:
> On Mon, Jan 6, 2020 at 11:38 AM Will Senn <will.senn@gmail.com> 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.

  parent reply	other threads:[~2020-01-07 20:14 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-06  6:13 Will Senn
2020-01-06 15:20 ` Clem Cole
2020-01-06 15:24   ` Clem Cole
2020-01-06 16:25   ` Will Senn
2020-01-06 16:35     ` Clem Cole
2020-01-06 18:29       ` Warner Losh
2020-01-06 18:38         ` Will Senn
2020-01-06 18:48           ` Warner Losh
2020-01-06 21:08             ` Clem Cole
2020-01-06 21:38               ` Clem Cole
2020-01-06 22:14                 ` Warner Losh
2020-01-06 23:46                 ` Will Senn
2020-01-07 20:04             ` Sean Dwyer via TUHS [this message]
2020-01-07 21:08               ` Clem Cole
2020-01-08  6:35                 ` Sean Dwyer via TUHS
2020-01-06 19:10           ` Bakul Shah
2020-01-06 20:29             ` Will Senn
2020-01-07  0:40 Noel Chiappa
2020-01-07  0:44 ` Warner Losh
2020-01-07  1:58 Noel Chiappa
2020-01-10 14:27 Noel Chiappa

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=20200107200447.GA3211@mail.ewe2.ninja \
    --to=tuhs@minnie.tuhs.org \
    --cc=ewe2@ewe2.ninja \
    --cc=imp@bsdimp.com \
    /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).