[PATCH] D30121: [asan] Fix dead stripping of globals on Linux.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 16 15:13:29 PDT 2017


pcc accepted this revision.
pcc added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: lib/Transforms/Instrumentation/AddressSanitizer.cpp:129
+// ASan version script has __asan_* wildcard. Triple underscore prevents
+// exporting of this _local_ symbol.
 static const char *const kAsanGlobalsRegisteredFlagName =
----------------
eugenis wrote:
> pcc wrote:
> > What happens if you use double underscore? I would have thought that hidden visibility was enough to prevent this symbol from being exported.
> /usr/bin/ld.gold: warning: Cannot export local symbol '__asan_globals_registered'
So the comment should say that the triple underscore suppresses a warning rather than that it prevents exporting.


Repository:
  rL LLVM

https://reviews.llvm.org/D30121





More information about the llvm-commits mailing list