[asan] Align __asan_global_start so that it works with LLD
authorReid Kleckner <rnk@google.com>
Thu, 26 Apr 2018 20:46:50 +0000 (20:46 +0000)
committerReid Kleckner <rnk@google.com>
Thu, 26 Apr 2018 20:46:50 +0000 (20:46 +0000)
commit824eb0e6a0585e647e20fdc4314b251cffdc241f
tree7805a088da74b09214e54d62c2501fd9057c641d
parent8e19bd45a9bbd7db58fe61cc327892f81fb71285
[asan] Align __asan_global_start so that it works with LLD

Otherwise LLD will not align the .ASAN$GA section start, and
&__asan_globals + 1 will not be the start of the next real ASan global
metadata in .ASAN$GL.

We discovered this issue when attempting to use LLD on Windows in
Chromium: https://crbug.com/837090

llvm-svn: 330990
compiler-rt/lib/asan/asan_globals_win.cc
compiler-rt/test/asan/TestCases/Windows/fuse-lld-globals.cc [new file with mode: 0644]