From 7520d8494158ca2ead4b26db40d580f403b2559a Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Mon, 21 Mar 2011 22:49:24 +0000 Subject: --- Merging r127780 into '.': U test/MC/ELF/tls-i386.s U lib/MC/MCELFStreamer.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_29@128032 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/MC/MCELFStreamer.cpp | 7 +++++-- test/MC/ELF/tls-i386.s | 10 ++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/lib/MC/MCELFStreamer.cpp b/lib/MC/MCELFStreamer.cpp index 464c136029..9fc9173914 100644 --- a/lib/MC/MCELFStreamer.cpp +++ b/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/test/MC/ELF/tls-i386.s b/test/MC/ELF/tls-i386.s index 459d4cc69d..c754121cd6 100644 --- a/test/MC/ELF/tls-i386.s +++ b/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: ), -- cgit v1.2.3-18-g5258