]>
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 : { | |
f9f3f864 | 43 | HEAD_TEXT |
baa69b12 | 44 | TEXT_TEXT |
51533b61 | 45 | SCHED_TEXT |
6727ad9e | 46 | CPUIDLE_TEXT |
51533b61 MS |
47 | LOCK_TEXT |
48 | *(.fixup) | |
49 | *(.text.__*) | |
50 | } | |
51 | ||
c5ec6fb0 | 52 | _etext = . ; /* End of text section. */ |
51533b61 MS |
53 | __etext = .; |
54 | ||
24924ece | 55 | EXCEPTION_TABLE(4) |
51533b61 | 56 | |
473e162e | 57 | _sdata = .; |
51533b61 MS |
58 | RODATA |
59 | ||
60 | . = ALIGN (4); | |
61 | ___data_start = . ; | |
62 | __Sdata = . ; | |
c5ec6fb0 | 63 | .data : { /* Data */ |
dcb313c2 JN |
64 | CACHELINE_ALIGNED_DATA(32) |
65 | READ_MOSTLY_DATA(32) | |
5c617c6f | 66 | DATA_DATA |
51533b61 | 67 | } |
c5ec6fb0 | 68 | __edata = . ; /* End of data section. */ |
51533b61 MS |
69 | _edata = . ; |
70 | ||
b5effd38 PZ |
71 | BUG_TABLE |
72 | ||
24924ece | 73 | INIT_TASK_DATA_SECTION(PAGE_SIZE) |
51533b61 | 74 | |
c5ec6fb0 | 75 | . = ALIGN(PAGE_SIZE); /* Init code and data. */ |
baa69b12 | 76 | __init_begin = .; |
24924ece | 77 | INIT_TEXT_SECTION(PAGE_SIZE) |
01ba2bdc | 78 | .init.data : { INIT_DATA } |
24924ece | 79 | .init.setup : { INIT_SETUP(16) } |
baa69b12 | 80 | .initcall.init : { |
24924ece | 81 | INIT_CALLS |
51533b61 MS |
82 | } |
83 | ||
84 | .con_initcall.init : { | |
24924ece | 85 | CON_INITCALL |
51533b61 MS |
86 | } |
87 | SECURITY_INIT | |
88 | ||
7c8a25b5 JN |
89 | /* .exit.text is discarded at runtime, not link time, |
90 | * to deal with references from __bug_table | |
91 | */ | |
92 | .exit.text : { | |
93 | EXIT_TEXT | |
94 | } | |
95 | .exit.data : { | |
96 | EXIT_DATA | |
97 | } | |
98 | ||
c5ec6fb0 JN |
99 | #ifdef CONFIG_ETRAX_ARCH_V10 |
100 | #ifdef CONFIG_BLK_DEV_INITRD | |
101 | .init.ramfs : { | |
102 | __initramfs_start = .; | |
103 | *(.init.ramfs) | |
104 | __initramfs_end = .; | |
105 | } | |
106 | #endif | |
107 | #endif | |
108 | __vmlinux_end = .; /* Last address of the physical file. */ | |
109 | #ifdef CONFIG_ETRAX_ARCH_V32 | |
0415b00d | 110 | PERCPU_SECTION(32) |
51533b61 MS |
111 | |
112 | .init.ramfs : { | |
24924ece | 113 | INIT_RAM_FS |
51533b61 | 114 | } |
c5ec6fb0 | 115 | #endif |
51533b61 | 116 | |
baa69b12 JN |
117 | /* |
118 | * We fill to the next page, so we can discard all init | |
119 | * pages without needing to consider what payload might be | |
120 | * appended to the kernel image. | |
121 | */ | |
c5ec6fb0 | 122 | . = ALIGN(PAGE_SIZE); |
baa69b12 JN |
123 | |
124 | __init_end = .; | |
51533b61 | 125 | |
c5ec6fb0 | 126 | __data_end = . ; /* Move to _edata ? */ |
85d98657 | 127 | BSS_SECTION(1, 1, 1) |
51533b61 MS |
128 | |
129 | . = ALIGN (0x20); | |
130 | _end = .; | |
131 | __end = .; | |
132 | ||
baa69b12 | 133 | dram_end = dram_start + (CONFIG_ETRAX_DRAM_SIZE - __CONFIG_ETRAX_VMEM_SIZE)*1024*1024; |
023bf6f1 TH |
134 | |
135 | DISCARDS | |
51533b61 | 136 | } |