Renumber arm64 TLS to match GNU values

The AArch64 ELF specification originally specified these relocations:

  R_AARCH64_TLS_DTPREL64          1028
  R_AARCH64_TLS_DTPMOD64          1029

However, the GNU toolchain implemented them as:

  R_AARCH64_TLS_DTPMOD64          1028
  R_AARCH64_TLS_DTPREL64          1029

The AArch64 ELF specification has been updated to replace the relocations
with R_AARCH64_TLS_IMPDEF1 and with R_AARCH64_TLS_IMPDEF2, where each
implementation can choose which interpretation it implements, but with a
suggestion to follow the GNU behavior.

Also: remove the 64 suffixes from the TLS relocations. The newest version
of the AArch64 ELF specification (version f) also omits the suffixes, as
do the glibc headers.

Bug: http://b/123385182
Bug: https://bugs.llvm.org/show_bug.cgi?id=40507
Test: build device, it boots
Change-Id: Ie98b7624752982973f0ac969d646454a86784cab
diff --git a/libc/include/bits/elf_arm64.h b/libc/include/bits/elf_arm64.h
index d838c0b..6bb8384 100644
--- a/libc/include/bits/elf_arm64.h
+++ b/libc/include/bits/elf_arm64.h
@@ -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
 
diff --git a/linker/linker_relocs.h b/linker/linker_relocs.h
index 68191f9..1da5ebe 100644
--- a/linker/linker_relocs.h
+++ b/linker/linker_relocs.h
@@ -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__)