2017-02-02 04:58:41 +08:00
|
|
|
// REQUIRES: x86
|
|
|
|
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
|
2018-03-01 10:25:40 +08:00
|
|
|
|
|
|
|
// RUN: ld.lld %t.o -o %t1
|
2019-05-01 13:49:01 +08:00
|
|
|
// RUN: llvm-readobj -l %t1 | FileCheck %s
|
2017-02-02 04:58:41 +08:00
|
|
|
|
|
|
|
// CHECK: Type: PT_NOTE
|
2018-03-01 10:25:40 +08:00
|
|
|
// CHECK-NEXT: Offset:
|
|
|
|
// CHECK-NEXT: VirtualAddress:
|
|
|
|
// CHECK-NEXT: PhysicalAddress:
|
2018-03-01 10:31:29 +08:00
|
|
|
// CHECK-NEXT: FileSize: 16
|
|
|
|
// CHECK-NEXT: MemSize: 16
|
2018-03-01 10:25:40 +08:00
|
|
|
// CHECK-NEXT: Flags [
|
2017-02-02 04:58:41 +08:00
|
|
|
// CHECK-NEXT: PF_R
|
|
|
|
// CHECK-NEXT: ]
|
|
|
|
// CHECK-NEXT: Alignment: 1
|
2018-03-01 10:31:29 +08:00
|
|
|
// CHECK-NOT: Type: PT_NOTE
|
2017-02-02 04:58:41 +08:00
|
|
|
|
2018-03-01 10:25:40 +08:00
|
|
|
// RUN: echo "SECTIONS { .note : { *(.note.a) *(.note.b) } }" > %t.script
|
|
|
|
// RUN: ld.lld %t.o --script %t.script -o %t2
|
2019-05-01 13:49:01 +08:00
|
|
|
// RUN: llvm-readobj -l %t2 | FileCheck -check-prefix=SCRIPT %s
|
2018-03-01 10:25:40 +08:00
|
|
|
|
|
|
|
// SCRIPT: Type: PT_NOTE
|
|
|
|
// SCRIPT-NEXT: Offset:
|
|
|
|
// SCRIPT-NEXT: VirtualAddress:
|
|
|
|
// SCRIPT-NEXT: PhysicalAddress:
|
|
|
|
// SCRIPT-NEXT: FileSize: 16
|
|
|
|
// SCRIPT-NEXT: MemSize: 16
|
|
|
|
// SCRIPT-NEXT: Flags [
|
|
|
|
// SCRIPT-NEXT: PF_R
|
|
|
|
// SCRIPT-NEXT: ]
|
|
|
|
// SCRIPT-NEXT: Alignment: 1
|
2018-03-01 10:31:29 +08:00
|
|
|
// SCRIPT-NOT: Type: PT_NOTE
|
2018-03-01 10:25:40 +08:00
|
|
|
|
2017-02-02 04:58:41 +08:00
|
|
|
.section .note.a, "a", @note
|
|
|
|
.quad 0
|
|
|
|
|
2018-03-01 10:25:40 +08:00
|
|
|
.section .foo, "a"
|
|
|
|
.quad 0
|
|
|
|
|
2017-02-02 04:58:41 +08:00
|
|
|
.section .note.b, "a", @note
|
|
|
|
.quad 0
|