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(a)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.