aboutsummaryrefslogtreecommitdiffstats
path: root/os/ports/GCC/ARMCMx/STM32F1xx/ld/STM32F103xB.ld
diff options
context:
space:
mode:
Diffstat (limited to 'os/ports/GCC/ARMCMx/STM32F1xx/ld/STM32F103xB.ld')
-rw-r--r--os/ports/GCC/ARMCMx/STM32F1xx/ld/STM32F103xB.ld13
1 files changed, 9 insertions, 4 deletions
diff --git a/os/ports/GCC/ARMCMx/STM32F1xx/ld/STM32F103xB.ld b/os/ports/GCC/ARMCMx/STM32F1xx/ld/STM32F103xB.ld
index 3ba473f16..4dd94bd7d 100644
--- a/os/ports/GCC/ARMCMx/STM32F1xx/ld/STM32F103xB.ld
+++ b/os/ports/GCC/ARMCMx/STM32F1xx/ld/STM32F103xB.ld
@@ -92,10 +92,13 @@ SECTIONS
{
*(.eh_frame)
} > flash
-
- . = ALIGN(8);
- _etext = .;
- _textdata = _etext;
+
+ .endtext : ONLY_IF_RO
+ {
+ . = ALIGN(8);
+ _etext = .;
+ _textdata = _etext;
+ } > flash
.stacks :
{
@@ -114,6 +117,7 @@ SECTIONS
.data :
{
+ . = ALIGN(4);
PROVIDE(_data = .);
*(.data)
. = ALIGN(4);
@@ -126,6 +130,7 @@ SECTIONS
.bss :
{
+ . = ALIGN(4);
PROVIDE(_bss_start = .);
*(.bss)
. = ALIGN(4);