36 lines · plain
1# REQUIRES: x862 3# RUN: llvm-mc -triple=x86_64-windows-gnu %s -filetype=obj -o %t1.obj4# RUN: llvm-mc -triple=x86_64-windows-gnu %S/Inputs/common-replacement.s -filetype=obj -o %t2.obj5 6# RUN: lld-link -lldmingw -entry:main %t1.obj %t2.obj -out:%t.exe -verbose 2>&1 \7# RUN: | FileCheck -check-prefix VERBOSE %s8# RUN: llvm-readobj -S %t.exe | FileCheck -check-prefix SECTIONS %s9 10# VERBOSE: -aligncomm:"foo",211 12# As long as the .comm symbol is replaced with actual data, RawDataSize13# below should be nonzero.14 15# SECTIONS: Name: .data (2E 64 61 74 61 00 00 00)16# SECTIONS-NEXT: VirtualSize: 0x817# SECTIONS-NEXT: VirtualAddress: 0x300018# SECTIONS-NEXT: RawDataSize: 51219 20 21 .text22 .def main;23 .scl 2;24 .type 32;25 .endef26 .globl main27 .p2align 4, 0x9028main:29 movl foo(%rip), %eax30 retq31 32# This produces an aligncomm directive, but when linking in33# Inputs/common-replacement.s, this symbol is replaced by a normal defined34# symbol instead.35 .comm foo, 4, 236