2016-06-28 03:53:53 +08:00
|
|
|
# RUN: yaml2obj %s > %t
|
2015-05-07 22:04:44 +08:00
|
|
|
# RUN: llvm-readobj -file-headers %t | FileCheck -check-prefix=OBJ %s
|
|
|
|
# RUN: obj2yaml %t | FileCheck -check-prefix=YAML %s
|
|
|
|
|
2015-05-08 15:04:59 +08:00
|
|
|
# OBJ: Flags [ (0x9E8B1727)
|
2015-05-07 22:04:44 +08:00
|
|
|
# OBJ-NEXT: EF_MIPS_32BITMODE (0x100)
|
|
|
|
# OBJ-NEXT: EF_MIPS_ABI2 (0x20)
|
|
|
|
# OBJ-NEXT: EF_MIPS_ABI_O32 (0x1000)
|
|
|
|
# OBJ-NEXT: EF_MIPS_ARCH_32R6 (0x90000000)
|
|
|
|
# OBJ-NEXT: EF_MIPS_ARCH_ASE_M16 (0x4000000)
|
|
|
|
# OBJ-NEXT: EF_MIPS_ARCH_ASE_MDMX (0x8000000)
|
|
|
|
# OBJ-NEXT: EF_MIPS_CPIC (0x4)
|
|
|
|
# OBJ-NEXT: EF_MIPS_FP64 (0x200)
|
2015-05-08 15:04:59 +08:00
|
|
|
# OBJ-NEXT: EF_MIPS_MACH_OCTEON (0x8B0000)
|
2015-05-07 22:04:44 +08:00
|
|
|
# OBJ-NEXT: EF_MIPS_MICROMIPS (0x2000000)
|
|
|
|
# OBJ-NEXT: EF_MIPS_NAN2008 (0x400)
|
|
|
|
# OBJ-NEXT: EF_MIPS_NOREORDER (0x1)
|
|
|
|
# OBJ-NEXT: EF_MIPS_PIC (0x2)
|
|
|
|
# OBJ-NEXT: ]
|
|
|
|
|
|
|
|
# YAML: FileHeader:
|
|
|
|
# YAML-NEXT: Class: ELFCLASS32
|
|
|
|
# YAML-NEXT: Data: ELFDATA2LSB
|
|
|
|
# YAML-NEXT: Type: ET_REL
|
|
|
|
# YAML-NEXT: Machine: EM_MIPS
|
2015-05-08 15:04:59 +08:00
|
|
|
# YAML-NEXT: Flags: [ EF_MIPS_NOREORDER, EF_MIPS_PIC, EF_MIPS_CPIC, EF_MIPS_ABI2, EF_MIPS_32BITMODE, EF_MIPS_FP64, EF_MIPS_NAN2008, EF_MIPS_MICROMIPS, EF_MIPS_ARCH_ASE_M16, EF_MIPS_ARCH_ASE_MDMX, EF_MIPS_ABI_O32, EF_MIPS_MACH_OCTEON, EF_MIPS_ARCH_32R6 ]
|
2015-05-07 22:04:44 +08:00
|
|
|
|
2016-06-28 03:53:53 +08:00
|
|
|
--- !ELF
|
2015-05-07 22:04:44 +08:00
|
|
|
FileHeader:
|
2015-05-08 15:04:59 +08:00
|
|
|
Class: ELFCLASS32
|
|
|
|
Data: ELFDATA2LSB
|
|
|
|
Type: ET_REL
|
|
|
|
Machine: EM_MIPS
|
|
|
|
Flags: [ EF_MIPS_NOREORDER, EF_MIPS_PIC, EF_MIPS_CPIC, EF_MIPS_ABI2,
|
|
|
|
EF_MIPS_32BITMODE, EF_MIPS_FP64, EF_MIPS_NAN2008,
|
|
|
|
EF_MIPS_ABI_O32, EF_MIPS_ARCH_32R6,
|
|
|
|
EF_MIPS_MICROMIPS, EF_MIPS_ARCH_ASE_M16,
|
|
|
|
EF_MIPS_ARCH_ASE_MDMX, EF_MIPS_MACH_OCTEON ]
|
2015-05-07 22:04:44 +08:00
|
|
|
Sections:
|
2015-05-08 15:04:59 +08:00
|
|
|
- Name: .text
|
|
|
|
Type: SHT_PROGBITS
|
|
|
|
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
|
|
|
|
AddressAlign: 16
|
|
|
|
Size: 4
|
2015-05-07 22:04:44 +08:00
|
|
|
|
|
|
|
Symbols:
|
|
|
|
Global:
|
|
|
|
- Name: T1
|
|
|
|
Section: .text
|
|
|
|
Value: 0
|
|
|
|
Size: 4
|
|
|
|
...
|