2018-06-06 21:56:51 +08:00
|
|
|
# REQUIRES: x86
|
2015-07-04 13:28:41 +08:00
|
|
|
# RUN: yaml2obj %s > %t.obj
|
|
|
|
# RUN: llvm-as -o %t.lto.obj %S/Inputs/weak-external3.ll
|
2015-08-07 00:47:46 +08:00
|
|
|
# RUN: lld-link /out:%t1.exe /entry:f /subsystem:console /lldmap:%t1.map %t.lto.obj
|
2015-07-04 13:28:41 +08:00
|
|
|
# RUN: FileCheck --check-prefix=CHECK1 %s < %t1.map
|
2015-08-07 00:47:46 +08:00
|
|
|
# RUN: lld-link /out:%t2.exe /entry:f /subsystem:console /lldmap:%t2.map %t.obj %t.lto.obj
|
2015-07-04 13:28:41 +08:00
|
|
|
# RUN: FileCheck --check-prefix=CHECK2 %s < %t2.map
|
|
|
|
|
2020-04-16 00:54:22 +08:00
|
|
|
# CHECK1: .lto.obj:
|
|
|
|
# CHECK1-NEXT: .lto.obj:
|
2017-01-14 11:14:46 +08:00
|
|
|
# CHECK1-NEXT: 0 g
|
2015-07-04 13:28:41 +08:00
|
|
|
|
2017-01-14 11:14:46 +08:00
|
|
|
# CHECK2: weak-external3.test.tmp.obj
|
|
|
|
# CHECK2-NEXT: 0 f
|
2015-07-04 13:28:41 +08:00
|
|
|
|
2016-06-28 04:17:08 +08:00
|
|
|
--- !COFF
|
2015-07-31 04:47:17 +08:00
|
|
|
header:
|
2015-07-04 13:28:41 +08:00
|
|
|
Machine: IMAGE_FILE_MACHINE_AMD64
|
|
|
|
Characteristics: [ ]
|
2015-07-31 04:47:17 +08:00
|
|
|
sections:
|
2015-07-04 13:28:41 +08:00
|
|
|
- Name: '.text'
|
|
|
|
Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
|
|
|
|
Alignment: 16
|
|
|
|
SectionData: 00
|
2015-07-31 04:47:17 +08:00
|
|
|
symbols:
|
2015-07-04 13:28:41 +08:00
|
|
|
- Name: 'f'
|
|
|
|
Value: 0
|
|
|
|
SectionNumber: 1
|
|
|
|
SimpleType: IMAGE_SYM_TYPE_NULL
|
|
|
|
ComplexType: IMAGE_SYM_DTYPE_FUNCTION
|
|
|
|
StorageClass: IMAGE_SYM_CLASS_EXTERNAL
|
|
|
|
...
|