[llvm-dev] [ASAN] Getting ASAN working on a non pthread baremetal OS

Gupta Nikhil via llvm-dev llvm-dev at lists.llvm.org
Mon Oct 24 08:32:33 PDT 2016


Hello,

 

I'm working on getting the address sanitizer working on a baremetal OS for
an embedded ARM device.

 

It seems like ASAN was built with an expectation that POSIX calls and
pthreads will be present in the underlying environment. And on linking with
libclang_rt.asan-aarch64.a; I am getting a whole bunch of missing symbols
(as expected).

 

What I would like to know is, what would I have to do to build ASAN without
pthread support? Is it just a matter of playing around with the
asan_interceptors.cc and the sanitizer_common_interceptors.cc? From what
I've read online there doesn't seem to be a switch to just turn off pthreads
and TLS.

 

Thank you in advance for your assistance in this matter.

 

Regards,

Nikhil Gupta

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161024/5fe12949/attachment.html>


More information about the llvm-dev mailing list