summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-03-21 22:49:24 +0000
committerBill Wendling <isanbard@gmail.com>2011-03-21 22:49:24 +0000
commit59fe9d15519f6b43387924b03fc8f0f82b0c65fd (patch)
treeb17e1e026f98be93aec35642bb0ba299c34411d4
parent2d1a83ae5cb93607cc6530cd302205af7a0c5211 (diff)
downloadllvm-59fe9d15519f6b43387924b03fc8f0f82b0c65fd.tar.gz
--- Merging r127780 into '.':
U test/MC/ELF/tls-i386.s U lib/MC/MCELFStreamer.cpp llvm-svn: 128032
-rw-r--r--llvm/lib/MC/MCELFStreamer.cpp7
-rw-r--r--llvm/test/MC/ELF/tls-i386.s10
2 files changed, 15 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCELFStreamer.cpp b/llvm/lib/MC/MCELFStreamer.cpp
index 464c13602989..9fc9173914d2 100644
--- a/llvm/lib/MC/MCELFStreamer.cpp
+++ b/llvm/lib/MC/MCELFStreamer.cpp
@@ -291,15 +291,18 @@ void MCELFStreamer::fixSymbolsInTLSFixups(const MCExpr *expr) {
switch (symRef.getKind()) {
default:
return;
+ case MCSymbolRefExpr::VK_GOTTPOFF:
+ case MCSymbolRefExpr::VK_INDNTPOFF:
case MCSymbolRefExpr::VK_NTPOFF:
case MCSymbolRefExpr::VK_GOTNTPOFF:
case MCSymbolRefExpr::VK_TLSGD:
+ case MCSymbolRefExpr::VK_TLSLD:
case MCSymbolRefExpr::VK_TLSLDM:
case MCSymbolRefExpr::VK_TPOFF:
case MCSymbolRefExpr::VK_DTPOFF:
- case MCSymbolRefExpr::VK_GOTTPOFF:
- case MCSymbolRefExpr::VK_TLSLD:
case MCSymbolRefExpr::VK_ARM_TLSGD:
+ case MCSymbolRefExpr::VK_ARM_TPOFF:
+ case MCSymbolRefExpr::VK_ARM_GOTTPOFF:
break;
}
MCSymbolData &SD = getAssembler().getOrCreateSymbolData(symRef.getSymbol());
diff --git a/llvm/test/MC/ELF/tls-i386.s b/llvm/test/MC/ELF/tls-i386.s
index 459d4cc69df9..c754121cd694 100644
--- a/llvm/test/MC/ELF/tls-i386.s
+++ b/llvm/test/MC/ELF/tls-i386.s
@@ -8,6 +8,7 @@
movl foo4@TLSLDM(%eax), %eax
movl foo5@TPOFF(%eax), %eax
movl foo6@DTPOFF(%eax), %eax
+ movl foo7@INDNTPOFF, %eax
// CHECK: (('st_name', 0x00000001) # 'foo1'
// CHECK-NEXT: ('st_value', 0x00000000)
@@ -62,3 +63,12 @@
// CHECK-NEXT: ('st_other', 0x00000000)
// CHECK-NEXT: ('st_shndx', 0x00000000)
// CHECK-NEXT: ),
+// CHECK-NEXT: # Symbol 0x0000000b
+// CHECK-NEXT: (('st_name', 0x0000001f) # 'foo7'
+// CHECK-NEXT: ('st_value', 0x00000000)
+// CHECK-NEXT: ('st_size', 0x00000000)
+// CHECK-NEXT: ('st_bind', 0x00000001)
+// CHECK-NEXT: ('st_type', 0x00000006)
+// CHECK-NEXT: ('st_other', 0x00000000)
+// CHECK-NEXT: ('st_shndx', 0x00000000)
+// CHECK-NEXT: ),