Matching decompilation of the IRIX Development Option compiler.
The intention is to eventually match all the programs required to build C files to an unlinked binary, namely
cc
- compiler driver, runs everything else as appropriatecfe
- "C frontend", preprocessor and runs the optimisation and code generation stepsuopt
- optimiser used by-O2
ugen
- code generator used for lower optimisationas1
- assembler for compiler-generated assembly
since this process is the most useful for other decompilation projects.
Lower priority but also of interest:
as0
- assembler for handwritten assemblyld
(linker) for outputting linked object filesuld
(ucode linker) andumerge
(procedure merger) for-O3
upas
frontend for Pascal, possibly of interest since much of IDO is Pascal
Of these,
cc
,cfe
,as0
are written in C,cfe
also contains Yacc components.uopt
,ugen
,as1
,uld
,umerge
,upas
, are written in Pascal.ld
is unknown at present
The following table specify if each binary has been matched or not, and if it has their functions matching or the whole binary/elf.
Program | 5.3 functions | 5.3 elf | 7.1 functions | 7.1 elf |
---|---|---|---|---|
cc |
❌ | ❌ | ✔️ | ❌ |
cfe |
❌ | ❌ | ❌ | ❌ |
uopt |
❌ | ❌ | ❌ | ❌ |
ugen |
❌ | ❌ | ❌ | ❌ |
as1 |
❌ | ❌ | ❌ | ❌ |
as0 |
✔️ | ❌ | ❌ | ❌ |
ld |
❌ | ❌ | ❌ | ❌ |
uld |
❌ | ❌ | ❌ | ❌ |
umerge |
❌ | ❌ | ❌ | ❌ |
upas |
❌ | ❌ | ❌ | ❌ |
ujoin |
❌ | ❌ | ❌ | ❌ |
usplit |
❌ | ❌ | ❌ | ❌ |
TODO
python3 -m pip install -U -r requirements.txt
make setup
make disasm
make
Diff: ./diff.py -mwob --objfile build/src/7.1/cc/cc.o main
lib/indy/dev/usr/lib/crt{1,n}.o
are fromIRISDevelopmentOption7.1.1forIRIX6.4_02-97_812-0625-002.iso