1 /* mbed - LPC1768 linker script
2 * Based linker script generated by Code Red Technologies Red Suite 4.1
4 GROUP(libgcc.a libc.a libstdc++.a libm.a libcr_newlib_nohost.a crti.o crtn.o crtbegin.o crtend.o)
8 /* Define each memory region */
9 MFlash512 (rx) : ORIGIN = 0x0, LENGTH = 0x80000 /* 512k */
10 RamLoc32 (rwx) : ORIGIN = 0x100000C8, LENGTH = 0x7F38 /* 32k */
11 RamAHB32 (rwx) : ORIGIN = 0x2007c000, LENGTH = 0x8000 /* 32k */
14 /* Define a symbol for the top of each memory region */
15 __top_MFlash512 = 0x0 + 0x80000;
16 __top_RamLoc32 = 0x10000000 + 0x8000;
17 __top_RamAHB32 = 0x2007c000 + 0x8000;
24 /* MAIN TEXT SECTION */
30 /* Global Section Table */
32 __section_table_start = .;
33 __data_section_table = .;
34 LONG(LOADADDR(.data));
37 LONG(LOADADDR(.data_RAM2));
38 LONG( ADDR(.data_RAM2)) ;
39 LONG( SIZEOF(.data_RAM2));
40 __data_section_table_end = .;
41 __bss_section_table = .;
44 LONG( ADDR(.bss_RAM2));
45 LONG( SIZEOF(.bss_RAM2));
46 __bss_section_table_end = .;
47 __section_table_end = . ;
48 /* End of Global Section Table */
57 /* C++ constructors etc */
62 __preinit_array_start = .;
63 KEEP (*(.preinit_array))
64 __preinit_array_end = .;
67 __init_array_start = .;
68 KEEP (*(SORT(.init_array.*)))
75 KEEP (*crtbegin.o(.ctors))
76 KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
77 KEEP (*(SORT(.ctors.*)))
78 KEEP (*crtend.o(.ctors))
81 KEEP (*crtbegin.o(.dtors))
82 KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
83 KEEP (*(SORT(.dtors.*)))
84 KEEP (*crtend.o(.dtors))
89 * for exception handling/unwind - some Newlib functions (in common
90 * with C++ and STDC++) use this.
94 *(.ARM.extab* .gnu.linkonce.armextab.*)
100 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
107 .data_RAM2 : ALIGN(4)
113 } > RamAHB32 AT>MFlash512
115 /* MAIN DATA SECTION */
117 .uninit_RESERVED : ALIGN(4)
119 KEEP(*(.bss.$RESERVED*))
130 } > RamLoc32 AT>MFlash512
140 /* MAIN BSS SECTION */
152 PROVIDE(_pvHeapStart = .);
153 PROVIDE(_vStackTop = __top_RamLoc32 - 0);