Recommit "rL366894: [yaml2obj] - Allow custom fields for the SHT_UNDEF sections."
[llvm-complete.git] / test / tools / llvm-readobj / note-gnu-property2.s
blob899f6cdbd756accc4e83e8f39315413f67ee1662
1 // REQUIRES: x86-registered-target
2 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o %t
3 // RUN: llvm-readelf --notes %t | FileCheck %s --check-prefix=GNU
4 // RUN: llvm-readobj --elf-output-style LLVM --notes %t | FileCheck %s --check-prefix=LLVM
6 // GNU: Displaying notes found at file offset 0x00000040 with length 0x00000014:
7 // GNU-NEXT: Owner Data size Description
8 // GNU-NEXT: GNU 0x00000004 NT_GNU_PROPERTY_TYPE_0 (property note)
9 // GNU-NEXT: Properties: <corrupted GNU_PROPERTY_TYPE_0>
11 // LLVM: Notes [
12 // LLVM-NEXT: NoteSection {
13 // LLVM-NEXT: Offset: 0x40
14 // LLVM-NEXT: Size: 0x14
15 // LLVM-NEXT: Note {
16 // LLVM-NEXT: Owner: GNU
17 // LLVM-NEXT: Data size: 0x4
18 // LLVM-NEXT: Type: NT_GNU_PROPERTY_TYPE_0 (property note)
19 // LLVM-NEXT: Property [
20 // LLVM-NEXT: <corrupted GNU_PROPERTY_TYPE_0>
21 // LLVM-NEXT: ]
22 // LLVM-NEXT: }
23 // LLVM-NEXT: }
24 // LLVM-NEXT: ]
26 // Section below is broken, check we report that.
28 .section ".note.gnu.property", "a"
29 .align 4
30 .long 4 /* Name length is always 4 ("GNU") */
31 .long end - begin /* Data length */
32 .long 5 /* Type: NT_GNU_PROPERTY_TYPE_0 */
33 .asciz "GNU" /* Name */
34 .p2align 3
35 begin:
36 .long 1 /* Type: GNU_PROPERTY_STACK_SIZE */
37 end: