1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/test/MC/COFF/comm.s
David Majnemer 075f09bac5 WinCOFF: Emit common symbols as specified in the COFF spec
Summary:
Local common symbols were properly inserted into the .bss section.
However, putting external common symbols in the .bss section would give
them a strong definition.

Instead, encode them as undefined, external symbols who's symbol value
is equivalent to their size.

Reviewers: Bigcheese, rafael, rnk

CC: llvm-commits

Differential Revision: http://reviews.llvm.org/D3324

llvm-svn: 205811
2014-04-08 22:33:40 +00:00

26 lines
664 B
ArmAsm

// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -t | FileCheck %s
.lcomm _a,4,4
.comm _b, 4
// CHECK: Symbol {
// CHECK: Name: _a
// CHECK-NEXT: Value:
// CHECK-NEXT: Section: .bss
// CHECK-NEXT: BaseType: Null
// CHECK-NEXT: ComplexType: Null
// CHECK-NEXT: StorageClass: Static
// CHECK-NEXT: AuxSymbolCount: 0
// CHECK-NEXT: }
// CHECK: Symbol {
// CHECK: Name: _b
// CHECK-NEXT: Value: 4
// CHECK-NEXT: Section: (0)
// CHECK-NEXT: BaseType: Null
// CHECK-NEXT: ComplexType: Null
// CHECK-NEXT: StorageClass: External
// CHECK-NEXT: AuxSymbolCount: 0
// CHECK-NEXT: }