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-16 15:05:34 +08:00
|
|
|
# CHECK: VirtualAddress: 0x2021C8
|
2019-09-06 23:10:31 +08:00
|
|
|
# CHECK: FileSize: 4
|
2019-09-16 15:05:34 +08:00
|
|
|
# CHECK-NEXT: MemSize: 3640
|
2019-09-06 23:10:31 +08:00
|
|
|
# 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
|