[ASan] make ASan malloc/free hooks weak interface functions, overridable by user. Now the user can control malloc/free hooks without recompiling ASan runtime

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162355 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/asan/asan_rtl.cc b/lib/asan/asan_rtl.cc
index edaf580..2e83067 100644
--- a/lib/asan/asan_rtl.cc
+++ b/lib/asan/asan_rtl.cc
@@ -250,6 +250,8 @@
     case 31: __asan_default_options(); break;
     case 32: __asan_before_dynamic_init(0, 0); break;
     case 33: __asan_after_dynamic_init(); break;
+    case 34: __asan_malloc_hook(0, 0); break;
+    case 35: __asan_free_hook(0); break;
   }
 }