Sym->Aux[0].AuxType = ATWeakExternal;
Sym->Aux[0].Aux.WeakExternal.TagIndex = 0;
Sym->Aux[0].Aux.WeakExternal.Characteristics =
- COFF::IMAGE_WEAK_EXTERN_SEARCH_LIBRARY;
+ COFF::IMAGE_WEAK_EXTERN_SEARCH_ALIAS;
} else {
if (!Base)
Sym->Data.SectionNumber = COFF::IMAGE_SYM_ABSOLUTE;
// CHECK-NEXT: AuxSymbolCount: 1
// CHECK-NEXT: AuxWeakExternal {
// CHECK-NEXT: Linked: external2
-// CHECK-NEXT: Search: Library (0x2)
+// CHECK-NEXT: Search: Alias (0x3)
// CHECK-NEXT: }
// CHECK-NEXT: }
// CHECK-NEXT: Symbol {
// CHECK-NEXT: AuxSymbolCount: 1
// CHECK-NEXT: AuxWeakExternal {
// CHECK-NEXT: Linked: .weak.a.default (9)
-// CHECK-NEXT: Search: Library (0x2)
+// CHECK-NEXT: Search: Alias (0x3)
// CHECK-NEXT: }
// CHECK-NEXT: }
// CHECK-NEXT: Symbol {
// CHECK-NEXT: AuxSymbolCount: 1
// CHECK-NEXT: AuxWeakExternal {
// CHECK-NEXT: Linked: .weak.b.default (8)
-// CHECK-NEXT: Search: Library (0x2)
+// CHECK-NEXT: Search: Alias (0x3)
// CHECK-NEXT: }
// CHECK-NEXT: }
// CHECK-NEXT: Symbol {
// CHECK-NEXT: AuxSymbolCount: 1
// CHECK-NEXT: AuxWeakExternal {
// CHECK-NEXT: Linked: .weak._test_weak.default
-// CHECK-NEXT: Search: Library
+// CHECK-NEXT: Search: Alias
// CHECK-NEXT: }
// CHECK-NEXT: }
// CHECK-NEXT: AuxSymbolCount: 1
// CHECK-NEXT: AuxWeakExternal {
// CHECK-NEXT: Linked: .weak._test_weak_alias.default
-// CHECK-NEXT: Search: Library
+// CHECK-NEXT: Search: Alias
// CHECK-NEXT: }
// CHECK-NEXT: }
-// RUN: llvm-mc %s -o %t -filetype=obj -triple=x86_64-pc-win32
-// RUN: llvm-nm --undefined-only %t | FileCheck %s
-// CHECK: w foo
+// RUN: llvm-mc -triple x86_64-unknown-windows-msvc -filetype obj -o - %s | llvm-readobj --symbols - | FileCheck %s
g:
movl foo(%rip), %eax
retq
.weak foo
+
+// CHECK: Symbol {
+// CHECK: Name: foo
+// CHECK: Section: IMAGE_SYM_UNDEFINED (0)
+// CHECK: StorageClass: WeakExternal (0x69)
+// CHECK: }
+