1 ## This tests "Format" values printed by llvm-readobj.
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.
8 # RUN: yaml2obj %s -o %t.none64.o
9 # RUN: llvm-readobj --file-headers %t.none64.o | FileCheck %s -DFMT="elf64-unknown"
11 # RUN: yaml2obj %s -o %t.none32.o -DCLASS=32
12 # RUN: llvm-readobj --file-headers %t.none32.o | FileCheck %s -DFMT="elf32-unknown"
14 # RUN: yaml2obj %s -o %t.i386-32.o -DMACHINE=EM_386 -DCLASS=32
15 # RUN: llvm-readobj --file-headers %t.i386-32.o | FileCheck %s -DFMT="elf32-i386"
17 # RUN: yaml2obj %s -o %t.x86_64.o -DMACHINE=EM_X86_64
18 # RUN: llvm-readobj --file-headers %t.x86_64.o | FileCheck %s -DFMT="elf64-x86-64"
20 # CHECK: Format: [[FMT]]
24 Class: ELFCLASS[[CLASS=64]]
25 Data: ELFDATA2[[DATA=LSB]]
27 Machine: [[MACHINE=EM_NONE]]