brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.6 KiB · a832707 Raw
102 lines · plain
1# RUN: yaml2obj %s -o %t.obj2# RUN: lld-link /opt:icf /entry:foo /out:%t.exe /subsystem:console /include:bar \3# RUN:   /verbose %t.obj > %t.log 2>&14# RUN: FileCheck -check-prefix=ICF %s < %t.log5 6# ICF: Selected foo7# ICF:   Removed bar8 9# RUN: lld-link /entry:foo /out:%t.exe /subsystem:console /include:bar \10# RUN:   /verbose /opt:noicf %t.obj > %t.log 2>&111# RUN: FileCheck -check-prefix=NOICF %s < %t.log12# RUN: lld-link /entry:foo /out:%t.exe /subsystem:console /include:bar \13# RUN:   /verbose /opt:noref,noicf %t.obj > %t.log 2>&114# RUN: FileCheck -check-prefix=NOICF %s < %t.log15 16# ICF is on by default (no /opt: flags).17# RUN: lld-link /entry:foo /out:%t.exe /subsystem:console \18# RUN:   /include:bar /verbose %t.obj > %t.log 2>&119# RUN: FileCheck -check-prefix=ICF %s < %t.log20 21# /debug disables ICF.22# RUN: lld-link /debug /entry:foo /out:%t.exe /subsystem:console \23# RUN:   /include:bar /verbose %t.obj > %t.log 2>&124# RUN: FileCheck -check-prefix=NOICF %s < %t.log25 26# /profile disables ICF.27# RUN: lld-link /profile /entry:foo /out:%t.exe /subsystem:console \28# RUN:   /include:bar /verbose %t.obj > %t.log 2>&129# RUN: FileCheck -check-prefix=NOICF %s < %t.log30 31# /opt:noref disables ICF.32# RUN: lld-link /opt:noref /entry:foo /out:%t.exe /subsystem:console \33# RUN:   /include:bar /verbose %t.obj > %t.log 2>&134# RUN: FileCheck -check-prefix=NOICF %s < %t.log35 36# /debug /opt:ref enables ICF.37# RUN: lld-link /debug /opt:ref /entry:foo /out:%t.exe /subsystem:console \38# RUN:   /include:bar /verbose %t.obj > %t.log 2>&139# RUN: FileCheck -check-prefix=ICF %s < %t.log40 41# /debug /opt:noicf,ref disables ICF.42# RUN: lld-link /debug /opt:noicf,ref /entry:foo /out:%t.exe /subsystem:console \43# RUN:   /include:bar /verbose %t.obj > %t.log 2>&144# RUN: FileCheck -check-prefix=NOICF %s < %t.log45 46# NOICF-NOT: Removed foo47# NOICF-NOT: Removed bar48 49--- !COFF50header:51  Machine:         IMAGE_FILE_MACHINE_AMD6452  Characteristics: []53sections:54  - Name:            '.text$mn'55    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]56    Alignment:       1657    SectionData:     4883EC28E8000000004883C428C358  - Name:            '.text$mn'59    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]60    Alignment:       1661    SectionData:     4883EC28E8000000004883C428C362symbols:63  - Name:            '.text$mn'64    Value:           065    SectionNumber:   166    SimpleType:      IMAGE_SYM_TYPE_NULL67    ComplexType:     IMAGE_SYM_DTYPE_NULL68    StorageClass:    IMAGE_SYM_CLASS_STATIC69    SectionDefinition:70      Length:          1471      NumberOfRelocations: 072      NumberOfLinenumbers: 073      CheckSum:        168275251374      Number:          075      Selection:       IMAGE_COMDAT_SELECT_NODUPLICATES76  - Name:            '.text$mn'77    Value:           078    SectionNumber:   279    SimpleType:      IMAGE_SYM_TYPE_NULL80    ComplexType:     IMAGE_SYM_DTYPE_NULL81    StorageClass:    IMAGE_SYM_CLASS_STATIC82    SectionDefinition:83      Length:          1484      NumberOfRelocations: 085      NumberOfLinenumbers: 086      CheckSum:        168275251387      Number:          088      Selection:       IMAGE_COMDAT_SELECT_NODUPLICATES89  - Name:            foo90    Value:           091    SectionNumber:   192    SimpleType:      IMAGE_SYM_TYPE_NULL93    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION94    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL95  - Name:            bar96    Value:           097    SectionNumber:   298    SimpleType:      IMAGE_SYM_TYPE_NULL99    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION100    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL101...102