1 ## Check how obj2yaml dumps e_machine field.
3 ## Check it dumps an unknown e_machine as a number.
5 # RUN: yaml2obj -DMACHINE=0x1234 %s -o %t1
6 # RUN: obj2yaml %t1 | FileCheck %s -DMACHINE=0x1234
9 # CHECK-NEXT: FileHeader:
10 # CHECK-NEXT: Class: ELFCLASS64
11 # CHECK-NEXT: Data: ELFDATA2MSB
12 # CHECK-NEXT: Type: ET_REL
13 # CHECK-NEXT: Machine: [[MACHINE]]
22 ## Check it dumps a known e_machine value as an enum string.
24 # RUN: yaml2obj %s -DMACHINE=0x1 -o %t2
25 # RUN: obj2yaml %t2 | FileCheck %s -DMACHINE=EM_M32
27 ## Check it doesn't dump e_machine when it is EM_NONE (0).
29 # RUN: yaml2obj %s -DMACHINE=0x0 -o %t3
30 # RUN: obj2yaml %t3 | FileCheck %s --check-prefix=DEFAULT
33 # DEFAULT-NEXT: FileHeader:
34 # DEFAULT-NEXT: Class: ELFCLASS64
35 # DEFAULT-NEXT: Data: ELFDATA2MSB
36 # DEFAULT-NEXT: Type: ET_REL