litex: reorganize things, first work working version
[litex.git] / litex / soc / software / bios / linker.ld
1 INCLUDE generated/output_format.ld
2 ENTRY(_start)
3
4 INCLUDE generated/regions.ld
5
6 SECTIONS
7 {
8 .text :
9 {
10 _ftext = .;
11 *(.text .stub .text.* .gnu.linkonce.t.*)
12 _etext = .;
13 } > rom
14
15 .rodata :
16 {
17 . = ALIGN(4);
18 _frodata = .;
19 *(.rodata .rodata.* .gnu.linkonce.r.*)
20 *(.rodata1)
21
22 /* Make sure the file is aligned on disk as well
23 as in memory; CRC calculation requires that. */
24 FILL(0);
25 . = ALIGN(4);
26 _erodata = .;
27 } > rom
28
29 .bss :
30 {
31 . = ALIGN(4);
32 _fbss = .;
33 *(.dynsbss)
34 *(.sbss .sbss.* .gnu.linkonce.sb.*)
35 *(.scommon)
36 *(.dynbss)
37 *(.bss .bss.* .gnu.linkonce.b.*)
38 *(COMMON)
39 . = ALIGN(4);
40 _ebss = .;
41 _end = .;
42 } > sram
43
44 /DISCARD/ :
45 {
46 *(.eh_frame)
47 *(.comment)
48 *(.data .data.* .gnu.linkonce.d.*)
49 *(.data1)
50 *(.sdata .sdata.* .gnu.linkonce.s.*)
51 }
52 }
53
54 PROVIDE(_fstack = ORIGIN(sram) + LENGTH(sram) - 4);