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
|
diff --git a/src/mapi/mapi/entry_x86-64_tls.h b/src/mapi/mapi/entry_x86-64_tls.h
index 72d4125..cdcd0d0 100644
--- a/src/mapi/mapi/entry_x86-64_tls.h
+++ b/src/mapi/mapi/entry_x86-64_tls.h
@@ -28,6 +28,8 @@
#include "u_macros.h"
+#define HIDDEN __attribute__((visibility("hidden")))
+
#ifdef __linux__
__asm__(".section .note.ABI-tag, \"a\"\n\t"
".p2align 2\n\t"
@@ -76,8 +78,8 @@ entry_patch_public(void)
{
}
-static char
-x86_64_entry_start[];
+extern char
+x86_64_entry_start[] HIDDEN;
mapi_func
entry_get_public(int slot)
diff --git a/src/mapi/mapi/entry_x86_tls.h b/src/mapi/mapi/entry_x86_tls.h
index de91812..038730f 100644
--- a/src/mapi/mapi/entry_x86_tls.h
+++ b/src/mapi/mapi/entry_x86_tls.h
@@ -29,6 +29,8 @@
#include <string.h>
#include "u_macros.h"
+#define HIDDEN __attribute__((visibility("hidden")))
+
#ifdef __linux__
__asm__(".section .note.ABI-tag, \"a\"\n\t"
".p2align 2\n\t"
@@ -86,8 +88,8 @@ __asm__(".text");
extern unsigned long
x86_current_tls();
-static char x86_entry_start[];
-static char x86_entry_end[];
+extern char x86_entry_start[] HIDDEN;
+extern char x86_entry_end[] HIDDEN;
void
entry_patch_public(void)
diff --git a/src/mapi/mapi/entry_x86_tsd.h b/src/mapi/mapi/entry_x86_tsd.h
index c479c19..0e20cd6 100644
--- a/src/mapi/mapi/entry_x86_tsd.h
+++ b/src/mapi/mapi/entry_x86_tsd.h
@@ -28,6 +28,8 @@
#include "u_macros.h"
+#define HIDDEN __attribute__((visibility("hidden")))
+
#define X86_ENTRY_SIZE 32
__asm__(".text\n"
@@ -60,8 +62,8 @@ __asm__(".balign 32\n"
#include <string.h>
#include "u_execmem.h"
-static const char x86_entry_start[];
-static const char x86_entry_end[];
+extern const char x86_entry_start[] HIDDEN;
+extern const char x86_entry_end[] HIDDEN;
void
entry_patch_public(void)
|