summaryrefslogtreecommitdiffstats
path: root/include/asm-sh
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-12-10 16:06:32 +0900
committerPaul Mundt <lethal@linux-sh.org>2008-01-28 13:19:00 +0900
commita9f1365e5e4963705f85a6381cbed74c5615dbac (patch)
tree0100b7dd16fd55bdcd57261ddb8f2cae9047ed6b /include/asm-sh
parentcd01204b82933754a7276838656420477f64d4b8 (diff)
downloadblackbird-op-linux-a9f1365e5e4963705f85a6381cbed74c5615dbac.tar.gz
blackbird-op-linux-a9f1365e5e4963705f85a6381cbed74c5615dbac.zip
sh: Use utsname()->machine for ELF_PLATFORM.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
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];
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.
*/
#define ELF_CLASS ELFCLASS32
@@ -78,6 +73,12 @@ typedef struct user_fpu_struct elf_fpregset_t;
#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
@@ -106,7 +107,7 @@ typedef struct user_fpu_struct elf_fpregset_t;
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) \
@@ -182,4 +183,5 @@ do { \
NEW_AUX_ENT(AT_L2_CACHESHAPE, l2_cache_shape); \
} while (0)
+#endif /* __KERNEL__ */
#endif /* __ASM_SH_ELF_H */
OpenPOWER on IntegriCloud