diff options
Diffstat (limited to 'test/old-elf/Mips/opt-emulation.test')
-rw-r--r-- | test/old-elf/Mips/opt-emulation.test | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/test/old-elf/Mips/opt-emulation.test b/test/old-elf/Mips/opt-emulation.test new file mode 100644 index 0000000000000..a48b49bfaa022 --- /dev/null +++ b/test/old-elf/Mips/opt-emulation.test @@ -0,0 +1,43 @@ +# Check MIPS specific arguments of the -m command line option. + +# RUN: yaml2obj -format=elf %s > %t-obj +# RUN: lld -flavor old-gnu -target mipsel -m elf32ltsmip -o %t-exe %t-obj +# RUN: llvm-readobj -file-headers %t-exe | FileCheck -check-prefix=LE-O32 %s +# RUN: lld -flavor old-gnu -target mipsel -melf32ltsmip -o %t-exe %t-obj +# RUN: llvm-readobj -file-headers %t-exe | FileCheck -check-prefix=LE-O32 %s + +# LE-O32: Class: 32-bit (0x1) +# LE-O32: DataEncoding: LittleEndian (0x1) +# LE-O32: FileVersion: 1 +# LE-O32: OS/ABI: SystemV (0x0) +# LE-O32: ABIVersion: 1 +# LE-O32: Machine: EM_MIPS (0x8) +# LE-O32: Version: 1 +# LE-O32: Flags [ (0x70001005) +# LE-O32-NEXT: EF_MIPS_ABI_O32 (0x1000) +# LE-O32-NEXT: EF_MIPS_ARCH_32R2 (0x70000000) +# LE-O32-NEXT: EF_MIPS_CPIC (0x4) +# LE-O32-NEXT: EF_MIPS_NOREORDER (0x1) +# LE-O32-NEXT: ] + +!ELF +FileHeader: !FileHeader + Class: ELFCLASS32 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_MIPS + Flags: [EF_MIPS_NOREORDER, EF_MIPS_CPIC, EF_MIPS_ABI_O32, EF_MIPS_ARCH_32R2] + +Sections: +- Name: .text + Type: SHT_PROGBITS + Content: "00000000" + AddressAlign: 16 + Flags: [SHF_EXECINSTR, SHF_ALLOC] + +Symbols: + Global: + - Name: __start + Section: .text + Value: 0x0 + Size: 4 |