1 ## Test that llvm-readobj is able to recognize LLVMOMPOFFLOAD ELF notes.
3 # RUN: yaml2obj %s -o %t.64le -DBITS=64 -DENCODING=LSB
4 # RUN: llvm-readobj --notes %t.64le | FileCheck %s --match-full-lines --check-prefix=NOTES
5 # RUN: llvm-readelf --notes %t.64le | FileCheck %s --match-full-lines --check-prefix=NOTES-GNU
6 # RUN: yaml2obj %s -o %t.64be -DBITS=64 -DENCODING=MSB
7 # RUN: llvm-readobj --notes %t.64be | FileCheck %s --match-full-lines --check-prefix=NOTES
8 # RUN: llvm-readelf --notes %t.64be | FileCheck %s --match-full-lines --check-prefix=NOTES-GNU
9 # RUN: yaml2obj %s -o %t.32le -DBITS=32 -DENCODING=LSB
10 # RUN: llvm-readobj --notes %t.32le | FileCheck %s --match-full-lines --check-prefix=NOTES
11 # RUN: llvm-readelf --notes %t.32le | FileCheck %s --match-full-lines --check-prefix=NOTES-GNU
12 # RUN: yaml2obj %s -o %t.32be -DBITS=32 -DENCODING=MSB
13 # RUN: llvm-readobj --notes %t.32be | FileCheck %s --match-full-lines --check-prefix=NOTES
14 # RUN: llvm-readelf --notes %t.32be | FileCheck %s --match-full-lines --check-prefix=NOTES-GNU
17 # NOTES-NEXT: NoteSection {
18 # NOTES-NEXT: Name: .note.openmp
19 # NOTES-NEXT: Offset: {{.*}}
20 # NOTES-NEXT: Size: {{.*}}
22 # NOTES-NEXT: Owner: LLVMOMPOFFLOAD
23 # NOTES-NEXT: Data size: 0x3
24 # NOTES-NEXT: Type: NT_LLVM_OPENMP_OFFLOAD_VERSION (image format version)
25 # NOTES-NEXT: Version: 1.0
28 # NOTES-NEXT: Owner: LLVMOMPOFFLOAD
29 # NOTES-NEXT: Data size: 0x4
30 # NOTES-NEXT: Type: NT_LLVM_OPENMP_OFFLOAD_PRODUCER (producing toolchain)
31 # NOTES-NEXT: Producer: LLVM
34 # NOTES-NEXT: Owner: LLVMOMPOFFLOAD
35 # NOTES-NEXT: Data size: 0x9
36 # NOTES-NEXT: Type: NT_LLVM_OPENMP_OFFLOAD_PRODUCER_VERSION (producing toolchain version)
37 # NOTES-NEXT: Producer version: 13.0.0git
42 # NOTES-GNU: Displaying notes found in: .note.openmp
43 # NOTES-GNU-NEXT: Owner Data size Description
44 # NOTES-GNU-NEXT: LLVMOMPOFFLOAD 0x00000003 NT_LLVM_OPENMP_OFFLOAD_VERSION (image format version)
45 # NOTES-GNU-NEXT: Version: 1.0
46 # NOTES-GNU-NEXT: LLVMOMPOFFLOAD 0x00000004 NT_LLVM_OPENMP_OFFLOAD_PRODUCER (producing toolchain)
47 # NOTES-GNU-NEXT: Producer: LLVM
48 # NOTES-GNU-NEXT: LLVMOMPOFFLOAD 0x00000009 NT_LLVM_OPENMP_OFFLOAD_PRODUCER_VERSION (producing toolchain version)
49 # NOTES-GNU-NEXT: Producer version: 13.0.0git
53 Class: ELFCLASS[[BITS]]
54 Data: ELFDATA2[[ENCODING]]
60 - Name: LLVMOMPOFFLOAD
61 Type: 1 # NT_LLVM_OPENMP_OFFLOAD_VERSION
63 - Name: LLVMOMPOFFLOAD
64 Type: 2 # NT_LLVM_OPENMP_OFFLOAD_PRODUCER
66 - Name: LLVMOMPOFFLOAD
67 Type: 3 # NT_LLVM_OPENMP_OFFLOAD_PRODUCER_VERSION
68 Desc: '31332e302e30676974'