1 // RUN
: llvm-mc
-filetype
=obj
-triple aarch64-linux-gnu
%s
-o
%t
2 // RUN
: llvm-readelf
--notes
%t | FileCheck
%s
--check-prefix
=GNU
3 // RUN
: llvm-readobj
--notes
%t | FileCheck
%s
--check-prefix
=LLVM
5 // GNU
: Displaying notes found at file offset
0x00000040 with length
0x00000020:
6 // GNU-NEXT
: Owner Data size Description
7 // GNU-NEXT
: GNU
0x00000010 NT_GNU_PROPERTY_TYPE_0
(property note
)
8 // GNU-NEXT
: Properties
: aarch64 feature
: BTI
, PAC
11 // LLVM-NEXT
: NoteSection
{
12 // LLVM-NEXT
: Offset
: 0x40
13 // LLVM-NEXT
: Size
: 0x20
15 // LLVM-NEXT
: Owner
: GNU
16 // LLVM-NEXT
: Data size
: 0x10
17 // LLVM-NEXT
: Type
: NT_GNU_PROPERTY_TYPE_0
(property note
)
18 // LLVM-NEXT
: Property
[
19 // LLVM-NEXT
: aarch64 feature
: BTI
, PAC
25 .section ".note.gnu.property", "a"
27 .long 4 /* Name length is always 4 ("GNU") */
28 .long end - begin /* Data length */
29 .long 5 /* Type: NT_GNU_PROPERTY_TYPE_0 */
30 .asciz "GNU" /* Name */
33 /* BTI and PAC property note */
34 .long 0xc0000000 /* Type: GNU_PROPERTY_AARCH64_FEATURE_1_AND */
35 .long 4 /* Data size */
36 .long 3 /* BTI and PAC */
37 .p2align 3 /* Align to 8 byte for 64 bit */