diff options
Diffstat (limited to 'arch/c6x/kernel/vmlinux.lds.S')
-rw-r--r-- | arch/c6x/kernel/vmlinux.lds.S | 162 |
1 files changed, 162 insertions, 0 deletions
diff --git a/arch/c6x/kernel/vmlinux.lds.S b/arch/c6x/kernel/vmlinux.lds.S new file mode 100644 index 000000000000..1d81c4c129ec --- /dev/null +++ b/arch/c6x/kernel/vmlinux.lds.S | |||
@@ -0,0 +1,162 @@ | |||
1 | /* | ||
2 | * ld script for the c6x kernel | ||
3 | * | ||
4 | * Copyright (C) 2010, 2011 Texas Instruments Incorporated | ||
5 | * Mark Salter <msalter@redhat.com> | ||
6 | */ | ||
7 | #include <asm-generic/vmlinux.lds.h> | ||
8 | #include <asm/thread_info.h> | ||
9 | #include <asm/page.h> | ||
10 | |||
11 | ENTRY(_c_int00) | ||
12 | |||
13 | #if defined(CONFIG_CPU_BIG_ENDIAN) | ||
14 | jiffies = jiffies_64 + 4; | ||
15 | #else | ||
16 | jiffies = jiffies_64; | ||
17 | #endif | ||
18 | |||
19 | #define READONLY_SEGMENT_START \ | ||
20 | . = PAGE_OFFSET; | ||
21 | #define READWRITE_SEGMENT_START \ | ||
22 | . = ALIGN(128); \ | ||
23 | _data_lma = .; | ||
24 | |||
25 | SECTIONS | ||
26 | { | ||
27 | /* | ||
28 | * Start kernel read only segment | ||
29 | */ | ||
30 | READONLY_SEGMENT_START | ||
31 | |||
32 | .vectors : | ||
33 | { | ||
34 | _vectors_start = .; | ||
35 | *(.vectors) | ||
36 | . = ALIGN(0x400); | ||
37 | _vectors_end = .; | ||
38 | } | ||
39 | |||
40 | . = ALIGN(0x1000); | ||
41 | .cmdline : | ||
42 | { | ||
43 | *(.cmdline) | ||
44 | } | ||
45 | |||
46 | /* | ||
47 | * This section contains data which may be shared with other | ||
48 | * cores. It needs to be a fixed offset from PAGE_OFFSET | ||
49 | * regardless of kernel configuration. | ||
50 | */ | ||
51 | .virtio_ipc_dev : | ||
52 | { | ||
53 | *(.virtio_ipc_dev) | ||
54 | } | ||
55 | |||
56 | . = ALIGN(PAGE_SIZE); | ||
57 | .init : | ||
58 | { | ||
59 | _stext = .; | ||
60 | _sinittext = .; | ||
61 | HEAD_TEXT | ||
62 | INIT_TEXT | ||
63 | _einittext = .; | ||
64 | } | ||
65 | |||
66 | __init_begin = _stext; | ||
67 | INIT_DATA_SECTION(16) | ||
68 | |||
69 | PERCPU_SECTION(128) | ||
70 | |||
71 | . = ALIGN(PAGE_SIZE); | ||
72 | __init_end = .; | ||
73 | |||
74 | .text : | ||
75 | { | ||
76 | _text = .; | ||
77 | TEXT_TEXT | ||
78 | SCHED_TEXT | ||
79 | LOCK_TEXT | ||
80 | IRQENTRY_TEXT | ||
81 | KPROBES_TEXT | ||
82 | *(.fixup) | ||
83 | *(.gnu.warning) | ||
84 | } | ||
85 | |||
86 | EXCEPTION_TABLE(16) | ||
87 | NOTES | ||
88 | |||
89 | RO_DATA_SECTION(PAGE_SIZE) | ||
90 | .const : | ||
91 | { | ||
92 | *(.const .const.* .gnu.linkonce.r.*) | ||
93 | *(.switch) | ||
94 | } | ||
95 | |||
96 | . = ALIGN (8) ; | ||
97 | __fdt_blob : AT(ADDR(__fdt_blob) - LOAD_OFFSET) | ||
98 | { | ||
99 | _fdt_start = . ; /* place for fdt blob */ | ||
100 | *(__fdt_blob) ; /* Any link-placed DTB */ | ||
101 | BYTE(0); /* section always has contents */ | ||
102 | . = _fdt_start + 0x4000; /* Pad up to 16kbyte */ | ||
103 | _fdt_end = . ; | ||
104 | } | ||
105 | |||
106 | _etext = .; | ||
107 | |||
108 | /* | ||
109 | * Start kernel read-write segment. | ||
110 | */ | ||
111 | READWRITE_SEGMENT_START | ||
112 | _sdata = .; | ||
113 | |||
114 | .fardata : AT(ADDR(.fardata) - LOAD_OFFSET) | ||
115 | { | ||
116 | INIT_TASK_DATA(THREAD_SIZE) | ||
117 | NOSAVE_DATA | ||
118 | PAGE_ALIGNED_DATA(PAGE_SIZE) | ||
119 | CACHELINE_ALIGNED_DATA(128) | ||
120 | READ_MOSTLY_DATA(128) | ||
121 | DATA_DATA | ||
122 | CONSTRUCTORS | ||
123 | *(.data1) | ||
124 | *(.fardata .fardata.*) | ||
125 | *(.data.debug_bpt) | ||
126 | } | ||
127 | |||
128 | .neardata ALIGN(8) : AT(ADDR(.neardata) - LOAD_OFFSET) | ||
129 | { | ||
130 | *(.neardata2 .neardata2.* .gnu.linkonce.s2.*) | ||
131 | *(.neardata .neardata.* .gnu.linkonce.s.*) | ||
132 | . = ALIGN(8); | ||
133 | } | ||
134 | |||
135 | _edata = .; | ||
136 | |||
137 | __bss_start = .; | ||
138 | SBSS(8) | ||
139 | BSS(8) | ||
140 | .far : | ||
141 | { | ||
142 | . = ALIGN(8); | ||
143 | *(.dynfar) | ||
144 | *(.far .far.* .gnu.linkonce.b.*) | ||
145 | . = ALIGN(8); | ||
146 | } | ||
147 | __bss_stop = .; | ||
148 | |||
149 | _end = .; | ||
150 | |||
151 | DWARF_DEBUG | ||
152 | |||
153 | /DISCARD/ : | ||
154 | { | ||
155 | EXIT_TEXT | ||
156 | EXIT_DATA | ||
157 | EXIT_CALL | ||
158 | *(.discard) | ||
159 | *(.discard.*) | ||
160 | *(.interp) | ||
161 | } | ||
162 | } | ||