diff options
| -rw-r--r-- | arch/arc/include/asm/elf.h | 37 | ||||
| -rw-r--r-- | arch/arc/include/uapi/asm/Kbuild | 1 | ||||
| -rw-r--r-- | arch/arc/include/uapi/asm/elf.h | 26 |
3 files changed, 38 insertions, 26 deletions
diff --git a/arch/arc/include/asm/elf.h b/arch/arc/include/asm/elf.h index 265d030a7aad..f4c8d36ebecb 100644 --- a/arch/arc/include/asm/elf.h +++ b/arch/arc/include/asm/elf.h | |||
| @@ -9,26 +9,27 @@ | |||
| 9 | #ifndef __ASM_ARC_ELF_H | 9 | #ifndef __ASM_ARC_ELF_H |
| 10 | #define __ASM_ARC_ELF_H | 10 | #define __ASM_ARC_ELF_H |
| 11 | 11 | ||
| 12 | #include <asm/ptrace.h> | 12 | #include <linux/types.h> |
| 13 | #include <uapi/asm/elf.h> | ||
| 13 | 14 | ||
| 15 | /* These ELF defines belong to uapi but libc elf.h already defines them */ | ||
| 14 | #define EM_ARCOMPACT 93 | 16 | #define EM_ARCOMPACT 93 |
| 15 | 17 | ||
| 16 | /* Machine specific ELF Hdr flags */ | ||
| 17 | #define EF_ARC_OSABI_MSK 0x00000f00 | ||
| 18 | #define EF_ARC_OSABI_ORIG 0x00000000 /* MUST be zero for back-compat */ | ||
| 19 | #define EF_ARC_OSABI_CURRENT 0x00000300 /* v3 (no legacy syscalls) */ | ||
| 20 | |||
| 21 | /* ARC Relocations (kernel Modules only) */ | 18 | /* ARC Relocations (kernel Modules only) */ |
| 22 | #define R_ARC_32 0x4 | 19 | #define R_ARC_32 0x4 |
| 23 | #define R_ARC_32_ME 0x1B | 20 | #define R_ARC_32_ME 0x1B |
| 24 | #define R_ARC_S25H_PCREL 0x10 | 21 | #define R_ARC_S25H_PCREL 0x10 |
| 25 | #define R_ARC_S25W_PCREL 0x11 | 22 | #define R_ARC_S25W_PCREL 0x11 |
| 26 | 23 | ||
| 27 | typedef unsigned long elf_greg_t; | 24 | /*to set parameters in the core dumps */ |
| 28 | typedef unsigned long elf_fpregset_t; | 25 | #define ELF_ARCH EM_ARCOMPACT |
| 26 | #define ELF_CLASS ELFCLASS32 | ||
| 29 | 27 | ||
| 30 | #define ELF_NGREG (sizeof(struct user_regs_struct) / sizeof(elf_greg_t)) | 28 | #ifdef CONFIG_CPU_BIG_ENDIAN |
| 31 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | 29 | #define ELF_DATA ELFDATA2MSB |
| 30 | #else | ||
| 31 | #define ELF_DATA ELFDATA2LSB | ||
| 32 | #endif | ||
| 32 | 33 | ||
| 33 | /* | 34 | /* |
| 34 | * To ensure that | 35 | * To ensure that |
| @@ -39,20 +40,6 @@ struct elf32_hdr; | |||
| 39 | extern int elf_check_arch(const struct elf32_hdr *); | 40 | extern int elf_check_arch(const struct elf32_hdr *); |
| 40 | #define elf_check_arch elf_check_arch | 41 | #define elf_check_arch elf_check_arch |
| 41 | 42 | ||
| 42 | /* | ||
| 43 | * These are used to set parameters in the core dumps. | ||
| 44 | */ | ||
| 45 | #define ELF_ARCH EM_ARCOMPACT | ||
| 46 | #define ELF_CLASS ELFCLASS32 | ||
| 47 | |||
| 48 | #ifdef CONFIG_CPU_BIG_ENDIAN | ||
| 49 | #define ELF_DATA ELFDATA2MSB | ||
| 50 | #else | ||
| 51 | #define ELF_DATA ELFDATA2LSB | ||
| 52 | #endif | ||
| 53 | |||
| 54 | #ifdef __KERNEL__ | ||
| 55 | |||
| 56 | #define CORE_DUMP_USE_REGSET | 43 | #define CORE_DUMP_USE_REGSET |
| 57 | 44 | ||
| 58 | #define ELF_EXEC_PAGESIZE PAGE_SIZE | 45 | #define ELF_EXEC_PAGESIZE PAGE_SIZE |
| @@ -88,6 +75,4 @@ extern int elf_check_arch(const struct elf32_hdr *); | |||
| 88 | #define SET_PERSONALITY(ex) \ | 75 | #define SET_PERSONALITY(ex) \ |
| 89 | set_personality(PER_LINUX | (current->personality & (~PER_MASK))) | 76 | set_personality(PER_LINUX | (current->personality & (~PER_MASK))) |
| 90 | 77 | ||
| 91 | #endif /* __KERNEL__ */ | ||
| 92 | |||
| 93 | #endif | 78 | #endif |
diff --git a/arch/arc/include/uapi/asm/Kbuild b/arch/arc/include/uapi/asm/Kbuild index 27362446c710..18fefaea73fd 100644 --- a/arch/arc/include/uapi/asm/Kbuild +++ b/arch/arc/include/uapi/asm/Kbuild | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | # UAPI Header export list | 1 | # UAPI Header export list |
| 2 | include include/uapi/asm-generic/Kbuild.asm | 2 | include include/uapi/asm-generic/Kbuild.asm |
| 3 | header-y += elf.h | ||
| 3 | header-y += page.h | 4 | header-y += page.h |
| 4 | header-y += setup.h | 5 | header-y += setup.h |
| 5 | header-y += byteorder.h | 6 | header-y += byteorder.h |
diff --git a/arch/arc/include/uapi/asm/elf.h b/arch/arc/include/uapi/asm/elf.h new file mode 100644 index 000000000000..0f99ac8fcbb2 --- /dev/null +++ b/arch/arc/include/uapi/asm/elf.h | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License version 2 as | ||
| 6 | * published by the Free Software Foundation. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef _UAPI__ASM_ARC_ELF_H | ||
| 10 | #define _UAPI__ASM_ARC_ELF_H | ||
| 11 | |||
| 12 | #include <asm/ptrace.h> /* for user_regs_struct */ | ||
| 13 | |||
| 14 | /* Machine specific ELF Hdr flags */ | ||
| 15 | #define EF_ARC_OSABI_MSK 0x00000f00 | ||
| 16 | #define EF_ARC_OSABI_ORIG 0x00000000 /* MUST be zero for back-compat */ | ||
| 17 | #define EF_ARC_OSABI_CURRENT 0x00000300 /* v3 (no legacy syscalls) */ | ||
| 18 | |||
| 19 | typedef unsigned long elf_greg_t; | ||
| 20 | typedef unsigned long elf_fpregset_t; | ||
| 21 | |||
| 22 | #define ELF_NGREG (sizeof(struct user_regs_struct) / sizeof(elf_greg_t)) | ||
| 23 | |||
| 24 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | ||
| 25 | |||
| 26 | #endif | ||
