26 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -position-independent -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o3# 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.script12# RUN: ld.lld -o %t --script %t.script %t.o13# RUN: llvm-readelf -S -s %t | FileCheck %s14 15# CHECK: .bss NOBITS ffffffff80002000 002008 000002 00 WA 0 0 409616# CHECK: ffffffff80003000 0 NOTYPE GLOBAL DEFAULT 3 _end17 18.section .text, "ax"19 ret20 21.section .data, "aw"22 .quad 023 24.section .bss, "", @nobits25 .short 026