1、GCC选项添加
COMPILE_FLAGS += -ffunction-sections -fdata-sections
2、LD选项添加
LDFLAGS += -Wl,-gc-sections
例子:
gcc *.c -O3 -o test -I ../../include/ -ffunction-sections -fdata-sections -Wl,-gc-sections -DWITH_NOIDREF -Wl,-print-gc-sections
阅读(3402) | 评论(0) | 转发(0) |