[TUHS] Unix Reverse Engineering

Thalia Archibald via TUHS tuhs at tuhs.org
Mon May 12 17:00:16 AEST 2025


Hello everyone,

I'm working on building a decompiler from PDP-11 assembly to C to ease studying
old pre-C Unix sources. To start, I'm translating V5 `as` to period-idiomatic C
and have finished most of pass 1. Then I'll port it to Rust with a design better
suited to static analysis, while keeping exact fidelity to the original. I'll
do the same for `cc` and `ld`, after.

I stumbled upon Warren's disaout[0] today, which made me wonder:
What tools have people for reverse engineering Unix assembly sources or a.out
binaries? Things like disassemblers or decompilers.

I assume there's some versions of programs which are now only extant as
binaries? Are there enough such binaries that were written in C to warrant
writing a decompiler that understands the specific codegen of `cc` to improve
accuracy? For now, I'm focusing on decompiling hand-written assembly, but I'm
keeping this case in mind.

Thanks!
Thalia

[0]: https://github.com/DoctorWkt/unix-jun72/tree/master/tools/disaout




More information about the TUHS mailing list