]>
Commit | Line | Data |
---|---|---|
51533b61 MS |
1 | /* ld script to make the Linux/CRIS kernel |
2 | * Authors: Bjorn Wesen (bjornw@axis.com) | |
3 | * | |
4 | * It is VERY DANGEROUS to fiddle around with the symbols in this | |
5 | * script. It is for example quite vital that all generated sections | |
6 | * that are used are actually named here, otherwise the linker will | |
7 | * put them at the end, where the init stuff is which is FREED after | |
8 | * the kernel has booted. | |
9 | */ | |
10 | ||
51533b61 | 11 | #include <asm-generic/vmlinux.lds.h> |
baa69b12 JN |
12 | #include <asm/page.h> |
13 | ||
14 | #ifdef CONFIG_ETRAX_VMEM_SIZE | |
15 | #define __CONFIG_ETRAX_VMEM_SIZE CONFIG_ETRAX_VMEM_SIZE | |
16 | #else | |
17 | #define __CONFIG_ETRAX_VMEM_SIZE 0 | |
18 | #endif | |
51533b61 | 19 | |
c5ec6fb0 | 20 | |
51533b61 MS |
21 | jiffies = jiffies_64; |
22 | SECTIONS | |
23 | { | |
24 | . = DRAM_VIRTUAL_BASE; | |
25 | dram_start = .; | |
c5ec6fb0 JN |
26 | #ifdef CONFIG_ETRAX_ARCH_V10 |
27 | ibr_start = .; | |
28 | #else | |
51533b61 | 29 | ebp_start = .; |
baa69b12 JN |
30 | /* The boot section is only necessary until the VCS top */ |
31 | /* level testbench includes both flash and DRAM. */ | |
51533b61 | 32 | .boot : { *(.boot) } |
c5ec6fb0 | 33 | #endif |
51533b61 | 34 | |
c5ec6fb0 | 35 | /* see head.S and pages reserved at the start */ |
baa69b12 | 36 | . = DRAM_VIRTUAL_BASE + 0x4000; |
51533b61 | 37 | |
c5ec6fb0 JN |
38 | _text = .; /* Text and read-only data. */ |
39 | text_start = .; /* Lots of aliases. */ | |
51533b61 MS |
40 | _stext = .; |
41 | __stext = .; | |
42 | .text : { | |
baa69b12 | 43 | TEXT_TEXT |
51533b61 MS |
44 | SCHED_TEXT |
45 | LOCK_TEXT | |
46 | *(.fixup) | |
47 | *(.text.__*) | |
48 | } | |
49 | ||
c5ec6fb0 | 50 | _etext = . ; /* End of text section. */ |
51533b61 MS |
51 | __etext = .; |
52 | ||
24924ece | 53 | EXCEPTION_TABLE(4) |
51533b61 MS |
54 | |
55 | RODATA | |
56 | ||
57 | . = ALIGN (4); | |
58 | ___data_start = . ; | |
59 | __Sdata = . ; | |
c5ec6fb0 | 60 | .data : { /* Data */ |
5c617c6f | 61 | DATA_DATA |
51533b61 | 62 | } |
c5ec6fb0 | 63 | __edata = . ; /* End of data section. */ |
51533b61 MS |
64 | _edata = . ; |
65 | ||
24924ece | 66 | INIT_TASK_DATA_SECTION(PAGE_SIZE) |
51533b61 | 67 | |
c5ec6fb0 | 68 | . = ALIGN(PAGE_SIZE); /* Init code and data. */ |
baa69b12 | 69 | __init_begin = .; |
24924ece | 70 | INIT_TEXT_SECTION(PAGE_SIZE) |
01ba2bdc | 71 | .init.data : { INIT_DATA } |
24924ece | 72 | .init.setup : { INIT_SETUP(16) } |
c5ec6fb0 | 73 | #ifdef CONFIG_ETRAX_ARCH_V32 |
51533b61 MS |
74 | __start___param = .; |
75 | __param : { *(__param) } | |
76 | __stop___param = .; | |
c5ec6fb0 | 77 | #endif |
baa69b12 | 78 | .initcall.init : { |
24924ece | 79 | INIT_CALLS |
51533b61 MS |
80 | } |
81 | ||
82 | .con_initcall.init : { | |
24924ece | 83 | CON_INITCALL |
51533b61 MS |
84 | } |
85 | SECURITY_INIT | |
86 | ||
c5ec6fb0 JN |
87 | #ifdef CONFIG_ETRAX_ARCH_V10 |
88 | #ifdef CONFIG_BLK_DEV_INITRD | |
89 | .init.ramfs : { | |
90 | __initramfs_start = .; | |
91 | *(.init.ramfs) | |
92 | __initramfs_end = .; | |
93 | } | |
94 | #endif | |
95 | #endif | |
96 | __vmlinux_end = .; /* Last address of the physical file. */ | |
97 | #ifdef CONFIG_ETRAX_ARCH_V32 | |
baa69b12 | 98 | PERCPU(PAGE_SIZE) |
51533b61 MS |
99 | |
100 | .init.ramfs : { | |
24924ece | 101 | INIT_RAM_FS |
51533b61 | 102 | } |
c5ec6fb0 | 103 | #endif |
51533b61 | 104 | |
baa69b12 JN |
105 | /* |
106 | * We fill to the next page, so we can discard all init | |
107 | * pages without needing to consider what payload might be | |
108 | * appended to the kernel image. | |
109 | */ | |
c5ec6fb0 | 110 | . = ALIGN(PAGE_SIZE); |
baa69b12 JN |
111 | |
112 | __init_end = .; | |
51533b61 | 113 | |
c5ec6fb0 | 114 | __data_end = . ; /* Move to _edata ? */ |
24924ece | 115 | BSS_SECTION(0, 0, 0) |
51533b61 MS |
116 | |
117 | . = ALIGN (0x20); | |
118 | _end = .; | |
119 | __end = .; | |
120 | ||
baa69b12 | 121 | dram_end = dram_start + (CONFIG_ETRAX_DRAM_SIZE - __CONFIG_ETRAX_VMEM_SIZE)*1024*1024; |
023bf6f1 TH |
122 | |
123 | DISCARDS | |
51533b61 | 124 | } |