-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathmusl-no-vdso.patch
58 lines (52 loc) · 1.95 KB
/
musl-no-vdso.patch
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
diff --git a/arch/i386/syscall_arch.h b/arch/i386/syscall_arch.h
index 22b0b28b..8f79ed81 100644
--- a/arch/i386/syscall_arch.h
+++ b/arch/i386/syscall_arch.h
@@ -3,7 +3,7 @@
((union { long long ll; long l[2]; }){ .ll = x }).l[1]
#define __SYSCALL_LL_O(x) __SYSCALL_LL_E((x))
-#if SYSCALL_NO_TLS
+#if 1 || SYSCALL_NO_TLS
#define SYSCALL_INSNS "int $128"
#else
#define SYSCALL_INSNS "call *%%gs:16"
@@ -82,8 +82,8 @@ static inline long __syscall6(long n, long a1, long a2, long a3, long a4, long a
return __ret;
}
-#define VDSO_USEFUL
-#define VDSO_CGT_SYM "__vdso_clock_gettime"
-#define VDSO_CGT_VER "LINUX_2.6"
+// #define VDSO_USEFUL
+// #define VDSO_CGT_SYM "__vdso_clock_gettime"
+// #define VDSO_CGT_VER "LINUX_2.6"
#define SYSCALL_USE_SOCKETCALL
diff --git a/arch/x86_64/syscall_arch.h b/arch/x86_64/syscall_arch.h
index 92d5c179..4112d9c2 100644
--- a/arch/x86_64/syscall_arch.h
+++ b/arch/x86_64/syscall_arch.h
@@ -61,10 +61,10 @@ static __inline long __syscall6(long n, long a1, long a2, long a3, long a4, long
return ret;
}
-#define VDSO_USEFUL
-#define VDSO_CGT_SYM "__vdso_clock_gettime"
-#define VDSO_CGT_VER "LINUX_2.6"
-#define VDSO_GETCPU_SYM "__vdso_getcpu"
-#define VDSO_GETCPU_VER "LINUX_2.6"
+// #define VDSO_USEFUL
+// #define VDSO_CGT_SYM "__vdso_clock_gettime"
+// #define VDSO_CGT_VER "LINUX_2.6"
+// #define VDSO_GETCPU_SYM "__vdso_getcpu"
+// #define VDSO_GETCPU_VER "LINUX_2.6"
#define IPC_64 0
diff --git a/src/env/__libc_start_main.c b/src/env/__libc_start_main.c
index 8fbe5262..48beb3a2 100644
--- a/src/env/__libc_start_main.c
+++ b/src/env/__libc_start_main.c
@@ -28,7 +28,7 @@ void __init_libc(char **envp, char *pn)
libc.auxv = auxv = (void *)(envp+i+1);
for (i=0; auxv[i]; i+=2) if (auxv[i]<AUX_CNT) aux[auxv[i]] = auxv[i+1];
__hwcap = aux[AT_HWCAP];
- if (aux[AT_SYSINFO]) __sysinfo = aux[AT_SYSINFO];
+ // if (aux[AT_SYSINFO]) __sysinfo = aux[AT_SYSINFO];
libc.page_size = aux[AT_PAGESZ];
if (!pn) pn = (void*)aux[AT_EXECFN];