nios2: turn on function and data sections

Change-Id: I5bd841873207d1106a82b3e05187ee401b6c5478
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2016-04-28 14:16:00 -07:00 committed by Anas Nashif
parent f00671ab16
commit d380e555c6

View file

@ -8,6 +8,11 @@ arch_cflags := $(call cc-option,-G0)
# warnings as errors. Remove this once the stubs are all implemented
arch_cflags += $(call cc-option,-Wno-unused-parameter)
# Put functions and data in their own binary sections so that ld can
# garbage collect them
arch_cflags += $(call cc-option,-ffunction-sections) \
$(call cc-option,-fdata-sections)
KBUILD_AFLAGS += $(arch_cflags)
KBUILD_CFLAGS += $(arch_cflags)
KBUILD_CXXFLAGS += $(arch_cflags)