1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
From a05af27aec00eacf533ff111ba8eb3dec328d9af Mon Sep 17 00:00:00 2001
From: Kurt Mahan <kmahan@freescale.com>
Date: Thu, 22 May 2008 11:20:53 -0600
Subject: [PATCH] Initial vDSO header changes.
LTIBName: mcfv4e-vdso-headers
Signed-off-by: Kurt Mahan <kmahan@freescale.com>
---
include/asm-m68k/auxvec.h | 9 +++++++++
include/asm-m68k/elf.h | 31 +++++++++++++++++++++++++++++++
include/asm-m68k/page.h | 5 +++++
3 files changed, 45 insertions(+), 0 deletions(-)
--- a/include/asm-m68k/auxvec.h
+++ b/include/asm-m68k/auxvec.h
@@ -1,4 +1,13 @@
#ifndef __ASMm68k_AUXVEC_H
#define __ASMm68k_AUXVEC_H
+/*
+ * Architecture-neutral AT_ values in 0-17, leave some room
+ * for more of them.
+ */
+
+#ifdef CONFIG_VSYSCALL
+/* Entry point to the vsyscall page */
+#define AT_SYSINFO_EHDR 33
+#endif
#endif
--- a/include/asm-m68k/elf.h
+++ b/include/asm-m68k/elf.h
@@ -136,4 +136,35 @@ typedef struct user_m68kfp_struct elf_fp
#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
+/*
+ * VDSO
+ */
+#ifdef CONFIG_VSYSCALL
+extern unsigned int vdso_enabled;
+
+#define VDSO_BASE ((unsigned long)current->mm->context.vdso)
+#define VDSO_SYM(x) (VDSO_BASE + (unsigned long)(x))
+
+#define VSYSCALL_AUX_ENT \
+ if (vdso_enabled) \
+ NEW_AUX_ENT(AT_SYSINFO_EHDR, VDSO_BASE);
+
+/* additional pages */
+#define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1
+
+struct linux_binprm;
+extern int arch_setup_additional_pages(struct linux_binprm *bprm,
+ int executable_stack);
+
+#else
+/* no VSYSCALL_AUX_ENT */
+#define VSYSCALL_AUX_ENT
+#endif
+
+#define ARCH_DLINFO \
+do { \
+ /* vsyscall entry */ \
+ VSYSCALL_AUX_ENT; \
+} while (0);
+
#endif
--- a/include/asm-m68k/page.h
+++ b/include/asm-m68k/page.h
@@ -252,4 +252,9 @@ static inline __attribute_const__ int __
#include <asm-generic/page.h>
+#ifdef CONFIG_VSYSCALL
+/* vDSO support */
+#define __HAVE_ARCH_GATE_AREA
+#endif
+
#endif /* _M68K_PAGE_H */
|