Go to the documentation of this file.
9 #ifndef _ASM_POWERPC_ELF_H
10 #define _ASM_POWERPC_ELF_H
12 #include <linux/sched.h>
14 #include <asm/string.h>
15 #include <uapi/asm/elf.h>
20 #define elf_check_arch(x) ((x)->e_machine == ELF_ARCH)
21 #define compat_elf_check_arch(x) ((x)->e_machine == EM_PPC)
23 #define CORE_DUMP_USE_REGSET
24 #define ELF_EXEC_PAGESIZE PAGE_SIZE
32 #define ELF_ET_DYN_BASE (randomize_et_dyn(0x20000000))
43 #define PPC_ELF_CORE_COPY_REGS(elf_regs, regs) \
44 int i, nregs = min(sizeof(*regs) / sizeof(unsigned long), \
46 for (i = 0; i < nregs; i++) \
47 elf_regs[i] = ((unsigned long *) regs)[i]; \
48 memset(&elf_regs[i], 0, (ELF_NGREG - i) * sizeof(elf_regs[0]))
51 static inline void ppc_elf_core_copy_regs(
elf_gregset_t elf_regs,
56 #define ELF_CORE_COPY_REGS(gregs, regs) ppc_elf_core_copy_regs(gregs, regs);
63 # define ELF_HWCAP (cur_cpu_spec->cpu_user_features)
69 #define ELF_PLATFORM (cur_cpu_spec->platform)
77 #define ELF_BASE_PLATFORM (powerpc_base_platform)
80 # define ELF_PLAT_INIT(_r, load_addr) do { \
81 _r->gpr[2] = load_addr; \
86 # define SET_PERSONALITY(ex) \
88 if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \
89 set_thread_flag(TIF_32BIT); \
91 clear_thread_flag(TIF_32BIT); \
92 if (personality(current->personality) != PER_LINUX32) \
93 set_personality(PER_LINUX | \
94 (current->personality & (~PER_MASK))); \
103 # define elf_read_implies_exec(ex, exec_stk) (is_32bit_task() ? \
104 (exec_stk == EXSTACK_DEFAULT) : 0)
106 # define SET_PERSONALITY(ex) \
107 set_personality(PER_LINUX | (current->personality & (~PER_MASK)))
108 # define elf_read_implies_exec(ex, exec_stk) (exec_stk == EXSTACK_DEFAULT)
116 #define ARCH_HAS_SETUP_ADDITIONAL_PAGES
120 #define VDSO_AUX_ENT(a,b) NEW_AUX_ENT(a,b)
123 #define STACK_RND_MASK (is_32bit_task() ? \
124 (0x7ff >> (PAGE_SHIFT - 12)) : \
125 (0x3ffff >> (PAGE_SHIFT - 12)))
128 #define arch_randomize_brk arch_randomize_brk
131 #ifdef CONFIG_SPU_BASE
135 #define ARCH_HAVE_EXTRA_ELF_NOTES