From 2abe655e4b7b49377c6cb43d6959c897866ed4c2 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Sun, 14 Oct 2012 00:16:22 +0200 Subject: Enable gc-sections. --- build_rules | 2 +- ld_scripts/arm_flash_ram.ld | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build_rules b/build_rules index 3fa0f91..e0f9b59 100644 --- a/build_rules +++ b/build_rules @@ -18,7 +18,7 @@ def select_arm(env, family): CCFLAGS = '-O2 -Wall -ggdb -mcpu=${CPU_FAMILY} -mthumb -ffunction-sections', CXXFLAGS = '-std=c++11 -fno-exceptions -fno-rtti -Wno-pmf-conversions', ASFLAGS = '-c -x assembler-with-cpp -mcpu=${CPU_FAMILY} -mthumb', - LINKFLAGS = '-Wall -mcpu=${CPU_FAMILY} -mthumb -mhard-float -nostartfiles -Wl,-T${LINK_SCRIPT}', # -Wl,--gc-sections + LINKFLAGS = '-Wall -mcpu=${CPU_FAMILY} -mthumb -mhard-float -nostartfiles -Wl,-T${LINK_SCRIPT} -Wl,--gc-sections', CPPPATH = [laks_dir], LIBPATH = [ld_dir], diff --git a/ld_scripts/arm_flash_ram.ld b/ld_scripts/arm_flash_ram.ld index 4839b16..9e3f983 100644 --- a/ld_scripts/arm_flash_ram.ld +++ b/ld_scripts/arm_flash_ram.ld @@ -23,7 +23,7 @@ SECTIONS { PROVIDE(_fini_array_end = .); } > flash - .text : ALIGN(16) SUBALIGN(16) { + .text : ALIGN(4) SUBALIGN(4) { *(.text.startup.*) *(.text) *(.text.*) -- cgit v1.2.3