[LLVMdev] [PATCH 2/2 v3] add visibility hidden to tls entry points (original) (raw)

Sedat Dilek sedat.dilek at gmail.com
Tue Feb 17 02:58:06 PST 2015


On Tue, Feb 17, 2015 at 10:40 AM, Marc Dietrich <marvin24 at gmx.de> wrote:

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/showbug.cgi?id=19778.

Signed-off-by: Marc Dietrich <marvin24 at gmx.de> --- v2: - no change v3: - include util directory in Makefile.am in order to avoid relative include paths, - make tls entry points array const

I adapted this patch as v4 to fit mesa v10.4.4, but it fails (see log-file in attached tarball).

src/mapi/Makefile.am | 1 + src/mapi/entryx86-64tls.h | 4 ++-- src/mapi/entryx86tls.h | 5 +++-- src/mapi/entryx86tsd.h | 5 +++-- 4 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/mapi/Makefile.am b/src/mapi/Makefile.am index 6794682..c42ed52 100644 --- a/src/mapi/Makefile.am +++ b/src/mapi/Makefile.am _@@ -45,6 +45,7 @@ AMCPPFLAGS = _ _$(SELINUXCFLAGS) _ _-I$(topsrcdir)/include _ _-I$(topsrcdir)/src/mapi _ _+ -I$(topsrcdir)/src/util _ -I$(topbuilddir)/src/mapi include Makefile.sources diff --git a/src/mapi/entryx86-64tls.h b/src/mapi/entryx86-64tls.h index 71e9d60..2c5d64d 100644 --- a/src/mapi/entryx86-64tls.h +++ b/src/mapi/entryx86-64tls.h @@ -25,6 +25,7 @@ * Chia-I Wu <olv at lunarg.com> */ +#include "macros.h" #include "umacros.h" asm(".text\n" @@ -62,8 +63,7 @@ entrypatchpublic(void) { } -static char -x8664entrystart[]; +extern const char HIDDEN x8664entrystart[]; mapifunc entrygetpublic(int slot) diff --git a/src/mapi/entryx86tls.h b/src/mapi/entryx86tls.h index fa7bc15..a66edec 100644 --- a/src/mapi/entryx86tls.h +++ b/src/mapi/entryx86tls.h @@ -26,6 +26,7 @@ */ #include <string.h> +#include "macros.h" #include "umacros.h" asm(".text"); @@ -72,8 +73,8 @@ asm(".text"); extern unsigned long x86currenttls(); -static char x86entrystart[]; -static char x86entryend[]; +extern const char HIDDEN x86entrystart[]; +extern const char HIDDEN x86entryend[]; void entrypatchpublic(void) diff --git a/src/mapi/entryx86tsd.h b/src/mapi/entryx86tsd.h index ece00fa..1de2991 100644 --- a/src/mapi/entryx86tsd.h +++ b/src/mapi/entryx86tsd.h @@ -25,6 +25,7 @@ * Chia-I Wu <olv at lunarg.com> */ +#include "macros.h" #include "umacros.h" #define X86ENTRYSIZE 32 @@ -59,8 +60,8 @@ asm(".balign 32\n" #include <string.h> #include "uexecmem.h" -static const char x86entrystart[]; -static const char x86entryend[]; +extern const char HIDDEN x86entrystart[]; +extern const char HIDDEN x86entryend[]; void entrypatchpublic(void) -- 2.2.2 -------------- next part -------------- A non-text attachment was scrubbed... Name: for-marvin24.tar.gz Type: application/x-gzip Size: 12345 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150217/b0e02091/attachment.bin> -------------- next part -------------- A non-text attachment was scrubbed... Name: for-marvin24.tar.gz.sha256sum Type: application/octet-stream Size: 86 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150217/b0e02091/attachment.obj>



More information about the llvm-dev mailing list