[llvm-commits] [llvm] r159574 - in /llvm/trunk: lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp test/MC/Mips/elf_basic.s

Jack Carter jcarter at mips.com
Mon Jul 2 13:04:43 PDT 2012


Author: jacksprat
Date: Mon Jul  2 15:04:43 2012
New Revision: 159574

URL: http://llvm.org/viewvc/llvm-project?rev=159574&view=rev
Log:
Pass the correct ELFOSABI enumeration to the MipsELFObjectWriter constructor

Contributer: Sasa Stankovic 

Modified:
    llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
    llvm/trunk/test/MC/Mips/elf_basic.s

Modified: llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp?rev=159574&r1=159573&r2=159574&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp Mon Jul  2 15:04:43 2012
@@ -78,7 +78,8 @@
     :MCAsmBackend(), OSType(_OSType), IsLittle(_isLittle), Is64Bit(_is64Bit) {}
 
   MCObjectWriter *createObjectWriter(raw_ostream &OS) const {
-    return createMipsELFObjectWriter(OS, OSType, IsLittle, Is64Bit);
+    return createMipsELFObjectWriter(OS,
+      MCELFObjectTargetWriter::getOSABI(OSType), IsLittle, Is64Bit);
   }
 
   /// ApplyFixup - Apply the \arg Value for given \arg Fixup into the provided

Modified: llvm/trunk/test/MC/Mips/elf_basic.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Mips/elf_basic.s?rev=159574&r1=159573&r2=159574&view=diff
==============================================================================
--- llvm/trunk/test/MC/Mips/elf_basic.s (original)
+++ llvm/trunk/test/MC/Mips/elf_basic.s Mon Jul  2 15:04:43 2012
@@ -30,3 +30,6 @@
 // CHECK-LE64: ('e_indent[EI_CLASS]', 0x02)
 // This is little endian.
 // CHECK-LE64: ('e_indent[EI_DATA]', 0x01)
+
+// Check that we are setting EI_OSABI to ELFOSABI_LINUX.
+// CHECK-LE64: ('e_indent[EI_OSABI]', 0x03)





More information about the llvm-commits mailing list