]>
Commit | Line | Data |
---|---|---|
b920de1b DH |
1 | /* MN10300 Main kernel linker script |
2 | * | |
3 | * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. | |
4 | * Written by David Howells (dhowells@redhat.com) | |
5 | * | |
6 | * This program is free software; you can redistribute it and/or | |
7 | * modify it under the terms of the GNU General Public Licence | |
8 | * as published by the Free Software Foundation; either version | |
9 | * 2 of the Licence, or (at your option) any later version. | |
10 | */ | |
11 | #define __VMLINUX_LDS__ | |
12 | #include <asm-generic/vmlinux.lds.h> | |
13 | #include <asm/thread_info.h> | |
cb32898c | 14 | #include <asm/page.h> |
b920de1b DH |
15 | |
16 | OUTPUT_FORMAT("elf32-am33lin", "elf32-am33lin", "elf32-am33lin") | |
17 | OUTPUT_ARCH(mn10300) | |
18 | ENTRY(_start) | |
19 | jiffies = jiffies_64; | |
20 | #ifndef CONFIG_MN10300_CURRENT_IN_E2 | |
21 | current = __current; | |
22 | #endif | |
23 | SECTIONS | |
24 | { | |
25 | . = CONFIG_KERNEL_TEXT_ADDRESS; | |
26 | /* read-only */ | |
27 | _stext = .; | |
28 | _text = .; /* Text and read-only data */ | |
29 | .text : { | |
9760f8fc | 30 | HEAD_TEXT |
b920de1b DH |
31 | TEXT_TEXT |
32 | SCHED_TEXT | |
6727ad9e | 33 | CPUIDLE_TEXT |
b920de1b DH |
34 | LOCK_TEXT |
35 | KPROBES_TEXT | |
36 | *(.fixup) | |
37 | *(.gnu.warning) | |
38 | } = 0xcb | |
39 | ||
40 | _etext = .; /* End of text section */ | |
41 | ||
2e8b5a09 | 42 | EXCEPTION_TABLE(16) |
b920de1b DH |
43 | BUG_TABLE |
44 | ||
2e8b5a09 | 45 | RO_DATA(PAGE_SIZE) |
b920de1b DH |
46 | |
47 | /* writeable */ | |
40182373 | 48 | _sdata = .; /* Start of rw data section */ |
4295f8b3 TA |
49 | RW_DATA_SECTION(32, PAGE_SIZE, THREAD_SIZE) |
50 | _edata = .; | |
b920de1b DH |
51 | |
52 | /* might get freed after init */ | |
cb32898c | 53 | . = ALIGN(PAGE_SIZE); |
b920de1b DH |
54 | .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) { |
55 | __smp_locks = .; | |
56 | *(.smp_locks) | |
57 | __smp_locks_end = .; | |
58 | } | |
59 | ||
60 | /* will be freed after init */ | |
cb32898c | 61 | . = ALIGN(PAGE_SIZE); /* Init code and data */ |
b920de1b | 62 | __init_begin = .; |
4295f8b3 TA |
63 | INIT_TEXT_SECTION(PAGE_SIZE) |
64 | INIT_DATA_SECTION(16) | |
b920de1b DH |
65 | . = ALIGN(4); |
66 | __alt_instructions = .; | |
67 | .altinstructions : { *(.altinstructions) } | |
68 | __alt_instructions_end = .; | |
69 | .altinstr_replacement : { *(.altinstr_replacement) } | |
70 | /* .exit.text is discard at runtime, not link time, to deal with references | |
71 | from .altinstructions and .eh_frame */ | |
2e8b5a09 DH |
72 | .exit.text : { EXIT_TEXT; } |
73 | .exit.data : { EXIT_DATA; } | |
b920de1b | 74 | |
0415b00d | 75 | PERCPU_SECTION(32) |
cb32898c | 76 | . = ALIGN(PAGE_SIZE); |
b920de1b DH |
77 | __init_end = .; |
78 | /* freed after init ends here */ | |
79 | ||
04e448d9 | 80 | BSS_SECTION(0, PAGE_SIZE, 4) |
b920de1b DH |
81 | |
82 | _end = . ; | |
83 | ||
84 | /* This is where the kernel creates the early boot page tables */ | |
cb32898c | 85 | . = ALIGN(PAGE_SIZE); |
b920de1b DH |
86 | pg0 = .; |
87 | ||
b920de1b DH |
88 | STABS_DEBUG |
89 | ||
90 | DWARF_DEBUG | |
023bf6f1 TH |
91 | |
92 | /* Sections to be discarded */ | |
93 | DISCARDS | |
b920de1b | 94 | } |