35 lines · plain
1// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s -o %t.o2// RUN: llvm-readobj --symbols %t.o | FileCheck %s3 4// Test that the weak symbol is properly undefined, while originally being5// the leader symbol for a comdat. (This can easily happen if building with6// -ffunction-sections).7 8 .section .text$func,"xr",one_only,func9 .weak func10func:11 ret12 13// CHECK: Symbol {14// CHECK: Name: func15// CHECK-NEXT: Value: 016// CHECK-NEXT: Section: IMAGE_SYM_UNDEFINED (0)17// CHECK-NEXT: BaseType: Null (0x0)18// CHECK-NEXT: ComplexType: Null (0x0)19// CHECK-NEXT: StorageClass: WeakExternal (0x69)20// CHECK-NEXT: AuxSymbolCount: 121// CHECK-NEXT: AuxWeakExternal {22// CHECK-NEXT: Linked: .weak.func.default (10)23// CHECK-NEXT: Search: Alias (0x3)24// CHECK-NEXT: }25// CHECK-NEXT: }26// CHECK-NEXT: Symbol {27// CHECK-NEXT: Name: .weak.func.default28// CHECK-NEXT: Value: 029// CHECK-NEXT: Section: .text$func (4)30// CHECK-NEXT: BaseType: Null (0x0)31// CHECK-NEXT: ComplexType: Null (0x0)32// CHECK-NEXT: StorageClass: External (0x2)33// CHECK-NEXT: AuxSymbolCount: 034// CHECK-NEXT: }35