github.com/aykevl/tinygo@v0.5.0/targets/arm.ld (about) 1 2 /* Unused, but here to silence a linker warning. */ 3 ENTRY(Reset_Handler) 4 5 /* define output sections */ 6 SECTIONS 7 { 8 /* Program code and read-only data goes to FLASH_TEXT. */ 9 .text : 10 { 11 KEEP(*(.isr_vector)) 12 *(.text) 13 *(.text*) 14 *(.rodata) 15 *(.rodata*) 16 . = ALIGN(4); 17 } >FLASH_TEXT 18 19 /* Put the stack at the bottom of RAM, so that the application will 20 * crash on stack overflow instead of silently corrupting memory. 21 * See: http://blog.japaric.io/stack-overflow-protection/ */ 22 .stack : 23 { 24 . = ALIGN(4); 25 . += _stack_size; 26 _stack_top = .; 27 } >RAM 28 29 /* Start address (in flash) of .data, used by startup code. */ 30 _sidata = LOADADDR(.data); 31 32 /* Globals with initial value */ 33 .data : 34 { 35 . = ALIGN(4); 36 _sdata = .; /* used by startup code */ 37 *(.data) 38 *(.data*) 39 . = ALIGN(4); 40 _edata = .; /* used by startup code */ 41 } >RAM AT>FLASH_TEXT 42 43 /* Zero-initialized globals */ 44 .bss : 45 { 46 . = ALIGN(4); 47 _sbss = .; /* used by startup code */ 48 *(.bss) 49 *(.bss*) 50 *(COMMON) 51 . = ALIGN(4); 52 _ebss = .; /* used by startup code */ 53 } >RAM 54 55 /DISCARD/ : 56 { 57 *(.ARM.exidx) /* causes 'no memory region specified' error in lld */ 58 *(.ARM.exidx.*) /* causes spurious 'undefined reference' errors */ 59 } 60 } 61 62 /* For the memory allocator. */ 63 _heap_start = _ebss; 64 _heap_end = ORIGIN(RAM) + LENGTH(RAM); 65 _globals_start = _sdata; 66 _globals_end = _ebss;