llvm-project/lld/test/COFF/weak-external3.test

33 lines
972 B
Plaintext

# REQUIRES: x86
# RUN: yaml2obj %s > %t.obj
# RUN: llvm-as -o %t.lto.obj %S/Inputs/weak-external3.ll
# RUN: lld-link /out:%t1.exe /entry:f /subsystem:console /lldmap:%t1.map %t.lto.obj
# RUN: FileCheck --check-prefix=CHECK1 %s < %t1.map
# RUN: lld-link /out:%t2.exe /entry:f /subsystem:console /lldmap:%t2.map %t.obj %t.lto.obj
# RUN: FileCheck --check-prefix=CHECK2 %s < %t2.map
# CHECK1: lto.tmp
# CHECK1: lto.tmp
# CHECK1-NEXT: 0 g
# CHECK2: weak-external3.test.tmp.obj
# CHECK2-NEXT: 0 f
--- !COFF
header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: [ ]
sections:
- Name: '.text'
Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
Alignment: 16
SectionData: 00
symbols:
- Name: 'f'
Value: 0
SectionNumber: 1
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_FUNCTION
StorageClass: IMAGE_SYM_CLASS_EXTERNAL
...