2017-10-30 06:31:48 +08:00
|
|
|
# REQUIRES: x86
|
2019-09-06 23:10:31 +08:00
|
|
|
|
|
|
|
## _edata points to the end of the last mapped initialized section.
|
|
|
|
|
2017-10-30 06:31:48 +08:00
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
|
|
|
|
# RUN: ld.lld %t.o -o %t --gc-sections
|
2020-03-16 08:47:44 +08:00
|
|
|
# RUN: llvm-objdump -t --section-headers %t | FileCheck %s
|
2017-10-30 06:31:48 +08:00
|
|
|
|
2019-09-16 15:05:34 +08:00
|
|
|
# CHECK: .data 00000008 000000000020215c DATA
|
2017-10-30 06:31:48 +08:00
|
|
|
|
2020-03-05 09:19:18 +08:00
|
|
|
# CHECK: 0000000000202164 g .data 0000000000000000 _edata
|
2017-10-30 06:31:48 +08:00
|
|
|
|
|
|
|
.text
|
|
|
|
.globl _start
|
|
|
|
_start:
|
|
|
|
.long .data - .
|
|
|
|
|
|
|
|
.data
|
|
|
|
.quad 0
|
|
|
|
|
|
|
|
.globl _edata
|