Fix the MASM asmprinter's lies. It does not want to emit code to .text/.data
it wants it emitted to _text/_data.
llvm-svn: 28185
diff --git a/llvm/lib/Target/X86/X86AsmPrinter.cpp b/llvm/lib/Target/X86/X86AsmPrinter.cpp
index 0e2bab7..dceade4 100644
--- a/llvm/lib/Target/X86/X86AsmPrinter.cpp
+++ b/llvm/lib/Target/X86/X86AsmPrinter.cpp
@@ -50,6 +50,8 @@
forDarwin = false;
PrivateGlobalPrefix = ".L";
+ DefaultTextSection = ".text";
+ DefaultDataSection = ".data";
switch (Subtarget->TargetType) {
case X86Subtarget::isDarwin:
@@ -119,7 +121,7 @@
O << "\t.zerofill __DATA__, __common, " << name << ", "
<< Size << ", " << Align;
} else {
- SwitchToDataSection(".data", I);
+ SwitchToDataSection(DefaultDataSection, I);
if (LCOMMDirective != NULL) {
if (I->hasInternalLinkage()) {
O << LCOMMDirective << name << "," << Size;
@@ -157,7 +159,7 @@
O << "\t.globl " << name << "\n";
// FALL THROUGH
case GlobalValue::InternalLinkage:
- SwitchToDataSection(".data", I);
+ SwitchToDataSection(DefaultDataSection, I);
break;
default:
assert(0 && "Unknown linkage type!");