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
>
12 // LLVM-NEXT
: NoteSection
{
13 // LLVM-NEXT
: Offset
: 0x40
14 // LLVM-NEXT
: Size
: 0x14
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
>
26 // Section below is broken
, check we report that.
28 .section ".note.gnu.property", "a"
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 */
36 .long 1 /* Type: GNU_PROPERTY_STACK_SIZE */