现在的位置: 首页 > 综合 > 正文

Tiny C Complier/TCC

2012年04月18日 ⁄ 综合 ⁄ 共 1326字 ⁄ 字号 评论关闭

Features

SMALL! You can compile and execute C code everywhere, for example on rescue disks (about 100KB for x86 TCC executable, including C preprocessor, C compiler, assembler and linker).
FAST! tcc generates x86 code. No byte code overhead. Compile, assemble and link several times faster than GCC.
UNLIMITED! Any C dynamic library can be used directly. TCC is heading torward full ISOC99 compliance. TCC can of course compile itself.
SAFE! tcc includes an optional memory and bound checker. Bound checked code can be mixed freely with standard code.
Compile and execute C source directly. No linking or assembly necessary. Full C preprocessor and GNU-like assembler included.
C script supported : just add '#!/usr/local/bin/tcc -run' at the first line of your C source, and execute it directly from the command line.
With libtcc, you can use TCC as a backend for dynamic code generation.

--------------------------------------------------------

又小又快的好玩意,整理硬盘时发现以前下的。
编译带的例子,VC2010带的CL编译器 开 O1选项编译出的是50多K,用这个只有3.5K。估计作者对COFF如数家珍啊。。还没怎么看过PE,所以无法指出都有优化了哪些部分,预感这会是个有价值的东西。而且开源,下学期打算自学编译原理和操作系统原理,应该会用到。

WINDOWS平台下的DLL、OBJ均支持,而且头文件较全。
这个编译器还有个有意思的特性,就是可以解释执行C代码,呵呵,像脚本语言一样可以运行,COOL!

不过微软的MSE杀毒软件会误报,这个是一点遗憾。不然可以拿来做坏事,也不用优化PE了

把玩了下,很喜欢,推荐下~

官方网站是:

http://bellard.org/tcc/

打算翻译下自带的那份文档,100多K的HTML,预计一个礼拜翻译完。不用GOOGLE翻译,锻炼下自己看文档的能力~
您可以关注下这里,稍后会有翻译的更新。 

抱歉!评论已关闭.