reduce output file size

This commit is contained in:
Yanyan Jiang 2017-05-31 05:40:06 -04:00
parent 188e186906
commit 0730dd6610
2 changed files with 3 additions and 1 deletions

View File

@ -10,6 +10,8 @@ ARCHIVE ?= $(LIB_DIR)/build/$(NAME)-$(ARCH).a
INC_DIR += $(addsuffix /include/, $(addprefix $(AM_HOME)/libs/, $(LIBS)))
CFLAGS += -fdata-sections -ffunction-sections
$(shell mkdir -p $(DST_DIR))
include $(AM_HOME)/Makefile.compile

View File

@ -6,4 +6,4 @@ shift
bash -c "cd $DIR/boot && make"
mips-linux-gnu-ld -EL -T $DIR/loader.ld -e _start -o $DEST $DIR/boot/start.o $@ && python $DIR/gen_coe.py $DEST
mips-linux-gnu-ld --gc-sections -EL -T $DIR/loader.ld -e _start -o $DEST $DIR/boot/start.o $@ && python $DIR/gen_coe.py $DEST