[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
Sun Jan 29 23:20:23 PST 2017
mpividori updated this revision to Diff 86242.
mpividori added a comment.
I updated the diff to use the new macro `SANITIZER_INTERFACE_WEAK_DEF()` and also add that symbols to the list of weak symbols in: `weak_symbols.txt`.
Ready to land?
https://reviews.llvm.org/D29228
Files:
lib/sanitizer_common/sanitizer_common.cc
lib/sanitizer_common/sanitizer_common_libcdep.cc
lib/sanitizer_common/weak_symbols.txt
Index: lib/sanitizer_common/weak_symbols.txt
===================================================================
--- lib/sanitizer_common/weak_symbols.txt
+++ 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: lib/sanitizer_common/sanitizer_common_libcdep.cc
===================================================================
--- lib/sanitizer_common/sanitizer_common_libcdep.cc
+++ 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();
Index: lib/sanitizer_common/sanitizer_common.cc
===================================================================
--- lib/sanitizer_common/sanitizer_common.cc
+++ 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);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29228.86242.patch
Type: text/x-patch
Size: 1561 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170130/43c3da30/attachment.bin>
More information about the llvm-commits
mailing list