Revert "[AddressSanitizer] Don't use weak linkage for __{start,stop}_asan_globals"
authorLeonard Chan <leonardchan@google.com>
Fri, 17 Jul 2020 22:29:50 +0000 (15:29 -0700)
committerLeonard Chan <leonardchan@google.com>
Fri, 17 Jul 2020 22:29:50 +0000 (15:29 -0700)
commitcf5df40c4cf1a53a02ab1d56a488642e3dda8f6d
tree564ca6fbe51817125fefbbee1200f90ba824ce45
parentcf2274b779f5ffee476cfe40994e6963a51c6428
Revert "[AddressSanitizer] Don't use weak linkage for __{start,stop}_asan_globals"

This reverts commit d76e62fdb7a93d9a33f642b6b528f2562cc3c3f4.

Reverting since this can lead to linker errors:

```
ld.lld: error: undefined hidden symbol: __start_asan_globals
```

when using --gc-sections. The linker can discard __start_asan_globals
once there are no more `asan_globals` sections left, which can lead to
this error if we have external linkages to them.
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
llvm/test/Instrumentation/AddressSanitizer/global_metadata.ll