Recommit "rL366894: [yaml2obj] - Allow custom fields for the SHT_UNDEF sections."
[llvm-complete.git] / test / tools / llvm-readobj / note-unknown.s
blob7b0696a1551d3efebd030389ed81d1d35bcf54be
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 at file offset 0x00000040 with length 0x00000010:
8 // GNU-NEXT: Owner Data size Description
9 // GNU-NEXT: XYZ 0x00000000 Unknown note type: (0x00000003)
11 // LLVM: Notes [
12 // LLVM-NEXT: NoteSection {
13 // LLVM-NEXT: Offset: 0x40
14 // LLVM-NEXT: Size: 0x10
15 // LLVM-NEXT: Note {
16 // LLVM-NEXT: Owner: XYZ
17 // LLVM-NEXT: Data size: 0x0
18 // LLVM-NEXT: Type: Unknown (0x00000003)
19 // LLVM-NEXT: }
20 // LLVM-NEXT: }
21 // LLVM-NEXT: ]
23 .section ".note.foo", "a"
24 .align 4
25 .long 4 /* namesz */
26 .long 0 /* descsz */
27 .long 3 /* type */
28 .asciz "XYZ"