请教一个gcc option选项的问题
为了减小可执行文件的size,我在makefile中加了CFLAGS += -ffunction-sections -fdata-sections。LDFLAG 加了--gc-section。但是出现了一个小问题:
没有初始化的静态全局变量不再被初始化为0了。
谁能帮我?
谢谢! gc-section是GC的选项吧,去查查参数吧。 -ffunction-sections
-fdata-sections
Only use these options when there are significant benefits from doing so. When you specify these options, the assembler and linker will create larger object and executable files and will also be slower.
这些选项能减小可执行文件的size么? 为了减小可执行文件的size,我在makefile中加了CFLAGS += -ffunction-sections -fdata-sections。LDFLAG 加 ...
sczhang_0001 发表于 2010-08-18 16:10 http://linux.chinaunix.net/bbs/images/common/back.gif
给gcc报个bug。 回复 3# EricFisher
有时候是可以的。
页:
[1]