blob: ca47b2bfbcac68c2f49051b31c2404838a95f43b [file] [log] [blame]
# REQUIRES: x86
## The address of a symbol assignment after a non-SHF_ALLOC section equals the
## end address of the last SHF_ALLOC section.
# RUN: echo '.section .nonalloc,""; .quad 0' \
# RUN: | llvm-mc -filetype=obj -triple=x86_64-unknown-linux - -o %t
# RUN: ld.lld -o %t2 --script %s %t
# RUN: llvm-objdump --section-headers -t %t2 | FileCheck %s
# CHECK: Sections:
# CHECK: .text 00000000 0000000000000120
# CHECK: .nonalloc 00000008 0000000000000000
# CHECK: SYMBOL TABLE:
# CHECK: 0000000000000120 g .nonalloc 0000000000000000 Sym
SECTIONS {
. = SIZEOF_HEADERS;
.text : { *(.text) }
.nonalloc : { *(.nonalloc) }
Sym = .;
}