[PATCH] D29228: [compiler-rt] Define as weak, functions that are declared as weak.

Marcos Pividori via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 31 12:34:38 PST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL293681: [sanitizer] Define as weak, functions that are declared as weak. (authored by mpividori).

Changed prior to commit:
  https://reviews.llvm.org/D29228?vs=86242&id=86477#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D29228

Files:
  compiler-rt/trunk/lib/asan/asan_win_dll_thunk.cc
  compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.cc
  compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_libcdep.cc
  compiler-rt/trunk/lib/sanitizer_common/weak_symbols.txt


Index: compiler-rt/trunk/lib/asan/asan_win_dll_thunk.cc
===================================================================
--- compiler-rt/trunk/lib/asan/asan_win_dll_thunk.cc
+++ compiler-rt/trunk/lib/asan/asan_win_dll_thunk.cc
@@ -350,11 +350,9 @@
 INTERFACE_FUNCTION(__sanitizer_symbolize_global)
 INTERFACE_FUNCTION(__sanitizer_ptr_cmp)
 INTERFACE_FUNCTION(__sanitizer_ptr_sub)
-INTERFACE_FUNCTION(__sanitizer_report_error_summary)
 INTERFACE_FUNCTION(__sanitizer_reset_coverage)
 INTERFACE_FUNCTION(__sanitizer_get_number_of_counters)
 INTERFACE_FUNCTION(__sanitizer_update_counter_bitset_and_clear_counters)
-INTERFACE_FUNCTION(__sanitizer_sandbox_on_notify)
 INTERFACE_FUNCTION(__sanitizer_set_death_callback)
 INTERFACE_FUNCTION(__sanitizer_set_report_path)
 INTERFACE_FUNCTION(__sanitizer_set_report_fd)
Index: compiler-rt/trunk/lib/sanitizer_common/weak_symbols.txt
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/weak_symbols.txt
+++ compiler-rt/trunk/lib/sanitizer_common/weak_symbols.txt
@@ -1,5 +1,7 @@
 ___sanitizer_free_hook
 ___sanitizer_malloc_hook
+___sanitizer_report_error_summary
+___sanitizer_sandbox_on_notify
 ___sanitizer_symbolize_code
 ___sanitizer_symbolize_data
 ___sanitizer_symbolize_demangle
Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.cc
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.cc
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.cc
@@ -489,7 +489,8 @@
   report_file.fd_pid = internal_getpid();
 }
 
-void __sanitizer_report_error_summary(const char *error_summary) {
+SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_report_error_summary,
+                             const char *error_summary) {
   Printf("%s\n", error_summary);
 }
 
Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_libcdep.cc
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_libcdep.cc
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_libcdep.cc
@@ -162,8 +162,8 @@
 
 }  // namespace __sanitizer
 
-void NOINLINE
-__sanitizer_sandbox_on_notify(__sanitizer_sandbox_arguments *args) {
+SANITIZER_INTERFACE_WEAK_DEF(void, __sanitizer_sandbox_on_notify,
+                             __sanitizer_sandbox_arguments *args) {
   __sanitizer::PrepareForSandboxing(args);
   if (__sanitizer::sandboxing_callback)
     __sanitizer::sandboxing_callback();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29228.86477.patch
Type: text/x-patch
Size: 2537 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170131/664ebe24/attachment.bin>


More information about the llvm-commits mailing list