1// REQUIRES: x86
2// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3
4// RUN: ld.lld %t.o -o %t1
5// RUN: llvm-readobj -l %t1 | FileCheck %s
6
7// CHECK:      Type: PT_NOTE
8// CHECK-NEXT: Offset:
9// CHECK-NEXT: VirtualAddress:
10// CHECK-NEXT: PhysicalAddress:
11// CHECK-NEXT: FileSize: 16
12// CHECK-NEXT: MemSize: 16
13// CHECK-NEXT: Flags [
14// CHECK-NEXT:   PF_R
15// CHECK-NEXT: ]
16// CHECK-NEXT: Alignment: 1
17// CHECK-NOT:  Type: PT_NOTE
18
19// RUN: echo "SECTIONS { .note : { *(.note.a) *(.note.b) } }" > %t.script
20// RUN: ld.lld %t.o --script %t.script -o %t2
21// RUN: llvm-readobj -l %t2 | FileCheck -check-prefix=SCRIPT %s
22
23// SCRIPT:      Type: PT_NOTE
24// SCRIPT-NEXT: Offset:
25// SCRIPT-NEXT: VirtualAddress:
26// SCRIPT-NEXT: PhysicalAddress:
27// SCRIPT-NEXT: FileSize: 16
28// SCRIPT-NEXT: MemSize: 16
29// SCRIPT-NEXT: Flags [
30// SCRIPT-NEXT:   PF_R
31// SCRIPT-NEXT: ]
32// SCRIPT-NEXT: Alignment: 1
33// SCRIPT-NOT:  Type: PT_NOTE
34
35.section .note.a, "a", @note
36.quad 0
37
38.section .foo, "a"
39.quad 0
40
41.section .note.b, "a", @note
42.quad 0
43