Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / tools / llvm-readobj / ELF / note-generic.s
blob59df75e3ee19c17a4a5f94d5e8155008c0b49602
1 // REQUIRES: x86-registered-target
2 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o %t.o
4 // RUN: llvm-readobj --notes %t.o | FileCheck %s --check-prefix=LLVM --strict-whitespace
5 // RUN: llvm-readelf --notes %t.o | FileCheck %s --check-prefix=GNU --strict-whitespace
7 // GNU: Displaying notes found in: .note.version{{$}}
8 // GNU-NEXT: Owner Data size Description
9 // GNU-NEXT: XYZ 0x00000000 NT_VERSION (version)
10 // GNU-EMPTY:
11 // GNU-NEXT: Displaying notes found in: .note.arch{{$}}
12 // GNU-NEXT: Owner Data size Description
13 // GNU-NEXT: XYZ 0x00000000 NT_ARCH (architecture)
14 // GNU-EMPTY:
15 // GNU-NEXT: Displaying notes found in: .note.open{{$}}
16 // GNU-NEXT: Owner Data size Description
17 // GNU-NEXT: XYZ 0x00000000 OPEN
18 // GNU-EMPTY:
19 // GNU-NEXT: Displaying notes found in: .note.func{{$}}
20 // GNU-NEXT: Owner Data size Description
21 // GNU-NEXT: XYZ 0x00000000 func
23 // LLVM: Notes [
24 // LLVM-NEXT: NoteSection {
25 // LLVM-NEXT: Name: .note.version
26 // LLVM-NEXT: Offset: 0x40
27 // LLVM-NEXT: Size: 0x10
28 // LLVM-NEXT: Note {
29 // LLVM-NEXT: Owner: XYZ
30 // LLVM-NEXT: Data size: 0x0
31 // LLVM-NEXT: Type: NT_VERSION (version)
32 // LLVM-NEXT: }
33 // LLVM-NEXT: }
34 // LLVM-NEXT: NoteSection {
35 // LLVM-NEXT: Name: .note.arch
36 // LLVM-NEXT: Offset: 0x50
37 // LLVM-NEXT: Size: 0x10
38 // LLVM-NEXT: Note {
39 // LLVM-NEXT: Owner: XYZ
40 // LLVM-NEXT: Data size: 0x0
41 // LLVM-NEXT: Type: NT_ARCH (architecture)
42 // LLVM-NEXT: }
43 // LLVM-NEXT: }
44 // LLVM-NEXT: NoteSection {
45 // LLVM-NEXT: Name: .note.open
46 // LLVM-NEXT: Offset: 0x60
47 // LLVM-NEXT: Size: 0x10
48 // LLVM-NEXT: Note {
49 // LLVM-NEXT: Owner: XYZ
50 // LLVM-NEXT: Data size: 0x0
51 // LLVM-NEXT: Type: OPEN
52 // LLVM-NEXT: }
53 // LLVM-NEXT: }
54 // LLVM-NEXT: NoteSection {
55 // LLVM-NEXT: Name: .note.func
56 // LLVM-NEXT: Offset: 0x70
57 // LLVM-NEXT: Size: 0x10
58 // LLVM-NEXT: Note {
59 // LLVM-NEXT: Owner: XYZ
60 // LLVM-NEXT: Data size: 0x0
61 // LLVM-NEXT: Type: func
62 // LLVM-NEXT: }
63 // LLVM-NEXT: }
64 // LLVM-NEXT: ]
66 .section ".note.version", "a"
67 .align 4
68 .long 4 /* namesz */
69 .long 0 /* descsz */
70 .long 1 /* type = NT_VERSION */
71 .asciz "XYZ"
72 .section ".note.arch", "a"
73 .align 4
74 .long 4 /* namesz */
75 .long 0 /* descsz */
76 .long 2 /* type = NT_ARCH*/
77 .asciz "XYZ"
78 .section ".note.open", "a"
79 .align 4
80 .long 4 /* namesz */
81 .long 0 /* descsz */
82 .long 0x100 /* type = NT_GNU_BUILD_ATTRIBUTE_OPEN*/
83 .asciz "XYZ"
84 .section ".note.func", "a"
85 .align 4
86 .long 4 /* namesz */
87 .long 0 /* descsz */
88 .long 0x101 /* type = NT_GNU_BUILD_ATTRIBUTE_FUNC*/
89 .asciz "XYZ"