aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-s390/elf.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-s390/elf.h')
-rw-r--r--include/asm-s390/elf.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/include/asm-s390/elf.h b/include/asm-s390/elf.h
index b73a424d0f97..b3ac262c4582 100644
--- a/include/asm-s390/elf.h
+++ b/include/asm-s390/elf.h
@@ -115,6 +115,7 @@ typedef s390_regs elf_gregset_t;
115 115
116#include <linux/sched.h> /* for task_struct */ 116#include <linux/sched.h> /* for task_struct */
117#include <asm/system.h> /* for save_access_regs */ 117#include <asm/system.h> /* for save_access_regs */
118#include <asm/mmu_context.h>
118 119
119/* 120/*
120 * This is used to ensure we don't load something for the wrong architecture. 121 * This is used to ensure we don't load something for the wrong architecture.
@@ -137,14 +138,7 @@ typedef s390_regs elf_gregset_t;
137 use of this is to invoke "./ld.so someprog" to test out a new version of 138 use of this is to invoke "./ld.so someprog" to test out a new version of
138 the loader. We need to make sure that it is out of the way of the program 139 the loader. We need to make sure that it is out of the way of the program
139 that it will "exec", and that there is sufficient room for the brk. */ 140 that it will "exec", and that there is sufficient room for the brk. */
140 141#define ELF_ET_DYN_BASE (STACK_TOP / 3 * 2)
141#ifndef __s390x__
142#define ELF_ET_DYN_BASE ((TASK_SIZE & 0x80000000) \
143 ? TASK_SIZE / 3 * 2 \
144 : 2 * TASK_SIZE / 3)
145#else /* __s390x__ */
146#define ELF_ET_DYN_BASE (TASK_SIZE / 3 * 2)
147#endif /* __s390x__ */
148 142
149/* Wow, the "main" arch needs arch dependent functions too.. :) */ 143/* Wow, the "main" arch needs arch dependent functions too.. :) */
150 144
@@ -214,4 +208,16 @@ do { \
214} while (0) 208} while (0)
215#endif /* __s390x__ */ 209#endif /* __s390x__ */
216 210
211/*
212 * An executable for which elf_read_implies_exec() returns TRUE will
213 * have the READ_IMPLIES_EXEC personality flag set automatically.
214 */
215#define elf_read_implies_exec(ex, executable_stack) \
216({ \
217 if (current->mm->context.noexec && \
218 executable_stack != EXSTACK_DISABLE_X) \
219 disable_noexec(current->mm, current); \
220 current->mm->context.noexec == 0; \
221})
222
217#endif 223#endif