diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2012-10-14 00:16:22 +0200 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2012-10-14 00:16:22 +0200 |
commit | 2abe655e4b7b49377c6cb43d6959c897866ed4c2 (patch) | |
tree | e6f83ad386137f64e811ae9913875697748b8979 | |
parent | c22df1415784186110bbf253e3fe2e231a55c9c3 (diff) |
Enable gc-sections.
-rw-r--r-- | build_rules | 2 | ||||
-rw-r--r-- | 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.*) |