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-O2ugen- 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-O3upasfrontend for Pascal, possibly of interest since much of IDO is Pascal
Of these,
cc,cfe,as0are written in C,cfealso contains Yacc components.uopt,ugen,as1,uld,umerge,upas, are written in Pascal.ldis 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.txtmake setup
make disasm
makeDiff: ./diff.py -mwob --objfile build/src/7.1/cc/cc.o main
lib/indy/dev/usr/lib/crt{1,n}.oare fromIRISDevelopmentOption7.1.1forIRIX6.4_02-97_812-0625-002.iso