1# REQUIRES: x86 2# RUN: llvm-mc %s -filetype=obj -triple=x86_64-windows-msvc -o %t.obj 3# RUN: lld-link -entry:main -nodefaultlib %t.obj -out:%t.exe 4# RUN: llvm-readobj %t.exe -sections -section-data | FileCheck %s 5 6# Section relocations against common symbols resolve to .bss (merged into .data). 7 8# CHECK: Sections [ 9# CHECK: Section { 10# CHECK: Number: 1 11# CHECK: Name: .text (2E 74 65 78 74 00 00 00) 12# CHECK: VirtualSize: 0x1 13# CHECK: SectionData ( 14# CHECK: 0000: C3 |.| 15# CHECK: ) 16# CHECK: } 17# CHECK: Section { 18# CHECK: Number: 2 19# CHECK: Name: .rdata (2E 72 64 61 74 61 00 00) 20# CHECK: SectionData ( 21# CHECK: 0000: 00020000 03000000 |........| 22# CHECK: ) 23# CHECK: } 24# CHECK: Section { 25# CHECK: Number: 3 26# CHECK: Name: .data (2E 64 61 74 61 00 00 00) 27# CHECK: VirtualSize: 0x204 28# CHECK: RawDataSize: 512 29# CHECK: } 30# CHECK-NOT: Section 31# CHECK: ] 32 33.text 34.global main 35main: 36ret 37 38.comm common_global,4,2 39 40.section .rdata,"dr" 41.secrel32 common_global 42.secidx common_global 43.short 0 44 45.section .data,"drw" 46.zero 512 47