2018-06-06 21:56:51 +08:00
|
|
|
# REQUIRES: x86
|
2015-07-04 06:03:36 +08:00
|
|
|
# RUN: yaml2obj %s > %t.obj
|
2015-07-04 13:28:41 +08:00
|
|
|
# RUN: llvm-as -o %t.lto.obj %S/Inputs/weak-external.ll
|
2015-08-07 00:47:46 +08:00
|
|
|
# RUN: lld-link /out:%t1.exe /entry:g /subsystem:console %t.obj
|
|
|
|
# RUN: lld-link /out:%t2.exe /entry:g /subsystem:console /lldmap:%t2.map %t.obj %t.lto.obj
|
2015-07-04 13:28:41 +08:00
|
|
|
# RUN: FileCheck %s < %t2.map
|
|
|
|
|
2017-02-03 07:58:14 +08:00
|
|
|
# CHECK: lto.tmp
|
2018-03-15 04:41:39 +08:00
|
|
|
# CHECK-NEXT: lto.tmp
|
2017-01-14 11:14:46 +08:00
|
|
|
# CHECK-NEXT: 0 g
|
2015-07-04 06:03:36 +08:00
|
|
|
|
2016-06-28 04:17:08 +08:00
|
|
|
--- !COFF
|
2015-07-31 04:47:17 +08:00
|
|
|
header:
|
2015-07-04 06:03:36 +08:00
|
|
|
Machine: IMAGE_FILE_MACHINE_AMD64
|
|
|
|
Characteristics: [ ]
|
2015-07-31 04:47:17 +08:00
|
|
|
sections:
|
2015-07-04 06:03:36 +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 06:03:36 +08:00
|
|
|
- Name: 'g'
|
|
|
|
Value: 0
|
|
|
|
SectionNumber: 0
|
|
|
|
SimpleType: IMAGE_SYM_TYPE_NULL
|
|
|
|
ComplexType: IMAGE_SYM_DTYPE_FUNCTION
|
|
|
|
StorageClass: IMAGE_SYM_CLASS_WEAK_EXTERNAL
|
2015-07-31 04:47:17 +08:00
|
|
|
WeakExternal:
|
2015-08-18 07:35:43 +08:00
|
|
|
TagIndex: 2
|
2015-07-04 06:03:36 +08:00
|
|
|
Characteristics: IMAGE_WEAK_EXTERN_SEARCH_LIBRARY
|
2015-08-18 07:35:43 +08:00
|
|
|
- Name: 'f'
|
|
|
|
Value: 0
|
|
|
|
SectionNumber: 1
|
|
|
|
SimpleType: IMAGE_SYM_TYPE_NULL
|
|
|
|
ComplexType: IMAGE_SYM_DTYPE_FUNCTION
|
|
|
|
StorageClass: IMAGE_SYM_CLASS_EXTERNAL
|
2015-07-04 06:03:36 +08:00
|
|
|
...
|