OTCC is a compact C compiler that employs obfuscation techniques.
My focus on this project was to keep the code size as minimal as possible. As a result, I extended the C subset bit by bit, and I only stopped when I had reached the maximum size approved by the IOCCC: 2048 bytes of C source, including the ';' , '{', '}' and space characters. Also, I opted to generate i386 code, which was highly reliable, and ran on only i386 Linux operating systems at the time.
At the core of OTCC is its ability to generate the program in memory and launch it directly, while also using dlsym(), to address external symbols. However, in order to make OTCC more portable, I developed a variant called OTCCELF. This version generates highly dynamic i386 ELF executables directly from the C source code, without relying on binutils tools. OTCCELF has been tested and works seamlessly on i386 Linux as well as Sparc Solaris.
It's important to note that OTCC served as a foundation for my other project, TinyCC, which is a fully-featured, ISOC99 C compiler that I developed from the source code of OTCC.
To compile OTCC and OTCCELF, you can use the commands “gcc -O2 otcc.c -o otcc -dl”, or “gcc -O2 otccelf.c -o otccelf”. To perform a self-compilation, you can use the command “./otccelf otccelf.c otccelf1”.