This reshuffles some code in asm/elf.h and puts a #ifndef __ASSEMBLY__ around its C definitions so that the CPP defines can be used in asm source files as well.
Unified · Split
| @@ -24,15 +24,6 @@ · 23 unmodified lines | ||
| 24 | 24 | #include <asm/ptrace.h> |
| 25 | 25 | #include <asm/user.h> |
| 26 | 26 | |
| 27 | −typedef unsigned long elf_greg_t; | |
| 28 | − | |
| 29 | −#define ELF_NGREG (sizeof(struct user_pt_regs) / sizeof(elf_greg_t)) | |
| 30 | −#define ELF_CORE_COPY_REGS(dest, regs) \ | |
| 31 | − *(struct user_pt_regs *)&(dest) = (regs)->user_regs; | |
| 32 | − | |
| 33 | −typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | |
| 34 | −typedef struct user_fpsimd_state elf_fpregset_t; | |
| 35 | − | |
| 36 | 27 | /* |
| 37 | 28 | * AArch64 static relocation types. |
| 38 | 29 | */ |
| @@ -127,6 +118,17 @@ typedef struct user_fpsimd_state elf_fpregset_t; · 88 unmodified lines | ||
| 127 | 118 | */ |
| 128 | 119 | #define ELF_ET_DYN_BASE (2 * TASK_SIZE_64 / 3) |
| 129 | 120 | |
| 121 | +#ifndef __ASSEMBLY__ | |
| 122 | + | |
| 123 | +typedef unsigned long elf_greg_t; | |
| 124 | + | |
| 125 | +#define ELF_NGREG (sizeof(struct user_pt_regs) / sizeof(elf_greg_t)) | |
| 126 | +#define ELF_CORE_COPY_REGS(dest, regs) \ | |
| 127 | + *(struct user_pt_regs *)&(dest) = (regs)->user_regs; | |
| 128 | + | |
| 129 | +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | |
| 130 | +typedef struct user_fpsimd_state elf_fpregset_t; | |
| 131 | + | |
| 130 | 132 | /* |
| 131 | 133 | * When the program starts, a1 contains a pointer to a function to be |
| 132 | 134 | * registered with atexit, as per the SVR4 ABI. A value of 0 means we have no |
| @@ -186,4 +188,6 @@ extern int aarch32_setup_vectors_page(struct linux_binprm *bprm, · 53 unmodified lines | ||
| 186 | 188 | |
| 187 | 189 | #endif /* CONFIG_COMPAT */ |
| 188 | 190 | |
| 191 | +#endif /* !__ASSEMBLY__ */ | |
| 192 | + | |
| 189 | 193 | #endif |