blob: 473e0a24a7e778c65bc5c45419931cb66428916c [file] [log] [blame]
George Rimar6a14c022018-03-21 08:34:55 +00001// REQUIRES: x86-registered-target
2// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o %t
Jordan Rupprecht4f36c7a2018-11-07 23:53:50 +00003// RUN: llvm-readobj -elf-output-style GNU --notes %t | FileCheck %s --check-prefix=GNU
4// RUN: llvm-readobj -elf-output-style LLVM --notes %t | FileCheck %s --check-prefix=LLVM
George Rimar6a14c022018-03-21 08:34:55 +00005
Jordan Rupprecht4f36c7a2018-11-07 23:53:50 +00006// 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>
10
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: ]
George Rimar6a14c022018-03-21 08:34:55 +000025
26// Section below is broken, check we report that.
27
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
35begin:
36 .long 1 /* Type: GNU_PROPERTY_STACK_SIZE */
37end: