[PATCH] D49198: [scudo] Use -Wl,-z,global on Android
Kostya Kortchinsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 12 11:53:50 PDT 2018
cryptoad marked 3 inline comments as done.
cryptoad added inline comments.
================
Comment at: lib/scudo/CMakeLists.txt:24
+ if (COMPILER_RT_HAS_Z_GLOBAL)
+ list(APPEND ASAN_DYNAMIC_LINK_FLAGS -Wl,-z,global)
+ endif()
----------------
eugenis wrote:
> cryptoad wrote:
> > eugenis wrote:
> > > ASAN_DYNAMIC_LINK_FLAGS <- is this a typo?
> > >
> > > Can this be done in a common code for all sanitizers that intercept malloc?
> > >
> > > Also, I don't think github is the canonical source for AOSP, could you update the link in the patch description to https://android.googlesource.com/platform/bionic/+/master/android-changes-for-ndk-developers.md ?
> > Doh! Thanks for catching the error.
> > Name updated, description updated.
> > Regarding the last point, you'd want an update to `SANITIZER_COMMON_LINK_FLAGS` based on interception? (not sure if it's possible, just trying to clarify).
> SANITIZER_COMMON_LINK_FLAGS can't depend on interception, I think.
>
> In fact, adding -z,global unconditionally should not break anything as far as I can see.
> Could you move this code to the top-level (compiler-rt) CMakeLists, and remove it from asan and hwasan?
Done, will test locally to make sure it all works out.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D49198
More information about the llvm-commits
mailing list