patch-2.1.79 linux/include/asm-sparc/elf.h

Next file: linux/include/asm-sparc/head.h
Previous file: linux/include/asm-sparc/delay.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.78/linux/include/asm-sparc/elf.h linux/include/asm-sparc/elf.h
@@ -1,4 +1,4 @@
-/* $Id: elf.h,v 1.7 1997/08/29 17:04:34 richard Exp $ */
+/* $Id: elf.h,v 1.11 1997/09/26 18:37:32 tdyas Exp $ */
 #ifndef __ASMSPARC_ELF_H
 #define __ASMSPARC_ELF_H
 
@@ -7,6 +7,7 @@
  */
 
 #include <asm/ptrace.h>
+#include <asm/mbus.h>
 
 typedef unsigned long elf_greg_t;
 
@@ -37,5 +38,30 @@
 
 #define ELF_ET_DYN_BASE         (TASK_UNMAPPED_BASE + 0x1000000)
 
+/* This yields a mask that user programs can use to figure out what
+   instruction set this cpu supports.  This can NOT be done in userspace
+   on Sparc.  */
+
+/* Sun4c has none of the capabilities, most sun4m's have them all.
+ * XXX This is gross, set some global variable at boot time. -DaveM
+ */
+#define ELF_HWCAP	((sparc_cpu_model == sun4c) ? 0 : \
+			 (HWCAP_SPARC_FLUSH | HWCAP_SPARC_STBAR | \
+			  HWCAP_SPARC_SWAP | \
+			  ((srmmu_modtype != Cypress && \
+			    srmmu_modtype != Cypress_vE && \
+			    srmmu_modtype != Cypress_vD) ? \
+			   HWCAP_SPARC_MULDIV : 0)))
+
+/* This yields a string that ld.so will use to load implementation
+   specific libraries for optimization.  This is more specific in
+   intent than poking at uname or /proc/cpuinfo.  */
+
+#define ELF_PLATFORM	(NULL)
+
+#ifdef __KERNEL__
+#define SET_PERSONALITY(ibcs2) \
+	current->personality = (ibcs2 ? PER_SVR4 : PER_LINUX)
+#endif
 
 #endif /* !(__ASMSPARC_ELF_H) */

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