aboutsummaryrefslogtreecommitdiffstats
path: root/arch/c6x/kernel
diff options
context:
space:
mode:
authorAurelien Jacquiot <a-jacquiot@ti.com>2011-10-04 10:54:51 -0400
committerMark Salter <msalter@redhat.com>2011-10-06 19:47:25 -0400
commitc278400c52c14203894c5dc0d63cf385239d8329 (patch)
treea3f82945b3ebb49b058e99cefdafca65732b041a /arch/c6x/kernel
parente66d3c490c7a45daa49c1ae9cc5fe0687d14b823 (diff)
C6X: build infrastructure
Original port to early 2.6 kernel using TI COFF toolchain. Brought up to date by Mark Salter <msalter@redhat.com> Signed-off-by: Aurelien Jacquiot <a-jacquiot@ti.com> Signed-off-by: Mark Salter <msalter@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/c6x/kernel')
-rw-r--r--arch/c6x/kernel/Makefile12
-rw-r--r--arch/c6x/kernel/vmlinux.lds.S162
2 files changed, 174 insertions, 0 deletions
diff --git a/arch/c6x/kernel/Makefile b/arch/c6x/kernel/Makefile
new file mode 100644
index 00000000000..580a515a944
--- /dev/null
+++ b/arch/c6x/kernel/Makefile
@@ -0,0 +1,12 @@
1#
2# Makefile for arch/c6x/kernel/
3#
4
5extra-y := head.o vmlinux.lds
6
7obj-y := process.o traps.o irq.o signal.o ptrace.o
8obj-y += setup.o sys_c6x.o time.o devicetree.o
9obj-y += switch_to.o entry.o vectors.o c6x_ksyms.o
10obj-y += soc.o dma.o
11
12obj-$(CONFIG_MODULES) += module.o
diff --git a/arch/c6x/kernel/vmlinux.lds.S b/arch/c6x/kernel/vmlinux.lds.S
new file mode 100644
index 00000000000..1d81c4c129e
--- /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
11ENTRY(_c_int00)
12
13#if defined(CONFIG_CPU_BIG_ENDIAN)
14jiffies = jiffies_64 + 4;
15#else
16jiffies = 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
25SECTIONS
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}