From 800e538a58063276b643d1102d2e49d591b3df2d Mon Sep 17 00:00:00 2001 From: Thomas Winwood Date: Wed, 9 Jan 2019 03:38:25 +0000 Subject: [PATCH 1/2] Add .bss section to linker script --- linker.ld | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/linker.ld b/linker.ld index 471cb0f..135b077 100644 --- a/linker.ld +++ b/linker.ld @@ -26,6 +26,11 @@ SECTIONS { __data_end = ABSOLUTE(.); } >iwram AT>rom = 0xff + .bss : { + *(.bss .bss.*); + . = ALIGN(4); + } >iwram + /* debugging sections */ /* Stabs */ .stab 0 : { *(.stab) } From 1f75cf025dc45dcfe3058e390404e3132df72317 Mon Sep 17 00:00:00 2001 From: Thomas Winwood Date: Wed, 9 Jan 2019 04:00:36 +0000 Subject: [PATCH 2/2] Add symbol for the end of the .bss section --- linker.ld | 1 + 1 file changed, 1 insertion(+) diff --git a/linker.ld b/linker.ld index 135b077..0be97b2 100644 --- a/linker.ld +++ b/linker.ld @@ -29,6 +29,7 @@ SECTIONS { .bss : { *(.bss .bss.*); . = ALIGN(4); + __bss_end = ABSOLUTE(.); } >iwram /* debugging sections */