[PATCH] D38993: [XRay] [compiler-rt] [DSO] start deciding which symbols to hide/export

Martin Pelikán via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 12 06:19:27 PDT 2018


pelikan updated this revision to Diff 142163.
pelikan added a comment.
Herald added subscribers: Sanitizers, delcypher.

rebase + try to use this diff from a different machine


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D38993

Files:
  lib/xray/CMakeLists.txt
  lib/xray/xray.syms
  lib/xray/xray.vers


Index: lib/xray/xray.vers
===================================================================
--- /dev/null
+++ lib/xray/xray.vers
@@ -0,0 +1,23 @@
+{
+global:
+	extern "C++" {
+		__xray::XRayPatchedCustomEvent;
+		__xray::XRayPatchedFunction;
+		__xray::XRayArgLogger;
+	};
+	XRayInitialized;
+local:
+	extern "C++" {
+		__xray::DSOContext;
+	};
+	__start_xray_instr_map;
+	__start_xray_fn_index;
+	__stop_xray_instr_map;
+	__stop_xray_fn_index;
+	__xray_ArgLoggerEntry;
+	__xray_FunctionEntry;
+	__xray_FunctionExit;
+	__xray_FunctionTailExit;
+	__xray_CustomEvent;
+	__xray_patch;
+};
Index: lib/xray/xray.syms
===================================================================
--- /dev/null
+++ lib/xray/xray.syms
@@ -0,0 +1,8 @@
+{
+	extern "C++" {
+		__xray::XRayPatchedCustomEvent;
+		__xray::XRayPatchedFunction;
+		__xray::XRayArgLogger;
+	};
+	XRayInitialized;
+};
Index: lib/xray/CMakeLists.txt
===================================================================
--- lib/xray/CMakeLists.txt
+++ lib/xray/CMakeLists.txt
@@ -150,6 +150,18 @@
      DEFS ${XRAY_COMMON_DEFINITIONS}
      OBJECT_LIBS ${XRAY_COMMON_RUNTIME_OBJECT_LIBS} RTXray
      PARENT_TARGET xray)
+    set(syms ${COMPILER_RT_LIBRARY_OUTPUT_DIR}/libclang_rt.xray-${arch}.a.syms)
+    set(vers ${COMPILER_RT_LIBRARY_OUTPUT_DIR}/libclang_rt.xray-${arch}.a.vers)
+    add_custom_command(TARGET xray
+      COMMAND /bin/cp xray.syms ${syms}
+      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+      VERBATIM)
+    add_custom_command(TARGET xray
+      COMMAND /bin/cp xray.vers ${vers}
+      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+      VERBATIM)
+    install(FILES ${syms} ${vers}
+      DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR})
    # FDR Mode runtime
    add_compiler_rt_runtime(clang_rt.xray-fdr
      STATIC


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38993.142163.patch
Type: text/x-patch
Size: 1804 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180412/f6c3f0cc/attachment.bin>


More information about the llvm-commits mailing list