2 # RUN: llvm-mc -filetype=obj -triple=x86_64-linux-gnu %s -o %t.o
3 # RUN: ld.lld %t.o -o %t
4 # RUN: llvm-readobj --sections --program-headers %t | FileCheck %s
6 ## Test that we generate the PT_GNU_PROPERTY segment type that describes the
7 ## .note.gnu.property if it is present.
9 # CHECK: Name: .note.gnu.property
10 # CHECK-NEXT: Type: SHT_NOTE (0x7)
11 # CHECK-NEXT: Flags [ (0x2)
12 # CHECK-NEXT: SHF_ALLOC (0x2)
14 # CHECK-NEXT: Address: 0x200190
15 # CHECK-NEXT: Offset: 0x190
16 # CHECK-NEXT: Size: 32
19 # CHECK-NEXT: AddressAlignment: 8
21 # CHECK: Type: PT_GNU_PROPERTY (0x6474E553)
22 # CHECK-NEXT: Offset: 0x190
23 # CHECK-NEXT: VirtualAddress: 0x200190
24 # CHECK-NEXT: PhysicalAddress: 0x200190
25 # CHECK-NEXT: FileSize: 32
26 # CHECK-NEXT: MemSize: 32
27 # CHECK-NEXT: Flags [ (0x4)
28 # CHECK-NEXT: PF_R (0x4)
30 # CHECK-NEXT: Alignment: 8
32 .section ".note.gnu.property", "a"
38 .long 0xc0000002 # GNU_PROPERTY_X86_FEATURE_1_AND
40 .long 1 # GNU_PROPERTY_X86_FEATURE_1_IBT