Merge changes I99d2faae,Ie98b7624

* changes:
  Enable traditional TLS accesses on arm64
  Renumber arm64 TLS to match GNU values
This commit is contained in:
Ryan Prichard 2019-07-31 20:50:58 +00:00 committed by Gerrit Code Review
commit c2a722f5d7
4 changed files with 7 additions and 11 deletions

View File

@ -83,9 +83,9 @@
#define R_AARCH64_GLOB_DAT 1025 /* Create GOT entry. */
#define R_AARCH64_JUMP_SLOT 1026 /* Create PLT entry. */
#define R_AARCH64_RELATIVE 1027 /* Adjust by program base. */
#define R_AARCH64_TLS_DTPREL64 1028 /* Module-relative offset. */
#define R_AARCH64_TLS_DTPMOD64 1029 /* Module index. */
#define R_AARCH64_TLS_TPREL64 1030 /* TP-relative offset. */
#define R_AARCH64_TLS_DTPMOD 1028 /* Module index. */
#define R_AARCH64_TLS_DTPREL 1029 /* Module-relative offset. */
#define R_AARCH64_TLS_TPREL 1030 /* TP-relative offset. */
#define R_AARCH64_TLSDESC 1031 /* 16-byte descriptor: resolver func + arg. */
#define R_AARCH64_IRELATIVE 1032

View File

@ -1485,6 +1485,7 @@ LIBC_R { # introduced=R
__mempcpy_chk;
__open64_2;
__openat64_2;
__tls_get_addr; # arm64
call_once;
cnd_broadcast;
cnd_destroy;

View File

@ -3162,10 +3162,6 @@ bool soinfo::relocate(const VersionTracker& version_tracker, ElfRelIteratorT&& r
*reinterpret_cast<ElfW(Addr)*>(reloc) = tpoff;
}
break;
#if !defined(__aarch64__)
// Omit support for DTPMOD/DTPREL on arm64, at least until
// http://b/123385182 is fixed. arm64 uses TLSDESC instead.
case R_GENERIC_TLS_DTPMOD:
count_relocation(kRelocRelative);
MARK(rel->r_offset);
@ -3190,7 +3186,6 @@ bool soinfo::relocate(const VersionTracker& version_tracker, ElfRelIteratorT&& r
reinterpret_cast<void*>(sym_addr + addend), sym_name);
*reinterpret_cast<ElfW(Addr)*>(reloc) = sym_addr + addend;
break;
#endif // !defined(__aarch64__)
#if defined(__aarch64__)
// Bionic currently only implements TLSDESC for arm64. This implementation should work with

View File

@ -38,9 +38,9 @@
#define R_GENERIC_GLOB_DAT R_AARCH64_GLOB_DAT
#define R_GENERIC_RELATIVE R_AARCH64_RELATIVE
#define R_GENERIC_IRELATIVE R_AARCH64_IRELATIVE
#define R_GENERIC_TLS_DTPMOD R_AARCH64_TLS_DTPMOD64
#define R_GENERIC_TLS_DTPREL R_AARCH64_TLS_DTPREL64
#define R_GENERIC_TLS_TPREL R_AARCH64_TLS_TPREL64
#define R_GENERIC_TLS_DTPMOD R_AARCH64_TLS_DTPMOD
#define R_GENERIC_TLS_DTPREL R_AARCH64_TLS_DTPREL
#define R_GENERIC_TLS_TPREL R_AARCH64_TLS_TPREL
#define R_GENERIC_TLSDESC R_AARCH64_TLSDESC
#elif defined (__arm__)