1 # Show that llvm-readobj can handle all standard ELF types.
2 # RUN: yaml2obj %s --docnum=1 -o %t.none
3 # RUN: llvm-readobj --file-headers %t.none | FileCheck %s --check-prefix=LLVM-NONE
4 # RUN: llvm-readelf --file-headers %t.none | FileCheck %s --check-prefix=GNU-NONE
6 # LLVM-NONE: Type: None (0x0)
7 # GNU-NONE: Type: NONE (none)
16 # RUN: yaml2obj %s --docnum=2 -o %t.rel
17 # RUN: llvm-readobj --file-headers %t.rel | FileCheck %s --check-prefix=LLVM-REL
18 # RUN: llvm-readelf --file-headers %t.rel | FileCheck %s --check-prefix=GNU-REL
20 # LLVM-REL: Type: Relocatable (0x1)
21 # GNU-REL: Type: REL (Relocatable file)
31 # RUN: yaml2obj %s --docnum=3 -o %t.exec
32 # RUN: llvm-readobj --file-headers %t.exec | FileCheck %s --check-prefix=LLVM-EXEC
33 # RUN: llvm-readelf --file-headers %t.exec | FileCheck %s --check-prefix=GNU-EXEC
35 # LLVM-EXEC: Type: Executable (0x2)
36 # GNU-EXEC: Type: EXEC (Executable file)
45 # RUN: yaml2obj %s --docnum=4 -o %t.so
46 # RUN: llvm-readobj --file-headers %t.so | FileCheck %s --check-prefix=LLVM-SO
47 # RUN: llvm-readelf --file-headers %t.so | FileCheck %s --check-prefix=GNU-SO
49 # LLVM-SO: Type: SharedObject (0x3)
50 # GNU-SO: Type: DYN (Shared object file)
59 # RUN: yaml2obj %s --docnum=5 -o %t.core
60 # RUN: llvm-readobj --file-headers %t.core | FileCheck %s --check-prefix=LLVM-CORE
61 # RUN: llvm-readelf --file-headers %t.core | FileCheck %s --check-prefix=GNU-CORE
63 # LLVM-CORE: Type: Core (0x4)
64 # GNU-CORE: Type: CORE (Core file)
73 # Show that llvm-readobj can handle an unknown ELF type.
74 # RUN: yaml2obj %s --docnum=6 -o %t.unknown
75 # RUN: llvm-readobj --file-headers %t.unknown | FileCheck %s --check-prefix=LLVM-UNKNOWN
76 # RUN: llvm-readelf --file-headers %t.unknown | FileCheck %s --check-prefix=GNU-UNKNOWN
78 # LLVM-UNKNOWN: Type: 0x42
79 # GNU-UNKNOWN: Type: 42
88 # Show that llvm-readobj can handle an unknown OS-specific ELF type.
89 # RUN: yaml2obj %s --docnum=7 -o %t.os
90 # RUN: llvm-readobj --file-headers %t.os | FileCheck %s --check-prefix=LLVM-OS
91 # RUN: llvm-readelf --file-headers %t.os | FileCheck %s --check-prefix=GNU-OS
93 # LLVM-OS: Type: 0xFE00
103 # Show that llvm-readobj can handle an unknown machine-specific ELF type.
104 # RUN: yaml2obj %s --docnum=8 -o %t.proc
105 # RUN: llvm-readobj --file-headers %t.proc | FileCheck %s --check-prefix=LLVM-PROC
106 # RUN: llvm-readelf --file-headers %t.proc | FileCheck %s --check-prefix=GNU-PROC
108 # LLVM-PROC: Type: 0xFF00
109 # GNU-PROC: Type: ff00