aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2008-02-08 07:19:28 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 12:22:30 -0500
commit7fa3031500ec9b0a7460c8c23751799006ffee74 (patch)
tree2a7e9202b35a39dc8217e95825263c0629e67e35 /arch/alpha
parentb0b933c08bd5fd053bbba8ba6387f543be03d49f (diff)
aout: suppress A.OUT library support if !CONFIG_ARCH_SUPPORTS_AOUT
Suppress A.OUT library support if CONFIG_ARCH_SUPPORTS_AOUT is not set. Not all architectures support the A.OUT binfmt, so the ELF binfmt should not be permitted to go looking for A.OUT libraries to load in such a case. Not only that, but under such conditions A.OUT core dumps are not produced either. To make this work, this patch also does the following: (1) Makes the existence of the contents of linux/a.out.h contingent on CONFIG_ARCH_SUPPORTS_AOUT. (2) Renames dump_thread() to aout_dump_thread() as it's only called by A.OUT core dumping code. (3) Moves aout_dump_thread() into asm/a.out-core.h and makes it inline. This is then included only where needed. This means that this bit of arch code will be stored in the appropriate A.OUT binfmt module rather than the core kernel. (4) Drops A.OUT support for Blackfin (according to Mike Frysinger it's not needed) and FRV. This patch depends on the previous patch to move STACK_TOP[_MAX] out of asm/a.out.h and into asm/processor.h as they're required whether or not A.OUT format is available. [jdike@addtoit.com: uml: re-remove accidentally restored code] Signed-off-by: David Howells <dhowells@redhat.com> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/alpha')
-rw-r--r--arch/alpha/kernel/process.c62
1 files changed, 0 insertions, 62 deletions
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c
index 92b61629fe3f..9aed47763787 100644
--- a/arch/alpha/kernel/process.c
+++ b/arch/alpha/kernel/process.c
@@ -318,68 +318,6 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
318} 318}
319 319
320/* 320/*
321 * Fill in the user structure for an ECOFF core dump.
322 */
323void
324dump_thread(struct pt_regs * pt, struct user * dump)
325{
326 /* switch stack follows right below pt_regs: */
327 struct switch_stack * sw = ((struct switch_stack *) pt) - 1;
328
329 dump->magic = CMAGIC;
330 dump->start_code = current->mm->start_code;
331 dump->start_data = current->mm->start_data;
332 dump->start_stack = rdusp() & ~(PAGE_SIZE - 1);
333 dump->u_tsize = ((current->mm->end_code - dump->start_code)
334 >> PAGE_SHIFT);
335 dump->u_dsize = ((current->mm->brk + PAGE_SIZE-1 - dump->start_data)
336 >> PAGE_SHIFT);
337 dump->u_ssize = (current->mm->start_stack - dump->start_stack
338 + PAGE_SIZE-1) >> PAGE_SHIFT;
339
340 /*
341 * We store the registers in an order/format that is
342 * compatible with DEC Unix/OSF/1 as this makes life easier
343 * for gdb.
344 */
345 dump->regs[EF_V0] = pt->r0;
346 dump->regs[EF_T0] = pt->r1;
347 dump->regs[EF_T1] = pt->r2;
348 dump->regs[EF_T2] = pt->r3;
349 dump->regs[EF_T3] = pt->r4;
350 dump->regs[EF_T4] = pt->r5;
351 dump->regs[EF_T5] = pt->r6;
352 dump->regs[EF_T6] = pt->r7;
353 dump->regs[EF_T7] = pt->r8;
354 dump->regs[EF_S0] = sw->r9;
355 dump->regs[EF_S1] = sw->r10;
356 dump->regs[EF_S2] = sw->r11;
357 dump->regs[EF_S3] = sw->r12;
358 dump->regs[EF_S4] = sw->r13;
359 dump->regs[EF_S5] = sw->r14;
360 dump->regs[EF_S6] = sw->r15;
361 dump->regs[EF_A3] = pt->r19;
362 dump->regs[EF_A4] = pt->r20;
363 dump->regs[EF_A5] = pt->r21;
364 dump->regs[EF_T8] = pt->r22;
365 dump->regs[EF_T9] = pt->r23;
366 dump->regs[EF_T10] = pt->r24;
367 dump->regs[EF_T11] = pt->r25;
368 dump->regs[EF_RA] = pt->r26;
369 dump->regs[EF_T12] = pt->r27;
370 dump->regs[EF_AT] = pt->r28;
371 dump->regs[EF_SP] = rdusp();
372 dump->regs[EF_PS] = pt->ps;
373 dump->regs[EF_PC] = pt->pc;
374 dump->regs[EF_GP] = pt->gp;
375 dump->regs[EF_A0] = pt->r16;
376 dump->regs[EF_A1] = pt->r17;
377 dump->regs[EF_A2] = pt->r18;
378 memcpy((char *)dump->regs + EF_SIZE, sw->fp, 32 * 8);
379}
380EXPORT_SYMBOL(dump_thread);
381
382/*
383 * Fill in the user structure for a ELF core dump. 321 * Fill in the user structure for a ELF core dump.
384 */ 322 */
385void 323void