typedef struct user_fpu_struct elf_fpregset_t;
 
-/*
- * This is used to ensure we don't load something for the wrong architecture.
- */
-#define elf_check_arch(x) ( (x)->e_machine == EM_SH )
-
 /*
  * These are used to set parameters in the core dumps.
  */
 #endif
 #define ELF_ARCH       EM_SH
 
+#ifdef __KERNEL__
+/*
+ * This is used to ensure we don't load something for the wrong architecture.
+ */
+#define elf_check_arch(x) ( (x)->e_machine == EM_SH )
+
 #define USE_ELF_CORE_DUMP
 #define ELF_EXEC_PAGESIZE      PAGE_SIZE
 
    For the moment, we have only optimizations for the Intel generations,
    but that could change... */
 
-#define ELF_PLATFORM  (NULL)
+#define ELF_PLATFORM   (utsname()->machine)
 
 #ifdef __SH5__
 #define ELF_PLAT_INIT(_r, load_addr) \
        NEW_AUX_ENT(AT_L2_CACHESHAPE, l2_cache_shape);          \
 } while (0)
 
+#endif /* __KERNEL__ */
 #endif /* __ASM_SH_ELF_H */