diff options
Diffstat (limited to 'arch/m68k')
-rw-r--r-- | arch/m68k/include/asm/ptrace.h | 17 | ||||
-rw-r--r-- | arch/m68k/include/asm/socket.h | 2 | ||||
-rw-r--r-- | arch/m68k/include/asm/thread_info_mm.h | 5 | ||||
-rw-r--r-- | arch/m68k/kernel/entry.S | 6 | ||||
-rw-r--r-- | arch/m68k/kernel/process.c | 5 | ||||
-rw-r--r-- | arch/m68k/kernel/ptrace.c | 112 | ||||
-rw-r--r-- | arch/m68k/kernel/vmlinux-std.lds | 61 | ||||
-rw-r--r-- | arch/m68k/kernel/vmlinux-sun3.lds | 54 |
8 files changed, 95 insertions, 167 deletions
diff --git a/arch/m68k/include/asm/ptrace.h b/arch/m68k/include/asm/ptrace.h index 8c9194b98548..a6ab663bcc2e 100644 --- a/arch/m68k/include/asm/ptrace.h +++ b/arch/m68k/include/asm/ptrace.h | |||
@@ -71,6 +71,8 @@ struct switch_stack { | |||
71 | #define PTRACE_GETFPREGS 14 | 71 | #define PTRACE_GETFPREGS 14 |
72 | #define PTRACE_SETFPREGS 15 | 72 | #define PTRACE_SETFPREGS 15 |
73 | 73 | ||
74 | #define PTRACE_SINGLEBLOCK 33 /* resume execution until next branch */ | ||
75 | |||
74 | #ifdef __KERNEL__ | 76 | #ifdef __KERNEL__ |
75 | 77 | ||
76 | #ifndef PS_S | 78 | #ifndef PS_S |
@@ -82,6 +84,21 @@ struct switch_stack { | |||
82 | #define instruction_pointer(regs) ((regs)->pc) | 84 | #define instruction_pointer(regs) ((regs)->pc) |
83 | #define profile_pc(regs) instruction_pointer(regs) | 85 | #define profile_pc(regs) instruction_pointer(regs) |
84 | extern void show_regs(struct pt_regs *); | 86 | extern void show_regs(struct pt_regs *); |
87 | |||
88 | /* | ||
89 | * These are defined as per linux/ptrace.h, which see. | ||
90 | */ | ||
91 | struct task_struct; | ||
92 | |||
93 | #define arch_has_single_step() (1) | ||
94 | extern void user_enable_single_step(struct task_struct *); | ||
95 | extern void user_disable_single_step(struct task_struct *); | ||
96 | |||
97 | #ifdef CONFIG_MMU | ||
98 | #define arch_has_block_step() (1) | ||
99 | extern void user_enable_block_step(struct task_struct *); | ||
100 | #endif | ||
101 | |||
85 | #endif /* __KERNEL__ */ | 102 | #endif /* __KERNEL__ */ |
86 | #endif /* __ASSEMBLY__ */ | 103 | #endif /* __ASSEMBLY__ */ |
87 | #endif /* _M68K_PTRACE_H */ | 104 | #endif /* _M68K_PTRACE_H */ |
diff --git a/arch/m68k/include/asm/socket.h b/arch/m68k/include/asm/socket.h index eee01cce921b..9bf49c87d954 100644 --- a/arch/m68k/include/asm/socket.h +++ b/arch/m68k/include/asm/socket.h | |||
@@ -60,4 +60,6 @@ | |||
60 | #define SO_PROTOCOL 38 | 60 | #define SO_PROTOCOL 38 |
61 | #define SO_DOMAIN 39 | 61 | #define SO_DOMAIN 39 |
62 | 62 | ||
63 | #define SO_RXQ_OVFL 40 | ||
64 | |||
63 | #endif /* _ASM_SOCKET_H */ | 65 | #endif /* _ASM_SOCKET_H */ |
diff --git a/arch/m68k/include/asm/thread_info_mm.h b/arch/m68k/include/asm/thread_info_mm.h index b6da3882be9b..167e518db41b 100644 --- a/arch/m68k/include/asm/thread_info_mm.h +++ b/arch/m68k/include/asm/thread_info_mm.h | |||
@@ -4,10 +4,12 @@ | |||
4 | #ifndef ASM_OFFSETS_C | 4 | #ifndef ASM_OFFSETS_C |
5 | #include <asm/asm-offsets.h> | 5 | #include <asm/asm-offsets.h> |
6 | #endif | 6 | #endif |
7 | #include <asm/current.h> | ||
8 | #include <asm/types.h> | 7 | #include <asm/types.h> |
9 | #include <asm/page.h> | 8 | #include <asm/page.h> |
10 | 9 | ||
10 | #ifndef __ASSEMBLY__ | ||
11 | #include <asm/current.h> | ||
12 | |||
11 | struct thread_info { | 13 | struct thread_info { |
12 | struct task_struct *task; /* main task structure */ | 14 | struct task_struct *task; /* main task structure */ |
13 | unsigned long flags; | 15 | unsigned long flags; |
@@ -16,6 +18,7 @@ struct thread_info { | |||
16 | __u32 cpu; /* should always be 0 on m68k */ | 18 | __u32 cpu; /* should always be 0 on m68k */ |
17 | struct restart_block restart_block; | 19 | struct restart_block restart_block; |
18 | }; | 20 | }; |
21 | #endif /* __ASSEMBLY__ */ | ||
19 | 22 | ||
20 | #define PREEMPT_ACTIVE 0x4000000 | 23 | #define PREEMPT_ACTIVE 0x4000000 |
21 | 24 | ||
diff --git a/arch/m68k/kernel/entry.S b/arch/m68k/kernel/entry.S index c5b33634c980..77fc7c16bf48 100644 --- a/arch/m68k/kernel/entry.S +++ b/arch/m68k/kernel/entry.S | |||
@@ -179,7 +179,11 @@ do_signal_return: | |||
179 | addql #8,%sp | 179 | addql #8,%sp |
180 | RESTORE_SWITCH_STACK | 180 | RESTORE_SWITCH_STACK |
181 | addql #4,%sp | 181 | addql #4,%sp |
182 | jbra resume_userspace | 182 | tstl %d0 |
183 | jeq resume_userspace | ||
184 | | when single stepping into handler stop at the first insn | ||
185 | btst #6,%curptr@(TASK_INFO+TINFO_FLAGS+2) | ||
186 | jeq resume_userspace | ||
183 | 187 | ||
184 | do_delayed_trace: | 188 | do_delayed_trace: |
185 | bclr #7,%sp@(PT_OFF_SR) | clear trace bit in SR | 189 | bclr #7,%sp@(PT_OFF_SR) | clear trace bit in SR |
diff --git a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c index 41230c595a8e..05296593e718 100644 --- a/arch/m68k/kernel/process.c +++ b/arch/m68k/kernel/process.c | |||
@@ -317,15 +317,12 @@ asmlinkage int sys_execve(char __user *name, char __user * __user *argv, char __ | |||
317 | char * filename; | 317 | char * filename; |
318 | struct pt_regs *regs = (struct pt_regs *) &name; | 318 | struct pt_regs *regs = (struct pt_regs *) &name; |
319 | 319 | ||
320 | lock_kernel(); | ||
321 | filename = getname(name); | 320 | filename = getname(name); |
322 | error = PTR_ERR(filename); | 321 | error = PTR_ERR(filename); |
323 | if (IS_ERR(filename)) | 322 | if (IS_ERR(filename)) |
324 | goto out; | 323 | return error; |
325 | error = do_execve(filename, argv, envp, regs); | 324 | error = do_execve(filename, argv, envp, regs); |
326 | putname(filename); | 325 | putname(filename); |
327 | out: | ||
328 | unlock_kernel(); | ||
329 | return error; | 326 | return error; |
330 | } | 327 | } |
331 | 328 | ||
diff --git a/arch/m68k/kernel/ptrace.c b/arch/m68k/kernel/ptrace.c index 2075543c2d92..1fc217e5f06b 100644 --- a/arch/m68k/kernel/ptrace.c +++ b/arch/m68k/kernel/ptrace.c | |||
@@ -35,7 +35,9 @@ | |||
35 | #define SR_MASK 0x001f | 35 | #define SR_MASK 0x001f |
36 | 36 | ||
37 | /* sets the trace bits. */ | 37 | /* sets the trace bits. */ |
38 | #define TRACE_BITS 0x8000 | 38 | #define TRACE_BITS 0xC000 |
39 | #define T1_BIT 0x8000 | ||
40 | #define T0_BIT 0x4000 | ||
39 | 41 | ||
40 | /* Find the stack offset for a register, relative to thread.esp0. */ | 42 | /* Find the stack offset for a register, relative to thread.esp0. */ |
41 | #define PT_REG(reg) ((long)&((struct pt_regs *)0)->reg) | 43 | #define PT_REG(reg) ((long)&((struct pt_regs *)0)->reg) |
@@ -44,7 +46,7 @@ | |||
44 | /* Mapping from PT_xxx to the stack offset at which the register is | 46 | /* Mapping from PT_xxx to the stack offset at which the register is |
45 | saved. Notice that usp has no stack-slot and needs to be treated | 47 | saved. Notice that usp has no stack-slot and needs to be treated |
46 | specially (see get_reg/put_reg below). */ | 48 | specially (see get_reg/put_reg below). */ |
47 | static int regoff[] = { | 49 | static const int regoff[] = { |
48 | [0] = PT_REG(d1), | 50 | [0] = PT_REG(d1), |
49 | [1] = PT_REG(d2), | 51 | [1] = PT_REG(d2), |
50 | [2] = PT_REG(d3), | 52 | [2] = PT_REG(d3), |
@@ -79,6 +81,14 @@ static inline long get_reg(struct task_struct *task, int regno) | |||
79 | addr = (unsigned long *)(task->thread.esp0 + regoff[regno]); | 81 | addr = (unsigned long *)(task->thread.esp0 + regoff[regno]); |
80 | else | 82 | else |
81 | return 0; | 83 | return 0; |
84 | /* Need to take stkadj into account. */ | ||
85 | if (regno == PT_SR || regno == PT_PC) { | ||
86 | long stkadj = *(long *)(task->thread.esp0 + PT_REG(stkadj)); | ||
87 | addr = (unsigned long *) ((unsigned long)addr + stkadj); | ||
88 | /* The sr is actually a 16 bit register. */ | ||
89 | if (regno == PT_SR) | ||
90 | return *(unsigned short *)addr; | ||
91 | } | ||
82 | return *addr; | 92 | return *addr; |
83 | } | 93 | } |
84 | 94 | ||
@@ -96,6 +106,16 @@ static inline int put_reg(struct task_struct *task, int regno, | |||
96 | addr = (unsigned long *)(task->thread.esp0 + regoff[regno]); | 106 | addr = (unsigned long *)(task->thread.esp0 + regoff[regno]); |
97 | else | 107 | else |
98 | return -1; | 108 | return -1; |
109 | /* Need to take stkadj into account. */ | ||
110 | if (regno == PT_SR || regno == PT_PC) { | ||
111 | long stkadj = *(long *)(task->thread.esp0 + PT_REG(stkadj)); | ||
112 | addr = (unsigned long *) ((unsigned long)addr + stkadj); | ||
113 | /* The sr is actually a 16 bit register. */ | ||
114 | if (regno == PT_SR) { | ||
115 | *(unsigned short *)addr = data; | ||
116 | return 0; | ||
117 | } | ||
118 | } | ||
99 | *addr = data; | 119 | *addr = data; |
100 | return 0; | 120 | return 0; |
101 | } | 121 | } |
@@ -105,7 +125,7 @@ static inline int put_reg(struct task_struct *task, int regno, | |||
105 | */ | 125 | */ |
106 | static inline void singlestep_disable(struct task_struct *child) | 126 | static inline void singlestep_disable(struct task_struct *child) |
107 | { | 127 | { |
108 | unsigned long tmp = get_reg(child, PT_SR) & ~(TRACE_BITS << 16); | 128 | unsigned long tmp = get_reg(child, PT_SR) & ~TRACE_BITS; |
109 | put_reg(child, PT_SR, tmp); | 129 | put_reg(child, PT_SR, tmp); |
110 | clear_tsk_thread_flag(child, TIF_DELAYED_TRACE); | 130 | clear_tsk_thread_flag(child, TIF_DELAYED_TRACE); |
111 | } | 131 | } |
@@ -118,18 +138,30 @@ void ptrace_disable(struct task_struct *child) | |||
118 | singlestep_disable(child); | 138 | singlestep_disable(child); |
119 | } | 139 | } |
120 | 140 | ||
141 | void user_enable_single_step(struct task_struct *child) | ||
142 | { | ||
143 | unsigned long tmp = get_reg(child, PT_SR) & ~TRACE_BITS; | ||
144 | put_reg(child, PT_SR, tmp | T1_BIT); | ||
145 | set_tsk_thread_flag(child, TIF_DELAYED_TRACE); | ||
146 | } | ||
147 | |||
148 | void user_enable_block_step(struct task_struct *child) | ||
149 | { | ||
150 | unsigned long tmp = get_reg(child, PT_SR) & ~TRACE_BITS; | ||
151 | put_reg(child, PT_SR, tmp | T0_BIT); | ||
152 | } | ||
153 | |||
154 | void user_disable_single_step(struct task_struct *child) | ||
155 | { | ||
156 | singlestep_disable(child); | ||
157 | } | ||
158 | |||
121 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 159 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) |
122 | { | 160 | { |
123 | unsigned long tmp; | 161 | unsigned long tmp; |
124 | int i, ret = 0; | 162 | int i, ret = 0; |
125 | 163 | ||
126 | switch (request) { | 164 | switch (request) { |
127 | /* when I and D space are separate, these will need to be fixed. */ | ||
128 | case PTRACE_PEEKTEXT: /* read word at location addr. */ | ||
129 | case PTRACE_PEEKDATA: | ||
130 | ret = generic_ptrace_peekdata(child, addr, data); | ||
131 | break; | ||
132 | |||
133 | /* read the word at location addr in the USER area. */ | 165 | /* read the word at location addr in the USER area. */ |
134 | case PTRACE_PEEKUSR: | 166 | case PTRACE_PEEKUSR: |
135 | if (addr & 3) | 167 | if (addr & 3) |
@@ -138,8 +170,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
138 | 170 | ||
139 | if (addr >= 0 && addr < 19) { | 171 | if (addr >= 0 && addr < 19) { |
140 | tmp = get_reg(child, addr); | 172 | tmp = get_reg(child, addr); |
141 | if (addr == PT_SR) | ||
142 | tmp >>= 16; | ||
143 | } else if (addr >= 21 && addr < 49) { | 173 | } else if (addr >= 21 && addr < 49) { |
144 | tmp = child->thread.fp[addr - 21]; | 174 | tmp = child->thread.fp[addr - 21]; |
145 | /* Convert internal fpu reg representation | 175 | /* Convert internal fpu reg representation |
@@ -149,16 +179,10 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
149 | tmp = ((tmp & 0xffff0000) << 15) | | 179 | tmp = ((tmp & 0xffff0000) << 15) | |
150 | ((tmp & 0x0000ffff) << 16); | 180 | ((tmp & 0x0000ffff) << 16); |
151 | } else | 181 | } else |
152 | break; | 182 | goto out_eio; |
153 | ret = put_user(tmp, (unsigned long *)data); | 183 | ret = put_user(tmp, (unsigned long *)data); |
154 | break; | 184 | break; |
155 | 185 | ||
156 | /* when I and D space are separate, this will have to be fixed. */ | ||
157 | case PTRACE_POKETEXT: /* write the word at location addr. */ | ||
158 | case PTRACE_POKEDATA: | ||
159 | ret = generic_ptrace_pokedata(child, addr, data); | ||
160 | break; | ||
161 | |||
162 | case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ | 186 | case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ |
163 | if (addr & 3) | 187 | if (addr & 3) |
164 | goto out_eio; | 188 | goto out_eio; |
@@ -166,9 +190,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
166 | 190 | ||
167 | if (addr == PT_SR) { | 191 | if (addr == PT_SR) { |
168 | data &= SR_MASK; | 192 | data &= SR_MASK; |
169 | data <<= 16; | 193 | data |= get_reg(child, PT_SR) & ~SR_MASK; |
170 | data |= get_reg(child, PT_SR) & ~(SR_MASK << 16); | 194 | } |
171 | } else if (addr >= 0 && addr < 19) { | 195 | if (addr >= 0 && addr < 19) { |
172 | if (put_reg(child, addr, data)) | 196 | if (put_reg(child, addr, data)) |
173 | goto out_eio; | 197 | goto out_eio; |
174 | } else if (addr >= 21 && addr < 48) { | 198 | } else if (addr >= 21 && addr < 48) { |
@@ -185,52 +209,9 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
185 | goto out_eio; | 209 | goto out_eio; |
186 | break; | 210 | break; |
187 | 211 | ||
188 | case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */ | ||
189 | case PTRACE_CONT: /* restart after signal. */ | ||
190 | if (!valid_signal(data)) | ||
191 | goto out_eio; | ||
192 | |||
193 | if (request == PTRACE_SYSCALL) | ||
194 | set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | ||
195 | else | ||
196 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | ||
197 | child->exit_code = data; | ||
198 | singlestep_disable(child); | ||
199 | wake_up_process(child); | ||
200 | break; | ||
201 | |||
202 | /* | ||
203 | * make the child exit. Best I can do is send it a sigkill. | ||
204 | * perhaps it should be put in the status that it wants to | ||
205 | * exit. | ||
206 | */ | ||
207 | case PTRACE_KILL: | ||
208 | if (child->exit_state == EXIT_ZOMBIE) /* already dead */ | ||
209 | break; | ||
210 | child->exit_code = SIGKILL; | ||
211 | singlestep_disable(child); | ||
212 | wake_up_process(child); | ||
213 | break; | ||
214 | |||
215 | case PTRACE_SINGLESTEP: /* set the trap flag. */ | ||
216 | if (!valid_signal(data)) | ||
217 | goto out_eio; | ||
218 | |||
219 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | ||
220 | tmp = get_reg(child, PT_SR) | (TRACE_BITS << 16); | ||
221 | put_reg(child, PT_SR, tmp); | ||
222 | set_tsk_thread_flag(child, TIF_DELAYED_TRACE); | ||
223 | |||
224 | child->exit_code = data; | ||
225 | /* give it a chance to run. */ | ||
226 | wake_up_process(child); | ||
227 | break; | ||
228 | |||
229 | case PTRACE_GETREGS: /* Get all gp regs from the child. */ | 212 | case PTRACE_GETREGS: /* Get all gp regs from the child. */ |
230 | for (i = 0; i < 19; i++) { | 213 | for (i = 0; i < 19; i++) { |
231 | tmp = get_reg(child, i); | 214 | tmp = get_reg(child, i); |
232 | if (i == PT_SR) | ||
233 | tmp >>= 16; | ||
234 | ret = put_user(tmp, (unsigned long *)data); | 215 | ret = put_user(tmp, (unsigned long *)data); |
235 | if (ret) | 216 | if (ret) |
236 | break; | 217 | break; |
@@ -245,8 +226,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
245 | break; | 226 | break; |
246 | if (i == PT_SR) { | 227 | if (i == PT_SR) { |
247 | tmp &= SR_MASK; | 228 | tmp &= SR_MASK; |
248 | tmp <<= 16; | 229 | tmp |= get_reg(child, PT_SR) & ~SR_MASK; |
249 | tmp |= get_reg(child, PT_SR) & ~(SR_MASK << 16); | ||
250 | } | 230 | } |
251 | put_reg(child, i, tmp); | 231 | put_reg(child, i, tmp); |
252 | data += sizeof(long); | 232 | data += sizeof(long); |
diff --git a/arch/m68k/kernel/vmlinux-std.lds b/arch/m68k/kernel/vmlinux-std.lds index 47eac19e8f61..878be5f38cad 100644 --- a/arch/m68k/kernel/vmlinux-std.lds +++ b/arch/m68k/kernel/vmlinux-std.lds | |||
@@ -2,6 +2,7 @@ | |||
2 | 2 | ||
3 | #include <asm-generic/vmlinux.lds.h> | 3 | #include <asm-generic/vmlinux.lds.h> |
4 | #include <asm/page.h> | 4 | #include <asm/page.h> |
5 | #include <asm/thread_info.h> | ||
5 | 6 | ||
6 | OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", "elf32-m68k") | 7 | OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", "elf32-m68k") |
7 | OUTPUT_ARCH(m68k) | 8 | OUTPUT_ARCH(m68k) |
@@ -22,73 +23,37 @@ SECTIONS | |||
22 | 23 | ||
23 | _etext = .; /* End of text section */ | 24 | _etext = .; /* End of text section */ |
24 | 25 | ||
25 | . = ALIGN(16); /* Exception table */ | 26 | EXCEPTION_TABLE(16) |
26 | __start___ex_table = .; | ||
27 | __ex_table : { *(__ex_table) } | ||
28 | __stop___ex_table = .; | ||
29 | 27 | ||
30 | RODATA | 28 | RODATA |
31 | 29 | ||
32 | .data : { /* Data */ | 30 | RW_DATA_SECTION(16, PAGE_SIZE, THREAD_SIZE) |
33 | DATA_DATA | ||
34 | CONSTRUCTORS | ||
35 | } | ||
36 | 31 | ||
37 | . = ALIGN(16); | 32 | BSS_SECTION(0, 0, 0) |
38 | .data.cacheline_aligned : { *(.data.cacheline_aligned) } | ||
39 | |||
40 | .bss : { *(.bss) } /* BSS */ | ||
41 | 33 | ||
42 | _edata = .; /* End of data section */ | 34 | _edata = .; /* End of data section */ |
43 | 35 | ||
44 | /* will be freed after init */ | 36 | /* will be freed after init */ |
45 | . = ALIGN(PAGE_SIZE); /* Init code and data */ | 37 | . = ALIGN(PAGE_SIZE); /* Init code and data */ |
46 | __init_begin = .; | 38 | __init_begin = .; |
47 | .init.text : { | 39 | INIT_TEXT_SECTION(PAGE_SIZE) :data |
48 | _sinittext = .; | 40 | INIT_DATA_SECTION(16) |
49 | INIT_TEXT | ||
50 | _einittext = .; | ||
51 | } :data | ||
52 | .init.data : { INIT_DATA } | ||
53 | . = ALIGN(16); | ||
54 | __setup_start = .; | ||
55 | .init.setup : { *(.init.setup) } | ||
56 | __setup_end = .; | ||
57 | __initcall_start = .; | ||
58 | .initcall.init : { | ||
59 | INITCALLS | ||
60 | } | ||
61 | __initcall_end = .; | ||
62 | __con_initcall_start = .; | ||
63 | .con_initcall.init : { *(.con_initcall.init) } | ||
64 | __con_initcall_end = .; | ||
65 | .m68k_fixup : { | 41 | .m68k_fixup : { |
66 | __start_fixup = .; | 42 | __start_fixup = .; |
67 | *(.m68k_fixup) | 43 | *(.m68k_fixup) |
68 | __stop_fixup = .; | 44 | __stop_fixup = .; |
69 | } | 45 | } |
70 | SECURITY_INIT | ||
71 | #ifdef CONFIG_BLK_DEV_INITRD | ||
72 | . = ALIGN(8192); | ||
73 | __initramfs_start = .; | ||
74 | .init.ramfs : { *(.init.ramfs) } | ||
75 | __initramfs_end = .; | ||
76 | #endif | ||
77 | NOTES | 46 | NOTES |
78 | . = ALIGN(8192); | 47 | .init_end : { |
79 | __init_end = .; | 48 | /* This ALIGN be in a section so that _end is at the end of the |
80 | 49 | load segment. */ | |
81 | .data.init_task : { *(.data.init_task) } /* The initial task and kernel stack */ | 50 | . = ALIGN(PAGE_SIZE); |
51 | __init_end = .; | ||
52 | } | ||
82 | 53 | ||
83 | _end = . ; | 54 | _end = . ; |
84 | 55 | ||
85 | /* Stabs debugging sections. */ | 56 | STABS_DEBUG |
86 | .stab 0 : { *(.stab) } | ||
87 | .stabstr 0 : { *(.stabstr) } | ||
88 | .stab.excl 0 : { *(.stab.excl) } | ||
89 | .stab.exclstr 0 : { *(.stab.exclstr) } | ||
90 | .stab.index 0 : { *(.stab.index) } | ||
91 | .stab.indexstr 0 : { *(.stab.indexstr) } | ||
92 | .comment 0 : { *(.comment) } | 57 | .comment 0 : { *(.comment) } |
93 | 58 | ||
94 | /* Sections to be discarded */ | 59 | /* Sections to be discarded */ |
diff --git a/arch/m68k/kernel/vmlinux-sun3.lds b/arch/m68k/kernel/vmlinux-sun3.lds index 03efaf04d7d7..1ad6b7ad2c17 100644 --- a/arch/m68k/kernel/vmlinux-sun3.lds +++ b/arch/m68k/kernel/vmlinux-sun3.lds | |||
@@ -2,6 +2,7 @@ | |||
2 | 2 | ||
3 | #include <asm-generic/vmlinux.lds.h> | 3 | #include <asm-generic/vmlinux.lds.h> |
4 | #include <asm/page.h> | 4 | #include <asm/page.h> |
5 | #include <asm/thread_info.h> | ||
5 | 6 | ||
6 | OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", "elf32-m68k") | 7 | OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", "elf32-m68k") |
7 | OUTPUT_ARCH(m68k) | 8 | OUTPUT_ARCH(m68k) |
@@ -23,14 +24,8 @@ SECTIONS | |||
23 | 24 | ||
24 | _etext = .; /* End of text section */ | 25 | _etext = .; /* End of text section */ |
25 | 26 | ||
26 | .data : { /* Data */ | 27 | EXCEPTION_TABLE(16) :data |
27 | DATA_DATA | 28 | RW_DATA_SECTION(16, PAGE_SIZE, THREAD_SIZE) :data |
28 | CONSTRUCTORS | ||
29 | . = ALIGN(16); /* Exception table */ | ||
30 | __start___ex_table = .; | ||
31 | *(__ex_table) | ||
32 | __stop___ex_table = .; | ||
33 | } :data | ||
34 | /* End of data goes *here* so that freeing init code works properly. */ | 29 | /* End of data goes *here* so that freeing init code works properly. */ |
35 | _edata = .; | 30 | _edata = .; |
36 | NOTES | 31 | NOTES |
@@ -38,56 +33,21 @@ SECTIONS | |||
38 | /* will be freed after init */ | 33 | /* will be freed after init */ |
39 | . = ALIGN(PAGE_SIZE); /* Init code and data */ | 34 | . = ALIGN(PAGE_SIZE); /* Init code and data */ |
40 | __init_begin = .; | 35 | __init_begin = .; |
41 | .init.text : { | 36 | INIT_TEXT_SECTION(PAGE_SIZE) |
42 | _sinittext = .; | 37 | INIT_DATA_SECTION(16) |
43 | INIT_TEXT | ||
44 | _einittext = .; | ||
45 | } | ||
46 | .init.data : { INIT_DATA } | ||
47 | . = ALIGN(16); | ||
48 | __setup_start = .; | ||
49 | .init.setup : { *(.init.setup) } | ||
50 | __setup_end = .; | ||
51 | __initcall_start = .; | ||
52 | .initcall.init : { | ||
53 | INITCALLS | ||
54 | } | ||
55 | __initcall_end = .; | ||
56 | __con_initcall_start = .; | ||
57 | .con_initcall.init : { *(.con_initcall.init) } | ||
58 | __con_initcall_end = .; | ||
59 | .m68k_fixup : { | 38 | .m68k_fixup : { |
60 | __start_fixup = .; | 39 | __start_fixup = .; |
61 | *(.m68k_fixup) | 40 | *(.m68k_fixup) |
62 | __stop_fixup = .; | 41 | __stop_fixup = .; |
63 | } | 42 | } |
64 | SECURITY_INIT | ||
65 | #ifdef CONFIG_BLK_DEV_INITRD | ||
66 | . = ALIGN(PAGE_SIZE); | ||
67 | __initramfs_start = .; | ||
68 | .init.ramfs : { *(.init.ramfs) } | ||
69 | __initramfs_end = .; | ||
70 | #endif | ||
71 | . = ALIGN(PAGE_SIZE); | 43 | . = ALIGN(PAGE_SIZE); |
72 | __init_end = .; | 44 | __init_end = .; |
73 | .data.init.task : { *(.data.init_task) } | ||
74 | |||
75 | 45 | ||
76 | .bss : { *(.bss) } /* BSS */ | 46 | BSS_SECTION(0, 0, 0) |
77 | 47 | ||
78 | _end = . ; | 48 | _end = . ; |
79 | 49 | ||
80 | .crap : { | 50 | STABS_DEBUG |
81 | /* Stabs debugging sections. */ | ||
82 | *(.stab) | ||
83 | *(.stabstr) | ||
84 | *(.stab.excl) | ||
85 | *(.stab.exclstr) | ||
86 | *(.stab.index) | ||
87 | *(.stab.indexstr) | ||
88 | *(.comment) | ||
89 | *(.note) | ||
90 | } | ||
91 | 51 | ||
92 | /* Sections to be discarded */ | 52 | /* Sections to be discarded */ |
93 | DISCARDS | 53 | DISCARDS |