]> the.earth.li Git - esp8266-clock.git/blob - rom1.ld
Update Makefile to link 2 separate ROMs
[esp8266-clock.git] / rom1.ld
1 /* This linker script generated from xt-genldscripts.tpp for LSP . */
2 /* Linker Script for ld -N */
3 MEMORY
4 {
5   dport0_0_seg :                        org = 0x3FF00000, len = 0x10
6   dram0_0_seg :                         org = 0x3FFE8000, len = 0x14000
7   iram1_0_seg :                         org = 0x40100000, len = 0x8000
8   irom0_0_seg :                         org = 0x40242010, len = 0x3C000
9 }
10
11 PHDRS
12 {
13   dport0_0_phdr PT_LOAD;
14   dram0_0_phdr PT_LOAD;
15   dram0_0_bss_phdr PT_LOAD;
16   iram1_0_phdr PT_LOAD;
17   irom0_0_phdr PT_LOAD;
18 }
19
20
21 /*  Default entry point:  */
22 ENTRY(call_user_start)
23 EXTERN(_DebugExceptionVector)
24 EXTERN(_DoubleExceptionVector)
25 EXTERN(_KernelExceptionVector)
26 EXTERN(_NMIExceptionVector)
27 EXTERN(_UserExceptionVector)
28 PROVIDE(_memmap_vecbase_reset = 0x40000000);
29 /* Various memory-map dependent cache attribute settings: */
30 _memmap_cacheattr_wb_base = 0x00000110;
31 _memmap_cacheattr_wt_base = 0x00000110;
32 _memmap_cacheattr_bp_base = 0x00000220;
33 _memmap_cacheattr_unused_mask = 0xFFFFF00F;
34 _memmap_cacheattr_wb_trapnull = 0x2222211F;
35 _memmap_cacheattr_wba_trapnull = 0x2222211F;
36 _memmap_cacheattr_wbna_trapnull = 0x2222211F;
37 _memmap_cacheattr_wt_trapnull = 0x2222211F;
38 _memmap_cacheattr_bp_trapnull = 0x2222222F;
39 _memmap_cacheattr_wb_strict = 0xFFFFF11F;
40 _memmap_cacheattr_wt_strict = 0xFFFFF11F;
41 _memmap_cacheattr_bp_strict = 0xFFFFF22F;
42 _memmap_cacheattr_wb_allvalid = 0x22222112;
43 _memmap_cacheattr_wt_allvalid = 0x22222112;
44 _memmap_cacheattr_bp_allvalid = 0x22222222;
45 PROVIDE(_memmap_cacheattr_reset = _memmap_cacheattr_wb_trapnull);
46
47 SECTIONS
48 {
49
50   .dport0.rodata : ALIGN(4)
51   {
52     _dport0_rodata_start = ABSOLUTE(.);
53     *(.dport0.rodata)
54     *(.dport.rodata)
55     _dport0_rodata_end = ABSOLUTE(.);
56   } >dport0_0_seg :dport0_0_phdr
57
58   .dport0.literal : ALIGN(4)
59   {
60     _dport0_literal_start = ABSOLUTE(.);
61     *(.dport0.literal)
62     *(.dport.literal)
63     _dport0_literal_end = ABSOLUTE(.);
64   } >dport0_0_seg :dport0_0_phdr
65
66   .dport0.data : ALIGN(4)
67   {
68     _dport0_data_start = ABSOLUTE(.);
69     *(.dport0.data)
70     *(.dport.data)
71     _dport0_data_end = ABSOLUTE(.);
72   } >dport0_0_seg :dport0_0_phdr
73
74   .data : ALIGN(4)
75   {
76     _data_start = ABSOLUTE(.);
77     *(.data)
78     *(.data.*)
79     *(.gnu.linkonce.d.*)
80     *(.data1)
81     *(.sdata)
82     *(.sdata.*)
83     *(.gnu.linkonce.s.*)
84     *(.sdata2)
85     *(.sdata2.*)
86     *(.gnu.linkonce.s2.*)
87     *(.jcr)
88     _data_end = ABSOLUTE(.);
89   } >dram0_0_seg :dram0_0_phdr
90
91   .rodata : ALIGN(4)
92   {
93     _rodata_start = ABSOLUTE(.);
94     *(.sdk.version)
95     *(.rodata)
96     *(.rodata.*)
97     *(.gnu.linkonce.r.*)
98     *(.rodata1)
99     __XT_EXCEPTION_TABLE__ = ABSOLUTE(.);
100     *(.xt_except_table)
101     *(.gcc_except_table)
102     *(.gnu.linkonce.e.*)
103     *(.gnu.version_r)
104     *(.eh_frame)
105     /*  C++ constructor and destructor tables, properly ordered:  */
106     KEEP (*crtbegin.o(.ctors))
107     KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
108     KEEP (*(SORT(.ctors.*)))
109     KEEP (*(.ctors))
110     KEEP (*crtbegin.o(.dtors))
111     KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
112     KEEP (*(SORT(.dtors.*)))
113     KEEP (*(.dtors))
114     /*  C++ exception handlers table:  */
115     __XT_EXCEPTION_DESCS__ = ABSOLUTE(.);
116     *(.xt_except_desc)
117     *(.gnu.linkonce.h.*)
118     __XT_EXCEPTION_DESCS_END__ = ABSOLUTE(.);
119     *(.xt_except_desc_end)
120     *(.dynamic)
121     *(.gnu.version_d)
122     . = ALIGN(4);               /* this table MUST be 4-byte aligned */
123     _bss_table_start = ABSOLUTE(.);
124     LONG(_bss_start)
125     LONG(_bss_end)
126     _bss_table_end = ABSOLUTE(.);
127     _rodata_end = ABSOLUTE(.);
128   } >dram0_0_seg :dram0_0_phdr
129
130   .bss ALIGN(8) (NOLOAD) : ALIGN(4)
131   {
132     . = ALIGN (8);
133     _bss_start = ABSOLUTE(.);
134     *(.dynsbss)
135     *(.sbss)
136     *(.sbss.*)
137     *(.gnu.linkonce.sb.*)
138     *(.scommon)
139     *(.sbss2)
140     *(.sbss2.*)
141     *(.gnu.linkonce.sb2.*)
142     *(.dynbss)
143     *(.bss)
144     *(.bss.*)
145     *(.gnu.linkonce.b.*)
146     *(COMMON)
147     . = ALIGN (8);
148     _bss_end = ABSOLUTE(.);
149     _heap_start = ABSOLUTE(.);
150 /*    _stack_sentry = ALIGN(0x8); */
151   } >dram0_0_seg :dram0_0_bss_phdr
152 /* __stack = 0x3ffc8000; */
153
154   .text : ALIGN(4)
155   {
156     _stext = .;
157     _text_start = ABSOLUTE(.);
158     *(.UserEnter.text)
159     . = ALIGN(16);
160     *(.DebugExceptionVector.text)
161     . = ALIGN(16);
162     *(.NMIExceptionVector.text)
163     . = ALIGN(16);
164     *(.KernelExceptionVector.text)
165     LONG(0)
166     LONG(0)
167     LONG(0)
168     LONG(0)
169     . = ALIGN(16);
170     *(.UserExceptionVector.text)
171     LONG(0)
172     LONG(0)
173     LONG(0)
174     LONG(0)
175     . = ALIGN(16);
176     *(.DoubleExceptionVector.text)
177     LONG(0)
178     LONG(0)
179     LONG(0)
180     LONG(0)
181     . = ALIGN (16);
182     *(.entry.text)
183     *(.init.literal)
184     *(.init)
185     *(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
186     *(.fini.literal)
187     *(.fini)
188     *(.gnu.version)
189     _text_end = ABSOLUTE(.);
190     _etext = .;
191   } >iram1_0_seg :iram1_0_phdr
192
193   .lit4 : ALIGN(4)
194   {
195     _lit4_start = ABSOLUTE(.);
196     *(*.lit4)
197     *(.lit4.*)
198     *(.gnu.linkonce.lit4.*)
199     _lit4_end = ABSOLUTE(.);
200   } >iram1_0_seg :iram1_0_phdr
201
202   .irom0.text : ALIGN(4)
203   {
204     _irom0_text_start = ABSOLUTE(.);
205     *(.irom0.literal .irom.literal .irom.text.literal .irom0.text .irom.text)
206     _irom0_text_end = ABSOLUTE(.);
207   } >irom0_0_seg :irom0_0_phdr
208 }
209
210 /* get ROM code address */
211 INCLUDE "eagle.rom.addr.v6.ld"