Reduce binary sizes for the kernel and userspace apps
This commit is contained in:
@ -1,9 +1,10 @@
|
||||
CFLAGS := -ffreestanding -Wall -Wextra -g -fcommon -nostdinc \
|
||||
-isystem $(ROOT)/std/include -isystem $(ROOT)/ulib -isystem $(ROOT)/share \
|
||||
-isystem $(ROOT)/ulib/std
|
||||
-isystem $(ROOT)/std/include -isystem $(ROOT)/ulib -isystem $(ROOT)/share \
|
||||
-isystem $(ROOT)/ulib/std
|
||||
|
||||
CURRENT_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
||||
|
||||
include $(CURRENT_DIR)/arch/$(ARCH)/$(ARCH).mk
|
||||
|
||||
LDFLAGS += -nostdlib -static $(shell $(CC) -print-libgcc-file-name) -T $(CURRENT_DIR)/arch/$(ARCH)/link.ld
|
||||
LDFLAGS += -nostdlib -static $(shell $(CC) -print-libgcc-file-name) \
|
||||
-T $(CURRENT_DIR)/arch/$(ARCH)/link.ld
|
||||
|
||||
@ -25,4 +25,12 @@ SECTIONS {
|
||||
. = ALIGN(4K);
|
||||
_bss_end = .;
|
||||
}
|
||||
|
||||
/DISCARD/ : {
|
||||
*(.eh_frame)
|
||||
*(.eh_frame_hdr)
|
||||
*(.gcc_except_table*)
|
||||
*(.note*)
|
||||
*(.comment)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user