[arm] remove unsused sections while linking
This commit is contained in:
parent
cb73b0c227
commit
22d3dc0d27
|
@ -22,6 +22,10 @@ TEXT_BASE = $(CONFIG_TEXT_BASE)
|
|||
CPPFLAGS += -mabi=apcs-gnu -DTEXT_BASE=$(TEXT_BASE) -P
|
||||
CFLAGS := -fno-common -msoft-float -Os
|
||||
|
||||
# Add cleanup flags
|
||||
CPPFLAGS += -fdata-sections -ffunction-sections
|
||||
LDFLAGS_uboot += -static --gc-sections
|
||||
|
||||
ifeq ($(incdir-y),)
|
||||
incdir-y := $(machine-y)
|
||||
endif
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
|
||||
#define INITCALLS \
|
||||
*(.initcall.0) \
|
||||
*(.initcall.1) \
|
||||
*(.initcall.2) \
|
||||
*(.initcall.3) \
|
||||
*(.initcall.4) \
|
||||
*(.initcall.5) \
|
||||
*(.initcall.6) \
|
||||
*(.initcall.7)
|
||||
KEEP(*(.initcall.0)) \
|
||||
KEEP(*(.initcall.1)) \
|
||||
KEEP(*(.initcall.2)) \
|
||||
KEEP(*(.initcall.3)) \
|
||||
KEEP(*(.initcall.4)) \
|
||||
KEEP(*(.initcall.5)) \
|
||||
KEEP(*(.initcall.6)) \
|
||||
KEEP(*(.initcall.7))
|
||||
|
||||
#define U_BOOT_CMDS *(SORT_BY_NAME(.u_boot_cmd*))
|
||||
#define U_BOOT_CMDS KEEP(*(SORT_BY_NAME(.u_boot_cmd*)))
|
||||
|
||||
#define U_BOOT_SYMS *(__usymtab)
|
||||
#define U_BOOT_SYMS KEEP(*(__usymtab))
|
||||
|
|
Loading…
Reference in New Issue