[asan] update asan docs to explain more about linking and to mention full support for i386 Linux
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166271 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/docs/AddressSanitizer.html b/docs/AddressSanitizer.html
index edb2ce4..498719a 100644
--- a/docs/AddressSanitizer.html
+++ b/docs/AddressSanitizer.html
@@ -49,6 +49,11 @@
<h2 id="usage">Usage</h2>
Simply compile and link your program with <tt>-faddress-sanitizer</tt> flag. <BR>
+The AddressSanitizer run-time library should be linked to the final executable,
+so make sure to use <tt>clang</tt> (not <tt>ld</tt>) for the final link step.<BR>
+When linking shared libraries, the AddressSanitizer run-time is not linked,
+so <tt>-Wl,-z,defs</tt> may cause link errors (don't use it with AddressSanitizer). <BR>
+
To get a reasonable performance add <tt>-O1</tt> or higher. <BR>
To get nicer stack traces in error messages add
<tt>-fno-omit-frame-pointer</tt>. <BR>
@@ -65,8 +70,16 @@
</pre>
<pre>
+# Compile and link
% clang -O1 -g -faddress-sanitizer -fno-omit-frame-pointer example_UseAfterFree.cc
</pre>
+OR
+<pre>
+# Compile
+% clang -O1 -g -faddress-sanitizer -fno-omit-frame-pointer -c example_UseAfterFree.cc
+# Link
+% clang -g -faddress-sanitizer example_UseAfterFree.o
+</pre>
If a bug is detected, the program will print an error message to stderr and exit with a
non-zero exit code.
@@ -116,10 +129,10 @@
<h2 id="platforms">Supported Platforms</h2>
AddressSanitizer is supported on
-<ul><li>Linux x86_64 (tested on Ubuntu 10.04).
+<ul><li>Linux i386/x86_64 (tested on Ubuntu 10.04 and 12.04).
<li>MacOS 10.6, 10.7 and 10.8 (i386/x86_64).
</ul>
-Support for Linux i386/ARM is in progress
+Support for Linux ARM (and Android ARM) is in progress
(it may work, but is not guaranteed too).