1# RUN: yaml2obj %s -o %t.in.o 2 3# RUN: llvm-objdump -t %t.in.o | FileCheck %s --check-prefixes=SYMBOLS,SYMBOLS-PRE 4 5# RUN: llvm-objcopy -N func %t.in.o %t.out.o 6# RUN: llvm-objdump -t %t.out.o | FileCheck %s --check-prefixes=SYMBOLS,SYMBOLS-POST 7 8# RUN: not llvm-objcopy -N .weak.foobar.file1 %t.in.o %t.err.o 2>&1 | FileCheck %s --check-prefix=ERROR 9 10# SYMBOLS: SYMBOL TABLE: 11# SYMBOLS-PRE-NEXT: func 12# SYMBOLS-NEXT: .weak.foobar.file1 13# SYMBOLS-NEXT: foobar 14# SYMBOLS-PRE-NEXT: AUX indx 1 15# SYMBOLS-POST-NEXT: AUX indx 0 16# SYMBOLS-EMPTY: 17 18# ERROR: symbol 'foobar' is missing its weak target 19 20--- !COFF 21header: 22 Machine: IMAGE_FILE_MACHINE_AMD64 23 Characteristics: [ ] 24sections: 25 - Name: .text 26 Characteristics: [ ] 27symbols: 28 - Name: func 29 Value: 0 30 SectionNumber: 1 31 SimpleType: IMAGE_SYM_TYPE_NULL 32 ComplexType: IMAGE_SYM_DTYPE_NULL 33 StorageClass: IMAGE_SYM_CLASS_EXTERNAL 34 - Name: .weak.foobar.file1 35 Value: 1 36 SectionNumber: 1 37 SimpleType: IMAGE_SYM_TYPE_NULL 38 ComplexType: IMAGE_SYM_DTYPE_NULL 39 StorageClass: IMAGE_SYM_CLASS_EXTERNAL 40 - Name: foobar 41 Value: 0 42 SectionNumber: 0 43 SimpleType: IMAGE_SYM_TYPE_NULL 44 ComplexType: IMAGE_SYM_DTYPE_FUNCTION 45 StorageClass: IMAGE_SYM_CLASS_WEAK_EXTERNAL 46 WeakExternal: 47 TagIndex: 1 48 Characteristics: IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY 49... 50