patch-2.4.21 linux-2.4.21/include/asm-alpha/elf.h
Next file: linux-2.4.21/include/asm-alpha/floppy.h
Previous file: linux-2.4.21/include/asm-alpha/dma.h
Back to the patch index
Back to the overall index
- Lines: 59
- Date:
2003-06-13 07:51:38.000000000 -0700
- Orig file:
linux-2.4.20/include/asm-alpha/elf.h
- Orig date:
2000-09-22 14:07:43.000000000 -0700
diff -urN linux-2.4.20/include/asm-alpha/elf.h linux-2.4.21/include/asm-alpha/elf.h
@@ -52,51 +52,13 @@
#define ELF_PLAT_INIT(_r) _r->r0 = 0
-/* Use the same format as the OSF/1 procfs interface. The register
- layout is sane. However, since dump_thread() creates the funky
- layout that ECOFF coredumps want, we need to undo that layout here.
- Eventually, it would be nice if the ECOFF core-dump had to do the
- translation, then ELF_CORE_COPY_REGS() would become trivial and
- faster. */
-#define ELF_CORE_COPY_REGS(_dest,_regs) \
-{ \
- struct user _dump; \
- \
- dump_thread(_regs, &_dump); \
- _dest[ 0] = _dump.regs[EF_V0]; \
- _dest[ 1] = _dump.regs[EF_T0]; \
- _dest[ 2] = _dump.regs[EF_T1]; \
- _dest[ 3] = _dump.regs[EF_T2]; \
- _dest[ 4] = _dump.regs[EF_T3]; \
- _dest[ 5] = _dump.regs[EF_T4]; \
- _dest[ 6] = _dump.regs[EF_T5]; \
- _dest[ 7] = _dump.regs[EF_T6]; \
- _dest[ 8] = _dump.regs[EF_T7]; \
- _dest[ 9] = _dump.regs[EF_S0]; \
- _dest[10] = _dump.regs[EF_S1]; \
- _dest[11] = _dump.regs[EF_S2]; \
- _dest[12] = _dump.regs[EF_S3]; \
- _dest[13] = _dump.regs[EF_S4]; \
- _dest[14] = _dump.regs[EF_S5]; \
- _dest[15] = _dump.regs[EF_S6]; \
- _dest[16] = _dump.regs[EF_A0]; \
- _dest[17] = _dump.regs[EF_A1]; \
- _dest[18] = _dump.regs[EF_A2]; \
- _dest[19] = _dump.regs[EF_A3]; \
- _dest[20] = _dump.regs[EF_A4]; \
- _dest[21] = _dump.regs[EF_A5]; \
- _dest[22] = _dump.regs[EF_T8]; \
- _dest[23] = _dump.regs[EF_T9]; \
- _dest[24] = _dump.regs[EF_T10]; \
- _dest[25] = _dump.regs[EF_T11]; \
- _dest[26] = _dump.regs[EF_RA]; \
- _dest[27] = _dump.regs[EF_T12]; \
- _dest[28] = _dump.regs[EF_AT]; \
- _dest[29] = _dump.regs[EF_GP]; \
- _dest[30] = _dump.regs[EF_SP]; \
- _dest[31] = _dump.regs[EF_PC]; /* store PC here */ \
- _dest[32] = _dump.regs[EF_PS]; \
-}
+/* The registers are layed out in pt_regs for PAL and syscall
+ convenience. Re-order them for the linear elf_gregset_t. */
+
+extern void dump_elf_thread(elf_greg_t *, struct pt_regs *,
+ struct task_struct *);
+#define ELF_CORE_COPY_REGS(DEST, REGS) \
+ dump_elf_thread(DEST, REGS, current);
/* This yields a mask that user programs can use to figure out what
instruction set this CPU supports. This is trivial on Alpha,
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)