patch-2.0.11 linux/include/asm-alpha/elf.h

Next file: linux/include/asm-alpha/fcntl.h
Previous file: linux/fs/super.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.10/linux/include/asm-alpha/elf.h linux/include/asm-alpha/elf.h
@@ -5,7 +5,10 @@
  * ELF register definitions..
  */
 
-#define ELF_NGREG	32
+/* 
+ * Note: ELF_NGREG must ben the same as EF_SIZE/8.
+ */
+#define ELF_NGREG	33
 #define ELF_NFPREG	32
 
 typedef unsigned long elf_greg_t;
@@ -13,5 +16,26 @@
 
 typedef double elf_fpreg_t;
 typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
+
+/*
+ * This is used to ensure we don't load something for the wrong architecture.
+ */
+#define elf_check_arch(x) ((x) == EM_ALPHA)
+
+/*
+ * These are used to set parameters in the core dumps.
+ */
+#define ELF_CLASS	ELFCLASS64
+#define ELF_DATA	ELFDATA2LSB;
+#define ELF_ARCH	EM_ALPHA
+
+#define USE_ELF_CORE_DUMP
+#define ELF_EXEC_PAGESIZE	8192
+
+#define ELF_CORE_COPY_REGS(_dest,_regs)			\
+{ struct user _dump;					\
+	dump_thread(_regs, &_dump);			\
+	memcpy((char *) &_dest, (char *) &_dump.regs,	\
+	       sizeof(elf_gregset_t)); }
 
 #endif

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov