Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / tools / llvm-readobj / ELF / note-unknown.s
blobaa74b51a3541ba64a5f42153a460ee952deea81c
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
5 // RUN: llvm-readelf --notes %t.o | FileCheck %s --check-prefix=GNU
7 // GNU: Displaying notes found in: .note.foo
8 // GNU-NEXT: Owner Data size Description
9 // GNU-NEXT: XYZ 0x00000000 Unknown note type: (0x00000003)
10 // GNU-EMPTY:
11 // GNU-NEXT: Displaying notes found in: .note.bar
12 // GNU-NEXT: Owner Data size Description
13 // GNU-NEXT: XYZ 0x0000001c Unknown note type: (0x00000003)
14 // GNU-NEXT: description data: 4c 6f 72 65 6d 20 69 70 73 75 6d 20 64 6f 6c 6f 72 20 73 69 74 20 61 6d 65 74 00 00
15 // GNU-EMPTY:
17 // LLVM: Notes [
18 // LLVM-NEXT: NoteSection {
19 // LLVM-NEXT: Name: .note.foo
20 // LLVM-NEXT: Offset: 0x40
21 // LLVM-NEXT: Size: 0x10
22 // LLVM-NEXT: Note {
23 // LLVM-NEXT: Owner: XYZ
24 // LLVM-NEXT: Data size: 0x0
25 // LLVM-NEXT: Type: Unknown (0x00000003)
26 // LLVM-NEXT: }
27 // LLVM-NEXT: }
28 // LLVM-NEXT: NoteSection {
29 // LLVM-NEXT: Name: .note.bar
30 // LLVM-NEXT: Offset: 0x50
31 // LLVM-NEXT: Size: 0x2C
32 // LLVM-NEXT: Note {
33 // LLVM-NEXT: Owner: XYZ
34 // LLVM-NEXT: Data size: 0x1C
35 // LLVM-NEXT: Type: Unknown (0x00000003)
36 // LLVM-NEXT: Description data (
37 // LLVM-NEXT: 0000: 4C6F7265 6D206970 73756D20 646F6C6F |Lorem ipsum dolo|
38 // LLVM-NEXT: 0010: 72207369 7420616D 65740000 |r sit amet..|
39 // LLVM-NEXT: )
40 // LLVM-NEXT: }
41 // LLVM-NEXT: }
42 // LLVM-NEXT: NoteSection {
43 // LLVM-NEXT: Name: .note.8
44 // LLVM-NEXT: Offset: 0x80
45 // LLVM-NEXT: Size: 0x40
46 // LLVM-NEXT: Note {
47 // LLVM-NEXT: Owner: WXYZ
48 // LLVM-NEXT: Data size: 0x8
49 // LLVM-NEXT: Type: Unknown (0x00000006)
50 // LLVM-NEXT: Description data (
51 // LLVM-NEXT: 0000: 4C6F7265 6D000000 |Lorem...|
52 // LLVM-NEXT: )
53 // LLVM-NEXT: }
54 // LLVM-NEXT: Note {
55 // LLVM-NEXT: Owner: VWXYZ
56 // LLVM-NEXT: Data size: 0x8
57 // LLVM-NEXT: Type: Unknown (0x00000006)
58 // LLVM-NEXT: Description data (
59 // LLVM-NEXT: 0000: 78787800 00000000 |xxx.....|
60 // LLVM-NEXT: )
61 // LLVM-NEXT: }
62 // LLVM-NEXT: }
63 // LLVM-NEXT: ]
65 .section ".note.foo", "a"
66 .long 4 /* namesz */
67 .long 0 /* descsz */
68 .long 3 /* type */
69 .asciz "XYZ"
70 .align 4
71 .section ".note.bar", "a"
72 .long 4 /* namesz */
73 .long end - begin /* descsz */
74 .long 3 /* type */
75 .asciz "XYZ"
76 .align 4
77 begin:
78 .asciz "Lorem ipsum dolor sit amet"
79 .align 4
80 end:
82 .section ".note.8", "a"
83 .long 5 /* namesz */
84 .long 2f - 1f /* descsz */
85 .long 6 /* type */
86 .asciz "WXYZ"
87 .align 8
89 .asciz "Lorem"
90 .align 8
93 .long 6 /* namesz */
94 .long 2f - 1f /* descsz */
95 .long 6 /* type */
96 .asciz "VWXYZ"
97 .align 8
99 .asciz "xxx"
100 .align 8