[asan] Add runtime support for __asan_(un)register_image_globals
authorRyan Govostes <rzg@apple.com>
Mon, 28 Mar 2016 20:28:17 +0000 (20:28 +0000)
committerRyan Govostes <rzg@apple.com>
Mon, 28 Mar 2016 20:28:17 +0000 (20:28 +0000)
commitdc91fe5d8b7777942d46d5d8152a586932f13291
treee80a54ab21bbc7e37f347cca8698983fadc3e28a
parent476a94d9ef52363c859ea09415a856598633c000
[asan] Add runtime support for __asan_(un)register_image_globals

This change introduces routines that register and unregister all
instrumented globals in a loaded executable image.

These routines are only implemented on Darwin, where globals metadata
is expected to be placed in the __DATA,__asan_globals section.

Review: http://reviews.llvm.org/D16841
llvm-svn: 264644
compiler-rt/lib/asan/asan_globals.cc
compiler-rt/lib/asan/asan_init_version.h
compiler-rt/lib/asan/asan_interface_internal.h
compiler-rt/lib/asan/asan_internal.h
compiler-rt/lib/asan/asan_linux.cc
compiler-rt/lib/asan/asan_mac.cc
compiler-rt/lib/asan/asan_win.cc
compiler-rt/test/asan/TestCases/Darwin/dead-strip.c [new file with mode: 0644]
compiler-rt/test/asan/TestCases/initialization-bug.cc