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
16 # NOTES: NoteSections [
17 # NOTES-NEXT: NoteSection {
18 # NOTES-NEXT: Name: .note.openmp
19 # NOTES-NEXT: Offset: {{.*}}
20 # NOTES-NEXT: Size: {{.*}}
23 # NOTES-NEXT: Owner: LLVMOMPOFFLOAD
24 # NOTES-NEXT: Data size: 0x3
25 # NOTES-NEXT: Type: NT_LLVM_OPENMP_OFFLOAD_VERSION (image format version)
26 # NOTES-NEXT: Version: 1.0
29 # NOTES-NEXT: Owner: LLVMOMPOFFLOAD
30 # NOTES-NEXT: Data size: 0x4
31 # NOTES-NEXT: Type: NT_LLVM_OPENMP_OFFLOAD_PRODUCER (producing toolchain)
32 # NOTES-NEXT: Producer: LLVM
35 # NOTES-NEXT: Owner: LLVMOMPOFFLOAD
36 # NOTES-NEXT: Data size: 0x9
37 # NOTES-NEXT: Type: NT_LLVM_OPENMP_OFFLOAD_PRODUCER_VERSION (producing toolchain version)
38 # NOTES-NEXT: Producer version: 13.0.0git
44 # NOTES-GNU: Displaying notes found in: .note.openmp
45 # NOTES-GNU-NEXT: Owner Data size Description
46 # NOTES-GNU-NEXT: LLVMOMPOFFLOAD 0x00000003 NT_LLVM_OPENMP_OFFLOAD_VERSION (image format version)
47 # NOTES-GNU-NEXT: Version: 1.0
48 # NOTES-GNU-NEXT: LLVMOMPOFFLOAD 0x00000004 NT_LLVM_OPENMP_OFFLOAD_PRODUCER (producing toolchain)
49 # NOTES-GNU-NEXT: Producer: LLVM
50 # NOTES-GNU-NEXT: LLVMOMPOFFLOAD 0x00000009 NT_LLVM_OPENMP_OFFLOAD_PRODUCER_VERSION (producing toolchain version)
51 # NOTES-GNU-NEXT: Producer version: 13.0.0git
55 Class: ELFCLASS[[BITS]]
56 Data: ELFDATA2[[ENCODING]]
62 - Name: LLVMOMPOFFLOAD
63 Type: 1 # NT_LLVM_OPENMP_OFFLOAD_VERSION
65 - Name: LLVMOMPOFFLOAD
66 Type: 2 # NT_LLVM_OPENMP_OFFLOAD_PRODUCER
68 - Name: LLVMOMPOFFLOAD
69 Type: 3 # NT_LLVM_OPENMP_OFFLOAD_PRODUCER_VERSION
70 Desc: '31332e302e30676974'