28 lines · plain
1## This tests "Format" values printed by llvm-readobj.2 3## The "Format" value printed depends on values stored in e_ident[EI_CLASS],4## e_ident[EI_DATA] and e_machine fields of an ELF file header.5## We test all possible values in unittests\Object\ELFObjectFileTest.cpp,6## here we test just a few of them to demonstrate that llvm-readobj prints the same.7 8# RUN: yaml2obj %s -o %t.none64.o9# RUN: llvm-readobj --file-headers %t.none64.o | FileCheck %s -DFMT="elf64-unknown"10 11# RUN: yaml2obj %s -o %t.none32.o -DCLASS=3212# RUN: llvm-readobj --file-headers %t.none32.o | FileCheck %s -DFMT="elf32-unknown"13 14# RUN: yaml2obj %s -o %t.i386-32.o -DMACHINE=EM_386 -DCLASS=3215# RUN: llvm-readobj --file-headers %t.i386-32.o | FileCheck %s -DFMT="elf32-i386"16 17# RUN: yaml2obj %s -o %t.x86_64.o -DMACHINE=EM_X86_6418# RUN: llvm-readobj --file-headers %t.x86_64.o | FileCheck %s -DFMT="elf64-x86-64"19 20# CHECK: Format: [[FMT]]21 22--- !ELF23FileHeader:24 Class: ELFCLASS[[CLASS=64]]25 Data: ELFDATA2[[DATA=LSB]]26 Type: ET_REL27 Machine: [[MACHINE=EM_NONE]]28