aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-sh')
-rw-r--r--include/asm-sh/elf.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/asm-sh/elf.h b/include/asm-sh/elf.h
index 61960408e6ef..9a95f8cb2e13 100644
--- a/include/asm-sh/elf.h
+++ b/include/asm-sh/elf.h
@@ -63,11 +63,6 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG];
63typedef struct user_fpu_struct elf_fpregset_t; 63typedef struct user_fpu_struct elf_fpregset_t;
64 64
65/* 65/*
66 * This is used to ensure we don't load something for the wrong architecture.
67 */
68#define elf_check_arch(x) ( (x)->e_machine == EM_SH )
69
70/*
71 * These are used to set parameters in the core dumps. 66 * These are used to set parameters in the core dumps.
72 */ 67 */
73#define ELF_CLASS ELFCLASS32 68#define ELF_CLASS ELFCLASS32
@@ -78,6 +73,12 @@ typedef struct user_fpu_struct elf_fpregset_t;
78#endif 73#endif
79#define ELF_ARCH EM_SH 74#define ELF_ARCH EM_SH
80 75
76#ifdef __KERNEL__
77/*
78 * This is used to ensure we don't load something for the wrong architecture.
79 */
80#define elf_check_arch(x) ( (x)->e_machine == EM_SH )
81
81#define USE_ELF_CORE_DUMP 82#define USE_ELF_CORE_DUMP
82#define ELF_EXEC_PAGESIZE PAGE_SIZE 83#define ELF_EXEC_PAGESIZE PAGE_SIZE
83 84
@@ -106,7 +107,7 @@ typedef struct user_fpu_struct elf_fpregset_t;
106 For the moment, we have only optimizations for the Intel generations, 107 For the moment, we have only optimizations for the Intel generations,
107 but that could change... */ 108 but that could change... */
108 109
109#define ELF_PLATFORM (NULL) 110#define ELF_PLATFORM (utsname()->machine)
110 111
111#ifdef __SH5__ 112#ifdef __SH5__
112#define ELF_PLAT_INIT(_r, load_addr) \ 113#define ELF_PLAT_INIT(_r, load_addr) \
@@ -182,4 +183,5 @@ do { \
182 NEW_AUX_ENT(AT_L2_CACHESHAPE, l2_cache_shape); \ 183 NEW_AUX_ENT(AT_L2_CACHESHAPE, l2_cache_shape); \
183} while (0) 184} while (0)
184 185
186#endif /* __KERNEL__ */
185#endif /* __ASM_SH_ELF_H */ 187#endif /* __ASM_SH_ELF_H */