From 20678e2b68056238d2b129a147a474cc55f89365 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 26 Nov 2012 14:20:26 +0000 Subject: [PATCH] tsan: explicitly mark symbols referenced from assembly as hidden this allows to build tsan runtime as dynamic library llvm-svn: 168589 --- compiler-rt/lib/tsan/rtl/tsan_rtl.h | 1 + compiler-rt/lib/tsan/rtl/tsan_rtl_amd64.S | 2 ++ 2 files changed, 3 insertions(+) diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl.h b/compiler-rt/lib/tsan/rtl/tsan_rtl.h index e861a65..967bf79 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_rtl.h +++ b/compiler-rt/lib/tsan/rtl/tsan_rtl.h @@ -523,6 +523,7 @@ void AfterSleep(ThreadState *thr, uptr pc); #define HACKY_CALL(f) \ __asm__ __volatile__("sub $1024, %%rsp;" \ "/*.cfi_adjust_cfa_offset 1024;*/" \ + ".hidden " #f "_thunk;" \ "call " #f "_thunk;" \ "add $1024, %%rsp;" \ "/*.cfi_adjust_cfa_offset -1024;*/" \ diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl_amd64.S b/compiler-rt/lib/tsan/rtl/tsan_rtl_amd64.S index aee650d..af87856 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_rtl_amd64.S +++ b/compiler-rt/lib/tsan/rtl/tsan_rtl_amd64.S @@ -1,5 +1,6 @@ .section .text +.hidden __tsan_trace_switch .globl __tsan_trace_switch_thunk __tsan_trace_switch_thunk: .cfi_startproc @@ -79,6 +80,7 @@ __tsan_trace_switch_thunk: ret .cfi_endproc +.hidden __tsan_report_race .globl __tsan_report_race_thunk __tsan_report_race_thunk: .cfi_startproc -- 2.7.4