Tiny C To compile
tcc (Tiny C To compile, the tiny compiler C ) is a Compilateur C complete X86 developed by Fabrice Bellard. Its last version (0.9.23, of June 17th, 2005) can be used on Unix, Linux and Microsoft Windows. It is distributed under the limited general public License GNU (GNU LGPL).
C ANSI and the new standard ISO C99 are particularly well supported by tcc ; it is of more compatible with many extensions GNU C, like the assembly inline . However, to entirely return tcc conforms could slow down it significantly: for example, it does not support handling of tri-graph ( trigraph handling ), of the proper standard , the checks of expressions,…
Capacities
-
It is small : it can compile and carry out code C anywhere, for example of a diskette of help (approximately 100 Kio for achievable TCC , including the preprocessor and compiler C, the assembler and the data link).
- It is fast : it generates code x86 fairly optimized. It compiles, assembles and binds approximately 9 times more quickly than GCC .
- C ANSI and the standard ISO C99 are well supported. Many extensions GNU C are managed.
- It includes a verification system of the memory and its accesses. This system can be mixed with the code user.
- It can compile and carry out a source C without assembly or linkage editing.
- Under Linux, it can be used like an interpreter C: it is enough to add “#! /usr/local/bin/tcc - run” with the first line of the source C, and to carry out it directly since the console.
- the library libtcc makes it possible any program to generate and carry out dynamically code.
- Its compilation requires only some libraries.
Its license makes it possible each one to use it, modify, and/or redistribute. It can be used to develop open software source or owner.
History
tcc holds its origins of OTCC ( Obsfucated Tiny C To compile , Minuscule Compiler C Obscured), a program that Bellard wrote to gain IOCCC ( Internation Obfuscated C Codes Contest ) in 2002. Since this day, it improved it and " dice-assombrit" the program to produce tcc .
Current Status
The development of tcc is slowed down because Fabrice Bellard is occupied with other projects. However modified versions exist, like the '' Landley' S Mercurial branch '', the '' Dave Dodge' S collection off unofficial tcc patches '', '' Debian and kfreebsd downstream patches '', and patchs GCC of grischka.Version 0.9.23 is prone to a classified vulnerability CVE-2006-0635 or '' Open Source Vulnerability Database vulnerability 22956 ''. The report/ratio is that tcc " contains a fault which can have complications as for the safety of the program compiled with this last. The compiler cannot turn over a not signed value of the operator sizeof , having for consequence a potential overflow of the entireties in the objects which it compiles. " To date, the official version of tcc always has this vulnerability.
TCC has active a '' mailing list '', and the current version of Bellard is accessible since CVS.
Use
The most known uses of tcc are:
-
TCCBOOT , an impressive program where tcc load and lance a core linux starting from the sources in approximately 15 seconds on a processor Pentium 4 to 2.4 GHz. Unfolding occurs in three phases: TCCBOOT load the sources of the Linux core since the hard drive, places the code generated in memory and passes the hand to the Linux core. With this intention, the process of constuction of Linux requires some modifications.
- It was used to show a defense against the attacks of Hidden door.
- Cinpy is a library Python which makes it possible to implement code C in Python modules. This code is compiled hot with tcc .
Refer
| Random links: | Hiraide ShÅ« | State de Mérida | Jean Héroard | Andre Béraud | Trevor Sargent | Omar Credle | Giuseppe_Siri |