1# REQUIRES: x86 2 3# RUN: llvm-mc -triple=x86_64-windows-gnu %s -filetype=obj -o %t1.obj 4# RUN: llvm-mc -triple=x86_64-windows-gnu %S/Inputs/common-replacement.s -filetype=obj -o %t2.obj 5 6# RUN: lld-link -lldmingw -entry:main %t1.obj %t2.obj -out:%t.exe -verbose 2>&1 \ 7# RUN: | FileCheck -check-prefix VERBOSE %s 8# RUN: llvm-readobj -S %t.exe | FileCheck -check-prefix SECTIONS %s 9 10# VERBOSE: -aligncomm:"foo",2 11 12# As long as the .comm symbol is replaced with actual data, RawDataSize 13# below should be nonzero. 14 15# SECTIONS: Name: .data (2E 64 61 74 61 00 00 00) 16# SECTIONS-NEXT: VirtualSize: 0x8 17# SECTIONS-NEXT: VirtualAddress: 0x3000 18# SECTIONS-NEXT: RawDataSize: 512 19 20 21 .text 22 .def main; 23 .scl 2; 24 .type 32; 25 .endef 26 .globl main 27 .p2align 4, 0x90 28main: 29 movl foo(%rip), %eax 30 retq 31 32# This produces an aligncomm directive, but when linking in 33# Inputs/common-replacement.s, this symbol is replaced by a normal defined 34# symbol instead. 35 .comm foo, 4, 2 36