[PATCH] D63904: [Android] Use ELF TLS for Android API level 29+

Ryan Prichard via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 27 16:54:51 PDT 2019


rprichard added reviewers: danalbert, srhines.
rprichard added a comment.

Android's ELF TLS requires lld, but the NDK doesn't default to lld yet. (I believe the NDK uses bfd on arm64 and gold everywhere else.) When the NDK Clang driver targets 29/Q+, the NDK could generate executables or shared objects using ELF TLS that don't load on 29/Q.

For reference, the linker quirks are:

- x86-32 bfd uses an obsolete TLS relocation (R_386_TLS_TPOFF32) for relaxation
- arm{32,64} bfd can discard the overalignment placeholder section from crtbegin.c
- gold uses STB_LOCAL TLS/section symbols that need special handling in soinfo::relocate


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63904/new/

https://reviews.llvm.org/D63904





More information about the llvm-commits mailing list