[llvm] r185390 - [PowerPC] Fix 32-bit PowerPC TLS relocs

Ulrich Weigand ulrich.weigand at de.ibm.com
Mon Jul 1 15:27:58 PDT 2013


Author: uweigand
Date: Mon Jul  1 17:27:57 2013
New Revision: 185390

URL: http://llvm.org/viewvc/llvm-project?rev=185390&view=rev
Log:

[PowerPC] Fix 32-bit PowerPC TLS relocs

Some TLS relocs were copied incorrectly from ppc64 to ppc32,
and some were missing completely.


Modified:
    llvm/trunk/include/llvm/Object/ELF.h
    llvm/trunk/include/llvm/Support/ELF.h

Modified: llvm/trunk/include/llvm/Object/ELF.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/ELF.h?rev=185390&r1=185389&r2=185390&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/ELF.h (original)
+++ llvm/trunk/include/llvm/Object/ELF.h Mon Jul  1 17:27:57 2013
@@ -2033,6 +2033,7 @@ StringRef ELFObjectFile<ELFT>::getReloca
       LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT16_HI);
       LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT16_HA);
       LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_REL32);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_TLS);
       LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_TPREL16);
       LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_TPREL16_LO);
       LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_TPREL16_HI);
@@ -2049,14 +2050,16 @@ StringRef ELFObjectFile<ELFT>::getReloca
       LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT_TLSLD16_LO);
       LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT_TLSLD16_HI);
       LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT_TLSLD16_HA);
-      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT_TPREL16_DS);
-      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT_TPREL16_LO_DS);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT_TPREL16);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT_TPREL16_LO);
       LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT_TPREL16_HI);
       LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT_TPREL16_HA);
-      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT_DTPREL16_DS);
-      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT_DTPREL16_LO_DS);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT_DTPREL16);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT_DTPREL16_LO);
       LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT_DTPREL16_HI);
       LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT_DTPREL16_HA);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_TLSGD);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_TLSLD);
       LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_REL16);
       LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_REL16_LO);
       LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_REL16_HI);

Modified: llvm/trunk/include/llvm/Support/ELF.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/ELF.h?rev=185390&r1=185389&r2=185390&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/ELF.h (original)
+++ llvm/trunk/include/llvm/Support/ELF.h Mon Jul  1 17:27:57 2013
@@ -465,6 +465,7 @@ enum {
   R_PPC_GOT16_HI              = 16,
   R_PPC_GOT16_HA              = 17,
   R_PPC_REL32                 = 26,
+  R_PPC_TLS                   = 67,
   R_PPC_TPREL16               = 69,
   R_PPC_TPREL16_LO            = 70,
   R_PPC_TPREL16_HI            = 71,
@@ -481,14 +482,16 @@ enum {
   R_PPC_GOT_TLSLD16_LO        = 84,
   R_PPC_GOT_TLSLD16_HI        = 85,
   R_PPC_GOT_TLSLD16_HA        = 86,
-  R_PPC_GOT_TPREL16_DS        = 87,
-  R_PPC_GOT_TPREL16_LO_DS     = 88,
+  R_PPC_GOT_TPREL16           = 87,
+  R_PPC_GOT_TPREL16_LO        = 88,
   R_PPC_GOT_TPREL16_HI        = 89,
   R_PPC_GOT_TPREL16_HA        = 90,
-  R_PPC_GOT_DTPREL16_DS       = 91,
-  R_PPC_GOT_DTPREL16_LO_DS    = 92,
+  R_PPC_GOT_DTPREL16          = 91,
+  R_PPC_GOT_DTPREL16_LO       = 92,
   R_PPC_GOT_DTPREL16_HI       = 93,
   R_PPC_GOT_DTPREL16_HA       = 94,
+  R_PPC_TLSGD                 = 95,
+  R_PPC_TLSLD                 = 96,
   R_PPC_REL16                 = 249,
   R_PPC_REL16_LO              = 250,
   R_PPC_REL16_HI              = 251,





More information about the llvm-commits mailing list