• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/******************************************************************************
2 *
3 * apollo3evb.ld - Linker script for applications using startup_gcc.c
4 *
5 *****************************************************************************/
6ENTRY(Reset_Handler)
7
8MEMORY
9{
10    FLASH (rx) : ORIGIN = 0x0000C000, LENGTH = 960K
11    SRAM (rwx) : ORIGIN = 0x10000000, LENGTH = 384K
12}
13
14SECTIONS
15{
16    .text :
17    {
18        . = ALIGN(4);
19        KEEP(*(.isr_vector))
20        KEEP(*(.patch))
21        *(.text)
22        *(.text*)
23
24	/* These are the C++ global constructors.  Stick them all here and
25	 * then walk through the array in main() calling them all.
26	 */
27	_init_array_start = .;
28	KEEP (*(SORT(.init_array*)))
29	_init_array_end = .;
30
31	/* XXX Currently not doing anything for global destructors. */
32
33        *(.rodata)
34        *(.rodata*)
35        . = ALIGN(4);
36        _etext = .;
37    } > FLASH
38
39  /* User stack section initialized by startup code. */
40  .stack (NOLOAD):
41    {
42        . = ALIGN(8);
43        *(.stack)
44        *(.stack*)
45        . = ALIGN(8);
46    } > SRAM
47
48    .data :
49    {
50        . = ALIGN(4);
51        _sdata = .;
52        *(.data)
53        *(.data*)
54        . = ALIGN(4);
55        _edata = .;
56    } > SRAM AT>FLASH
57
58    /* used by startup to initialize data */
59    _init_data = LOADADDR(.data);
60
61    .bss :
62    {
63        . = ALIGN(4);
64        _sbss = .;
65        *(.bss)
66        *(.bss*)
67        *(COMMON)
68        . = ALIGN(4);
69        _ebss = .;
70    } > SRAM
71    /* Add this to satisfy reference to symbol 'end' from libnosys.a(sbrk.o)
72     * to denote the HEAP start.
73     */
74   end = .;
75
76  .ARM.attributes 0 : { *(.ARM.attributes) }
77}
78
79
80