Switch from GPLv2 to GPLv2+
[fw/altos] / src / stm / altos-ram.ld
1 /*
2  * Copyright © 2012 Keith Packard <keithp@keithp.com>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
17  */
18
19 MEMORY {
20         ram (rwx) : ORIGIN = 0x20000000, LENGTH = 16K
21 }
22
23 INCLUDE registers.ld
24
25 SECTIONS {
26         . = ORIGIN(ram);
27
28         /*
29          * Rom contents
30          */
31
32         __text_start__ = .;
33
34         .text : {
35                 *(.interrupt)   /* Interrupt vectors */
36                 *(.text)        /* Executable code */
37                 *(.rodata)      /* Constants */
38         } > ram
39
40         .ARM.exidx : {
41                 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
42                 __text_end__ = .;
43         } > ram
44
45         __data_start__ = .;
46
47         /* Data -- relocated to RAM, but written to ROM
48          */
49         .data : AT (ADDR(.ARM.exidx) + SIZEOF (.ARM.exidx)) {
50                 *(.data)        /* initialized data */
51                 __data_end__ = .;
52                 __bss_start__ = .;
53         } >ram
54
55         .bss : {
56                 *(.bss)
57                 *(COMMON)
58                 __bss_end__ = .;
59         } >ram
60
61         PROVIDE(__stack__ = ORIGIN(ram) + LENGTH(ram));
62         PROVIDE(end = .);
63
64 }
65
66 ENTRY(start);
67
68