1# REQUIRES: x86
2# RUN: llvm-mc -position-independent -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
3# RUN: echo "SECTIONS { \
4# RUN:  . = 0xffffffff80000000; \
5# RUN:  .text : ALIGN(4096) { *(.text) } \
6# RUN:  .data : ALIGN(4096) { *(.data) } \
7# RUN:  .bss : ALIGN(4096) { *(.bss); } \
8# RUN:  . = ALIGN(4096); \
9# RUN:  _end = .; \
10# RUN:  /DISCARD/ : { *(.comment) } \
11# RUN: }" > %t.script
12# RUN: ld.lld -o %t --script %t.script %t.o
13# RUN: llvm-readelf -S -symbols %t | FileCheck %s
14
15# CHECK: .bss NOBITS ffffffff80002000 002008 000002 00 WA 0 0 4096
16# CHECK: ffffffff80003000 0 NOTYPE GLOBAL DEFAULT 3 _end
17
18.section .text, "ax"
19  ret
20
21.section .data, "aw"
22  .quad 0
23
24.section .bss, "", @nobits
25  .short 0
26