[yaml2obj] Allow yaml2obj tool to recognize EF_MIPS_NAN2008 flag
authorSimon Atanasyan <simon@atanasyan.com>
Tue, 4 Nov 2014 13:33:36 +0000 (13:33 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Tue, 4 Nov 2014 13:33:36 +0000 (13:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221268 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Object/ELFYAML.cpp
test/Object/yaml2obj-elf-file-headers-with-e_flags.yaml

index 6340841e5ee67f8f4bae7148522a10e7a663338a..6b10724c9661ad2dd4d823e6048b8b301c740042 100644 (file)
@@ -264,6 +264,7 @@ void ScalarBitSetTraits<ELFYAML::ELF_EF>::bitset(IO &IO,
     BCase(EF_MIPS_CPIC)
     BCase(EF_MIPS_ABI2)
     BCase(EF_MIPS_32BITMODE)
+    BCase(EF_MIPS_NAN2008)
     BCase(EF_MIPS_ABI_O32)
     BCase(EF_MIPS_MICROMIPS)
     BCase(EF_MIPS_ARCH_ASE_M16)
index 7d098077dd5e7dd57712ddc1e0246b0b2b793697..dddc7d97f62802354f6b1275a32211e3a28e91be 100644 (file)
@@ -5,13 +5,15 @@ FileHeader:
   Data: ELFDATA2LSB
   Type: ET_REL
   Machine: EM_MIPS
-  Flags: [ EF_MIPS_NOREORDER, EF_MIPS_ABI_O32, EF_MIPS_ARCH_32R2 ]
+  Flags: [ EF_MIPS_NOREORDER, EF_MIPS_ABI_O32, EF_MIPS_ARCH_32R2,
+           EF_MIPS_NAN2008 ]
 
 # CHECK: Format: ELF32-mips
 # CHECK: Arch: mipsel
 # CHECK: Machine: EM_MIPS
-# CHECK: Flags [ (0x70001001)
+# CHECK: Flags [ (0x70001401)
 # CHECK-NEXT: EF_MIPS_ABI_O32 (0x1000)
 # CHECK-NEXT: EF_MIPS_ARCH_32R2 (0x70000000)
+# CHECK-NEXT: EF_MIPS_NAN2008 (0x400)
 # CHECK-NEXT: EF_MIPS_NOREORDER (0x1)
 # CHECK-NEXT: ]