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 /* Library configurations */
18 GROUP(libgcc.a libc.a libm.a libnosys.a)
20 /* Linker script to place sections and symbol values. Should be used together
21 * with other linker script that defines memory regions FLASH and RAM.
22 * It references following symbols, which must be defined in code:
23 * Reset_Handler : Entry of reset handler
25 * It defines following symbols, which code can use without definition:
30 * __preinit_array_start
63 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
70 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
81 *(.ARM.extab* .gnu.linkonce.armextab.*)
87 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
101 PROVIDE_HIDDEN (__preinit_array_start = .);
102 KEEP(*(.preinit_array))
103 PROVIDE_HIDDEN (__preinit_array_end = .);
107 PROVIDE_HIDDEN (__init_array_start = .);
108 KEEP(*(SORT(.init_array.*)))
110 PROVIDE_HIDDEN (__init_array_end = .);
115 PROVIDE_HIDDEN (__fini_array_start = .);
116 KEEP(*(SORT(.fini_array.*)))
118 PROVIDE_HIDDEN (__fini_array_end = .);
146 /* .stack_dummy section doesn't contains any symbols. It is only
147 * used for linker to calculate size of stack sections, and assign
148 * values to stack symbols later */
154 /* Set stack top to end of RAM, and stack limit move down by
155 * size of stack_dummy section */
156 __StackTop = ORIGIN(RAM) + LENGTH(RAM);
157 __StackLimit = __StackTop - SIZEOF(.stack_dummy);
158 PROVIDE(__stack = __StackTop);
160 /* Check if data + heap + stack exceeds RAM limit */
161 ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")