2 * CMSIS/Device/ARM/ARMCM0plus/Source/GCC/gcc_arm.ld
4 * git://github.com/ARM-software/CMSIS
7 /* Linker script to configure memory regions. */
11 : ORIGIN = 0x00008000, LENGTH = 0x08000
14 : ORIGIN = 0x1fffe000, LENGTH = 0x08000
17 /* Linker script to place sections and symbol values. Should be used together
18 * with other linker script that defines memory regions FLASH and RAM.
19 * It references following symbols, which must be defined in code:
20 * Reset_Handler : Entry of reset handler
22 * It defines following symbols, which code can use without definition:
27 * __preinit_array_start
60 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
67 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
78 *(.ARM.extab* .gnu.linkonce.armextab.*)
84 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
98 PROVIDE_HIDDEN (__preinit_array_start = .);
99 KEEP(*(.preinit_array))
100 PROVIDE_HIDDEN (__preinit_array_end = .);
104 PROVIDE_HIDDEN (__init_array_start = .);
105 KEEP(*(SORT(.init_array.*)))
107 PROVIDE_HIDDEN (__init_array_end = .);
112 PROVIDE_HIDDEN (__fini_array_start = .);
113 KEEP(*(SORT(.fini_array.*)))
115 PROVIDE_HIDDEN (__fini_array_end = .);
143 /* .stack_dummy section doesn't contains any symbols. It is only
144 * used for linker to calculate size of stack sections, and assign
145 * values to stack symbols later */
151 /* Set stack top to end of RAM, and stack limit move down by
152 * size of stack_dummy section */
153 __StackTop = ORIGIN(RAM) + LENGTH(RAM);
154 __StackLimit = __StackTop - SIZEOF(.stack_dummy);
155 PROVIDE(__stack = __StackTop);
157 /* Check if data + heap + stack exceeds RAM limit */
158 ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")