[Mesa-dev] [PATCH 2/2 v2] add visibility hidden to tls entry points
Marc Dietrich
marvin24 at gmx.de
Tue Feb 17 01:05:14 PST 2015
Avoid redefined symbol errors in clang. Based on a suggestion from
Rafael Ãvila de EspÃndola <rafael.espindola at gmail.com> in
http://llvm.org/bugs/show_bug.cgi?id=19778.
Signed-off-by: Marc Dietrich <marvin24 at gmx.de>
---
v2: no change
src/mapi/entry_x86-64_tls.h | 3 ++-
src/mapi/entry_x86_tls.h | 5 +++--
src/mapi/entry_x86_tsd.h | 5 +++--
3 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/mapi/entry_x86-64_tls.h b/src/mapi/entry_x86-64_tls.h
index 71e9d60..d36556c 100644
--- a/src/mapi/entry_x86-64_tls.h
+++ b/src/mapi/entry_x86-64_tls.h
@@ -26,6 +26,7 @@
*/
#include "u_macros.h"
+#include "../util/macros.h"
__asm__(".text\n"
".balign 32\n"
@@ -62,7 +63,7 @@ entry_patch_public(void)
{
}
-static char
+extern char HIDDEN
x86_64_entry_start[];
mapi_func
diff --git a/src/mapi/entry_x86_tls.h b/src/mapi/entry_x86_tls.h
index fa7bc15..1926638 100644
--- a/src/mapi/entry_x86_tls.h
+++ b/src/mapi/entry_x86_tls.h
@@ -27,6 +27,7 @@
#include <string.h>
#include "u_macros.h"
+#include "../util/macros.h"
__asm__(".text");
@@ -72,8 +73,8 @@ __asm__(".text");
extern unsigned long
x86_current_tls();
-static char x86_entry_start[];
-static char x86_entry_end[];
+extern char HIDDEN x86_entry_start[];
+extern char HIDDEN x86_entry_end[];
void
entry_patch_public(void)
diff --git a/src/mapi/entry_x86_tsd.h b/src/mapi/entry_x86_tsd.h
index ece00fa..d1256d9 100644
--- a/src/mapi/entry_x86_tsd.h
+++ b/src/mapi/entry_x86_tsd.h
@@ -26,6 +26,7 @@
*/
#include "u_macros.h"
+#include "../util/macros.h"
#define X86_ENTRY_SIZE 32
@@ -59,8 +60,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 HIDDEN x86_entry_start[];
+extern const char HIDDEN x86_entry_end[];
void
entry_patch_public(void)
--
2.2.2
More information about the mesa-dev
mailing list