History

arm64: make asm/elf.h available to asm files

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.

Ard Biesheuvel committed 10 years ago

Commit 4a2e0341 parent 2bf31a41 file · +13 −9Browse files

Unified · Split

arch/arm64/include/asm/elf.h+13−9
@@ -24,15 +24,6 @@ · 23 unmodified lines
24#include <asm/ptrace.h>24#include <asm/ptrace.h>
25#include <asm/user.h>25#include <asm/user.h>
26 26
27typedef 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
33typedef elf_greg_t elf_gregset_t[ELF_NGREG];
34typedef struct user_fpsimd_state elf_fpregset_t;
35
36/*27/*
37 * AArch64 static relocation types.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#define ELF_ET_DYN_BASE (2 * TASK_SIZE_64 / 3)119#define ELF_ET_DYN_BASE (2 * TASK_SIZE_64 / 3)
129 120
121#ifndef __ASSEMBLY__
122
123typedef 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
129typedef elf_greg_t elf_gregset_t[ELF_NGREG];
130typedef struct user_fpsimd_state elf_fpregset_t;
131
130/*132/*
131 * When the program starts, a1 contains a pointer to a function to be133 * When the program starts, a1 contains a pointer to a function to be
132 * registered with atexit, as per the SVR4 ABI. A value of 0 means we have no134 * 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#endif /* CONFIG_COMPAT */189#endif /* CONFIG_COMPAT */
188 190
191#endif /* !__ASSEMBLY__ */
192
189#endif193#endif