2019-09-06 23:10:31 +08:00
|
|
|
# REQUIRES: x86
|
2016-02-06 06:55:06 +08:00
|
|
|
|
2019-09-06 23:10:31 +08:00
|
|
|
## PT_GNU_RELRO includes TLS sections.
|
2016-02-06 06:55:06 +08:00
|
|
|
|
2019-09-06 23:10:31 +08:00
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
|
|
|
|
# RUN: ld.lld %t.o -o %t
|
|
|
|
# RUN: llvm-readobj -l %t | FileCheck %s
|
|
|
|
|
|
|
|
## Currently p_memsz of PT_GNU_RELRO is rounded up to protect the last page.
|
|
|
|
|
|
|
|
# CHECK: Type: PT_GNU_RELRO
|
2019-09-09 11:35:14 +08:00
|
|
|
# CHECK: VirtualAddress: 0x201000
|
2019-09-06 23:10:31 +08:00
|
|
|
# CHECK: FileSize: 4
|
|
|
|
# CHECK-NEXT: MemSize: 4096
|
|
|
|
# CHECK: Alignment: 1
|
2016-02-06 06:55:06 +08:00
|
|
|
|
|
|
|
.section .foo,"awT",@progbits
|
2019-09-06 23:10:31 +08:00
|
|
|
.long 1
|
|
|
|
|
|
|
|
.section .bar,"awT",@nobits
|
|
|
|
.space 2
|