git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116155
91177308-0d34-0410-b5e6-
96231b3b80d8
if (Sec->Number == -1)
continue;
- Sec->Header.SizeOfRawData = Layout.getSectionFileSize(i);
+ Sec->Header.SizeOfRawData = Layout.getSectionAddressSize(i);
if (IsPhysicalSection(Sec)) {
Sec->Header.PointerToRawData = offset;
--- /dev/null
+// The purpose of this test is to verify that bss sections are emited correctly.\r
+\r
+// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | coff-dump.py | FileCheck %s\r
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | coff-dump.py | FileCheck %s\r
+\r
+ .bss\r
+ .globl _g0\r
+ .align 4\r
+_g0:\r
+ .long 0\r
+\r
+// CHECK: Name = .bss\r
+// CHECK-NEXT: VirtualSize = 0\r
+// CHECK-NEXT: VirtualAddress = 0\r
+// CHECK-NEXT: SizeOfRawData = 4\r