Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Compilers

    Obfuscated Tiny C Compiler

    Download button

    No screenshots available
    Downloads: 1,343  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Fair (2.1/5)
    15 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Fabrice Bellard | More programs
    GPL / FREE
    March 29th, 2006, 21:44 GMT
    ROOT / Programming / Compilers

     Read user reviews (0)  Refer to a friend  Subscribe

    Obfuscated Tiny C Compiler description

    Obfuscated Tiny C Compiler (OTCC) is a very small C compiler.

    Obfuscated Tiny C Compiler (OTCC) is a very small C compiler I wrote in order to win the International Obfuscated C Code Contest (IOCCC) in 2002.

    My goal was to write the smallest C compiler which is able to compile itself. I choose a subset of C which was general enough to write a small C compiler. Then I extended the C subset until I reached the maximum size authorized by the contest: 2048 bytes of C source excluding the ';', '{', '}' and space characters.

    I choose to generate i386 code. The original OTCC code could only run on i386 Linux because it relied on endianness and unaligned access. It generated the program in memory and launched it directly. External symbols were resolved with dlsym().

    In order to have a portable version of OTCC, I made a variant called OTCCELF. It is only a little larger than OTCC, but it generates directly a dynamically linked i386 ELF executable from a C source without relying on any binutils tools! OTCCELF was tested succesfully on i386 Linux and on Sparc Solaris.

    NOTE: My other project TinyCC which is a fully featured ISOC99 C compiler was written by starting from the source code of OTCC !

    Compilation:

    gcc -O2 otcc.c -o otcc -ldl
    gcc -O2 otccelf.c -o otccelf

    Self-compilation:

    ./otccelf otccelf.c otccelf1

    Product's homepage

      


    TAGS:

    C compiler | linux compiler | code compiler | Obfuscated | C | compiler

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM