99#ifndef __ASM_ARC_ELF_H
1010#define __ASM_ARC_ELF_H
1111
12- #include <asm/ptrace.h>
12+ #include <linux/types.h>
13+ #include <uapi/asm/elf.h>
1314
15+ /* These ELF defines belong to uapi but libc elf.h already defines them */
1416#define EM_ARCOMPACT 93
1517
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-
2118/* ARC Relocations (kernel Modules only) */
2219#define R_ARC_32 0x4
2320#define R_ARC_32_ME 0x1B
2421#define R_ARC_S25H_PCREL 0x10
2522#define R_ARC_S25W_PCREL 0x11
2623
27- typedef unsigned long elf_greg_t ;
28- typedef unsigned long elf_fpregset_t ;
24+ /*to set parameters in the core dumps */
25+ #define ELF_ARCH EM_ARCOMPACT
26+ #define ELF_CLASS ELFCLASS32
2927
30- #define ELF_NGREG (sizeof(struct user_regs_struct) / sizeof(elf_greg_t))
31- typedef elf_greg_t elf_gregset_t [ELF_NGREG ];
28+ #ifdef CONFIG_CPU_BIG_ENDIAN
29+ #define ELF_DATA ELFDATA2MSB
30+ #else
31+ #define ELF_DATA ELFDATA2LSB
32+ #endif
3233
3334/*
3435 * To ensure that
@@ -39,20 +40,6 @@ struct elf32_hdr;
3940extern int elf_check_arch (const struct elf32_hdr * );
4041#define elf_check_arch elf_check_arch
4142
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-
5643#define CORE_DUMP_USE_REGSET
5744
5845#define ELF_EXEC_PAGESIZE PAGE_SIZE
@@ -88,6 +75,4 @@ extern int elf_check_arch(const struct elf32_hdr *);
8875#define SET_PERSONALITY (ex ) \
8976 set_personality(PER_LINUX | (current->personality & (~PER_MASK)))
9077
91- #endif /* __KERNEL__ */
92-
9378#endif
0 commit comments