Commit | Line | Data |
---|---|---|
16bfeaf2 MS |
1 | /* |
2 | * Copyright (C) 2008-2009 Michal Simek <monstr@monstr.eu> | |
3 | * Copyright (C) 2008-2009 PetaLogix | |
4 | * Copyright (C) 2006 Atmark Techno, Inc. | |
5 | * | |
6 | * This file is subject to the terms and conditions of the GNU General Public | |
7 | * License. See the file "COPYING" in the main directory of this archive | |
8 | * for more details. | |
9 | */ | |
10 | ||
16bfeaf2 | 11 | OUTPUT_ARCH(microblaze) |
ca28b510 | 12 | ENTRY(microblaze_start) |
16bfeaf2 | 13 | |
8cc11f5a | 14 | #include <asm/page.h> |
a061dd52 | 15 | #include <asm-generic/vmlinux.lds.h> |
8cc11f5a | 16 | #include <asm/thread_info.h> |
16bfeaf2 | 17 | |
02b08045 MS |
18 | #ifdef __MICROBLAZEEL__ |
19 | jiffies = jiffies_64; | |
20 | #else | |
16bfeaf2 | 21 | jiffies = jiffies_64 + 4; |
02b08045 | 22 | #endif |
16bfeaf2 MS |
23 | |
24 | SECTIONS { | |
d4c1285e | 25 | . = CONFIG_KERNEL_START; |
ca28b510 | 26 | microblaze_start = CONFIG_KERNEL_BASE_ADDR; |
a061dd52 | 27 | .text : AT(ADDR(.text) - LOAD_OFFSET) { |
16bfeaf2 MS |
28 | _text = . ; |
29 | _stext = . ; | |
7a0248e8 SM |
30 | HEAD_TEXT |
31 | TEXT_TEXT | |
16bfeaf2 | 32 | *(.fixup) |
7cf79d59 MS |
33 | EXIT_TEXT |
34 | EXIT_CALL | |
16bfeaf2 | 35 | SCHED_TEXT |
6727ad9e | 36 | CPUIDLE_TEXT |
16bfeaf2 MS |
37 | LOCK_TEXT |
38 | KPROBES_TEXT | |
7cf79d59 | 39 | IRQENTRY_TEXT |
be7635e7 | 40 | SOFTIRQENTRY_TEXT |
16bfeaf2 MS |
41 | . = ALIGN (4) ; |
42 | _etext = . ; | |
43 | } | |
44 | ||
45 | . = ALIGN (4) ; | |
a061dd52 MS |
46 | __fdt_blob : AT(ADDR(__fdt_blob) - LOAD_OFFSET) { |
47 | _fdt_start = . ; /* place for fdt blob */ | |
48 | *(__fdt_blob) ; /* Any link-placed DTB */ | |
3a1d2676 | 49 | . = _fdt_start + 0x8000; /* Pad up to 32kbyte */ |
a061dd52 MS |
50 | _fdt_end = . ; |
51 | } | |
16bfeaf2 MS |
52 | |
53 | . = ALIGN(16); | |
54 | RODATA | |
8cc11f5a | 55 | EXCEPTION_TABLE(16) |
0f7e3640 | 56 | NOTES |
16bfeaf2 MS |
57 | |
58 | /* | |
59 | * sdata2 section can go anywhere, but must be word aligned | |
60 | * and SDA2_BASE must point to the middle of it | |
61 | */ | |
a061dd52 | 62 | .sdata2 : AT(ADDR(.sdata2) - LOAD_OFFSET) { |
16bfeaf2 | 63 | _ssrw = .; |
ba9c4f88 | 64 | . = ALIGN(PAGE_SIZE); /* page aligned when MMU used */ |
16bfeaf2 MS |
65 | *(.sdata2) |
66 | . = ALIGN(8); | |
67 | _essrw = .; | |
68 | _ssrw_size = _essrw - _ssrw; | |
69 | _KERNEL_SDA2_BASE_ = _ssrw + (_ssrw_size / 2); | |
70 | } | |
71 | ||
72 | _sdata = . ; | |
8cc11f5a | 73 | RW_DATA_SECTION(32, PAGE_SIZE, THREAD_SIZE) |
16bfeaf2 MS |
74 | _edata = . ; |
75 | ||
16bfeaf2 MS |
76 | /* Under the microblaze ABI, .sdata and .sbss must be contiguous */ |
77 | . = ALIGN(8); | |
a061dd52 | 78 | .sdata : AT(ADDR(.sdata) - LOAD_OFFSET) { |
16bfeaf2 MS |
79 | _ssro = .; |
80 | *(.sdata) | |
81 | } | |
82 | ||
a061dd52 | 83 | .sbss : AT(ADDR(.sbss) - LOAD_OFFSET) { |
16bfeaf2 MS |
84 | _ssbss = .; |
85 | *(.sbss) | |
86 | _esbss = .; | |
87 | _essro = .; | |
88 | _ssro_size = _essro - _ssro ; | |
89 | _KERNEL_SDA_BASE_ = _ssro + (_ssro_size / 2) ; | |
90 | } | |
91 | ||
13cdee23 | 92 | . = ALIGN(PAGE_SIZE); |
16bfeaf2 MS |
93 | __init_begin = .; |
94 | ||
8cc11f5a | 95 | INIT_TEXT_SECTION(PAGE_SIZE) |
16bfeaf2 | 96 | |
a061dd52 | 97 | .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) { |
05bf7d46 MS |
98 | INIT_DATA |
99 | } | |
16bfeaf2 MS |
100 | |
101 | . = ALIGN(4); | |
a061dd52 | 102 | .init.ivt : AT(ADDR(.init.ivt) - LOAD_OFFSET) { |
16bfeaf2 MS |
103 | __ivt_start = .; |
104 | *(.init.ivt) | |
105 | __ivt_end = .; | |
106 | } | |
107 | ||
a061dd52 | 108 | .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) { |
8cc11f5a | 109 | INIT_SETUP(0) |
16bfeaf2 MS |
110 | } |
111 | ||
a061dd52 | 112 | .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET ) { |
8cc11f5a | 113 | INIT_CALLS |
16bfeaf2 MS |
114 | } |
115 | ||
a061dd52 | 116 | .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) { |
8cc11f5a | 117 | CON_INITCALL |
16bfeaf2 MS |
118 | } |
119 | ||
120 | __init_end_before_initramfs = .; | |
121 | ||
8cb473da MS |
122 | .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { |
123 | INIT_RAM_FS | |
16bfeaf2 | 124 | } |
8cb473da | 125 | |
16bfeaf2 MS |
126 | __init_end = .; |
127 | ||
ba9c4f88 | 128 | .bss ALIGN (PAGE_SIZE) : AT(ADDR(.bss) - LOAD_OFFSET) { |
a061dd52 | 129 | /* page aligned when MMU used */ |
16bfeaf2 MS |
130 | __bss_start = . ; |
131 | *(.bss*) | |
132 | *(COMMON) | |
133 | . = ALIGN (4) ; | |
134 | __bss_stop = . ; | |
16bfeaf2 | 135 | } |
ba9c4f88 | 136 | . = ALIGN(PAGE_SIZE); |
16bfeaf2 | 137 | _end = .; |
405d967d | 138 | |
023bf6f1 | 139 | DISCARDS |
16bfeaf2 | 140 | } |