summaryrefslogtreecommitdiff
path: root/test/COFF
diff options
context:
space:
mode:
Diffstat (limited to 'test/COFF')
-rw-r--r--test/COFF/Inputs/alpha.ll9
-rw-r--r--test/COFF/Inputs/beta.ll7
-rw-r--r--test/COFF/Inputs/except_handler3.libbin0 -> 1364 bytes
-rw-r--r--test/COFF/Inputs/far-arm-thumb-abs20.s2
-rw-r--r--test/COFF/Inputs/gamma.ll14
-rw-r--r--test/COFF/Inputs/library2-arm64.libbin0 -> 1720 bytes
-rw-r--r--test/COFF/Inputs/library2.def3
-rw-r--r--test/COFF/Inputs/locally-imported-def.s4
-rw-r--r--test/COFF/Inputs/locally-imported-imp.s2
-rw-r--r--test/COFF/Inputs/lto-cache.ll10
-rw-r--r--test/COFF/Inputs/pdb-globals.yaml593
-rw-r--r--test/COFF/Inputs/pdb-hashes-1.yaml540
-rw-r--r--test/COFF/Inputs/pdb-hashes-2-missing.yaml321
-rw-r--r--test/COFF/Inputs/pdb-hashes-2.yaml355
-rw-r--r--test/COFF/Inputs/pdb-scopes-a.yaml116
-rw-r--r--test/COFF/Inputs/pdb-scopes-b.yaml100
-rw-r--r--test/COFF/Inputs/pdb_comdat_bar.yaml116
-rw-r--r--test/COFF/Inputs/pdb_comdat_main.yaml116
-rw-r--r--test/COFF/Inputs/pdb_lines_1.yaml118
-rw-r--r--test/COFF/Inputs/pdb_lines_2.yaml70
-rw-r--r--test/COFF/arm-thumb-branch20-error.s10
-rw-r--r--test/COFF/arm64-dynamicbase.s8
-rw-r--r--test/COFF/arm64-import2.test85
-rw-r--r--test/COFF/arm64-relocs-imports.test153
-rw-r--r--test/COFF/armnt-blx23t.test2
-rw-r--r--test/COFF/armnt-branch24t.test2
-rw-r--r--test/COFF/armnt-dynamicbase.test3
-rw-r--r--test/COFF/armnt-imports.test2
-rw-r--r--test/COFF/armnt-mov32t-exec.test2
-rw-r--r--test/COFF/armnt-movt32t.test2
-rw-r--r--test/COFF/common-alignment.test78
-rw-r--r--test/COFF/ctors_dtors_priority.s30
-rw-r--r--test/COFF/debug-dwarf.test19
-rw-r--r--test/COFF/def-export-stdcall.s78
-rw-r--r--test/COFF/delayimports-armnt.yaml106
-rw-r--r--test/COFF/delayimports32.test4
-rw-r--r--test/COFF/dllexport-mingw.s24
-rw-r--r--test/COFF/driver.test3
-rw-r--r--test/COFF/duplicate.test12
-rw-r--r--test/COFF/entry-drectve.test24
-rw-r--r--test/COFF/entry-inference.test8
-rw-r--r--test/COFF/export-all.s86
-rw-r--r--test/COFF/export-arm64.yaml70
-rw-r--r--test/COFF/export-armnt.yaml72
-rw-r--r--test/COFF/export32.test5
-rw-r--r--test/COFF/filename-casing.s14
-rw-r--r--test/COFF/force.test7
-rw-r--r--test/COFF/guardcf.test6
-rw-r--r--test/COFF/hello32.test6
-rw-r--r--test/COFF/icf-associative.test2
-rw-r--r--test/COFF/icf-executable.s18
-rw-r--r--test/COFF/icf-simple.test27
-rw-r--r--test/COFF/icf-xdata.s86
-rw-r--r--test/COFF/include.test13
-rw-r--r--test/COFF/libpath.test12
-rw-r--r--test/COFF/linkrepro-manifest.test12
-rw-r--r--test/COFF/linkrepro-pdb.test9
-rw-r--r--test/COFF/linkrepro-res.test12
-rw-r--r--test/COFF/loadcfg.test21
-rw-r--r--test/COFF/locally-imported-arm64.test61
-rw-r--r--test/COFF/locally-imported-warn-multiple.s14
-rw-r--r--test/COFF/locally-imported.test4
-rw-r--r--test/COFF/long-section-name.test23
-rw-r--r--test/COFF/lto-cache.ll21
-rw-r--r--test/COFF/lto-opt-level.ll12
-rw-r--r--test/COFF/lto-reloc-model.ll19
-rw-r--r--test/COFF/manifest.test16
-rw-r--r--test/COFF/manifestinput-error.test10
-rw-r--r--test/COFF/manifestinput-nowarning.test11
-rw-r--r--test/COFF/manifestinput.test4
-rw-r--r--test/COFF/msvclto-archive.ll6
-rw-r--r--test/COFF/msvclto-order.ll2
-rw-r--r--test/COFF/msvclto.ll2
-rw-r--r--test/COFF/nodefaultlib.test6
-rw-r--r--test/COFF/nopdb.test14
-rw-r--r--test/COFF/options.test8
-rw-r--r--test/COFF/pdata-arm64.yaml87
-rw-r--r--test/COFF/pdb-comdat.test43
-rw-r--r--test/COFF/pdb-diff.test17
-rw-r--r--test/COFF/pdb-global-gc.yaml22
-rw-r--r--test/COFF/pdb-global-hashes.test93
-rw-r--r--test/COFF/pdb-globals.test42
-rw-r--r--test/COFF/pdb-heapsite.yaml1561
-rw-r--r--test/COFF/pdb-import-gc.yaml20
-rw-r--r--test/COFF/pdb-invalid-func-type.yaml2
-rw-r--r--test/COFF/pdb-lib.s6
-rw-r--r--test/COFF/pdb-linker-module.test38
-rw-r--r--test/COFF/pdb-none.test3
-rw-r--r--test/COFF/pdb-options.test2
-rw-r--r--test/COFF/pdb-procid-remapping.test29
-rw-r--r--test/COFF/pdb-publics-import.test42
-rw-r--r--test/COFF/pdb-safeseh.yaml11
-rw-r--r--test/COFF/pdb-same-name.test23
-rw-r--r--test/COFF/pdb-scopes.test6
-rw-r--r--test/COFF/pdb-secrel-absolute.yaml11
-rw-r--r--test/COFF/pdb-source-lines.test35
-rw-r--r--test/COFF/pdb-symbol-types.yaml20
-rw-r--r--test/COFF/pdb-thunk.yaml2747
-rw-r--r--test/COFF/pdb-type-server-simple.test24
-rw-r--r--test/COFF/pdb.test160
-rw-r--r--test/COFF/reloc-arm.test16
-rw-r--r--test/COFF/reloc-discarded-dwarf.s2
-rw-r--r--test/COFF/reloc-discarded-early.s8
-rw-r--r--test/COFF/reloc-discarded-early2.s9
-rw-r--r--test/COFF/reloc-discarded.s1
-rw-r--r--test/COFF/responsefile.test20
-rw-r--r--test/COFF/rsds.test40
-rw-r--r--test/COFF/safeseh-md.s34
-rw-r--r--test/COFF/safeseh.s15
-rw-r--r--test/COFF/section-size.s14
-rw-r--r--test/COFF/seh-comdat.test66
-rw-r--r--test/COFF/strtab-size.s216
-rw-r--r--test/COFF/subsystem-drectve.test21
-rw-r--r--test/COFF/symtab.test6
-rw-r--r--test/COFF/thinlto.ll2
-rw-r--r--test/COFF/wholearchive.s19
-rw-r--r--test/COFF/wx.s17
117 files changed, 8822 insertions, 590 deletions
diff --git a/test/COFF/Inputs/alpha.ll b/test/COFF/Inputs/alpha.ll
new file mode 100644
index 000000000000..53fc36beee68
--- /dev/null
+++ b/test/COFF/Inputs/alpha.ll
@@ -0,0 +1,9 @@
+define void @_DllMainCRTStartup() {
+entry:
+ ret void
+}
+
+define dllexport void @f() local_unnamed_addr {
+entry:
+ ret void
+}
diff --git a/test/COFF/Inputs/beta.ll b/test/COFF/Inputs/beta.ll
new file mode 100644
index 000000000000..ff98618d884f
--- /dev/null
+++ b/test/COFF/Inputs/beta.ll
@@ -0,0 +1,7 @@
+declare dllimport void @f() local_unnamed_addr
+
+define void @g() local_unnamed_addr {
+entry:
+ tail call void @f()
+ ret void
+}
diff --git a/test/COFF/Inputs/except_handler3.lib b/test/COFF/Inputs/except_handler3.lib
new file mode 100644
index 000000000000..fdc51ed73285
--- /dev/null
+++ b/test/COFF/Inputs/except_handler3.lib
Binary files differ
diff --git a/test/COFF/Inputs/far-arm-thumb-abs20.s b/test/COFF/Inputs/far-arm-thumb-abs20.s
new file mode 100644
index 000000000000..8483e32dc7f0
--- /dev/null
+++ b/test/COFF/Inputs/far-arm-thumb-abs20.s
@@ -0,0 +1,2 @@
+.global too_far20
+too_far20 = 0x501004
diff --git a/test/COFF/Inputs/gamma.ll b/test/COFF/Inputs/gamma.ll
new file mode 100644
index 000000000000..1c78fff2909d
--- /dev/null
+++ b/test/COFF/Inputs/gamma.ll
@@ -0,0 +1,14 @@
+
+declare void @f() local_unnamed_addr
+
+define void @__imp_f() local_unnamed_addr {
+entry:
+ ret void
+}
+
+define void @mainCRTStartup() local_unnamed_addr {
+entry:
+ tail call void @f()
+ ret void
+}
+
diff --git a/test/COFF/Inputs/library2-arm64.lib b/test/COFF/Inputs/library2-arm64.lib
new file mode 100644
index 000000000000..6fedf06f7be5
--- /dev/null
+++ b/test/COFF/Inputs/library2-arm64.lib
Binary files differ
diff --git a/test/COFF/Inputs/library2.def b/test/COFF/Inputs/library2.def
new file mode 100644
index 000000000000..d1906010cd30
--- /dev/null
+++ b/test/COFF/Inputs/library2.def
@@ -0,0 +1,3 @@
+LIBRARY library2
+EXPORTS
+ function2
diff --git a/test/COFF/Inputs/locally-imported-def.s b/test/COFF/Inputs/locally-imported-def.s
new file mode 100644
index 000000000000..60a0970e9702
--- /dev/null
+++ b/test/COFF/Inputs/locally-imported-def.s
@@ -0,0 +1,4 @@
+.text
+.globl f
+f:
+ ret
diff --git a/test/COFF/Inputs/locally-imported-imp.s b/test/COFF/Inputs/locally-imported-imp.s
new file mode 100644
index 000000000000..33f2d54f617f
--- /dev/null
+++ b/test/COFF/Inputs/locally-imported-imp.s
@@ -0,0 +1,2 @@
+.text
+ call __imp_f
diff --git a/test/COFF/Inputs/lto-cache.ll b/test/COFF/Inputs/lto-cache.ll
new file mode 100644
index 000000000000..acbee7be0144
--- /dev/null
+++ b/test/COFF/Inputs/lto-cache.ll
@@ -0,0 +1,10 @@
+target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-pc-windows-msvc"
+
+define i32 @main() {
+entry:
+ call void (...) @globalfunc()
+ ret i32 0
+}
+
+declare void @globalfunc(...)
diff --git a/test/COFF/Inputs/pdb-globals.yaml b/test/COFF/Inputs/pdb-globals.yaml
new file mode 100644
index 000000000000..98ef914d9041
--- /dev/null
+++ b/test/COFF/Inputs/pdb-globals.yaml
@@ -0,0 +1,593 @@
+# // YAML Generated from the following source code:
+# // Compile with clang-cl /Z7 /GS- /c t.obj pdb-globals.cpp
+#
+# void *__purecall = 0;
+#
+# struct HelloPoint {
+# int X = 3;
+# int Y = 4;
+# int Z = 5;
+# };
+#
+# // S_LPROCREF
+# static int LocalFunc() { return 42; }
+#
+# // S_PROCREF
+# int GlobalFunc() { return 43; }
+#
+# // S_LDATA32
+# const int ConstantVar = 17;
+#
+# // S_GDATA32
+# const int *GlobalVar = &ConstantVar;
+#
+# // S_CONSTANT
+# constexpr int ConstexprVar = 18;
+#
+# // S_UDT
+# typedef HelloPoint HelloPointTypedef;
+#
+# int main(int argc, char **argv) {
+# HelloPointTypedef P;
+# int N = P.X + P.Y + P.Z;
+# N += LocalFunc() + GlobalFunc();
+# N += *GlobalVar;
+# N += ConstexprVar;
+# }
+
+
+--- !COFF
+header:
+ Machine: IMAGE_FILE_MACHINE_I386
+ Characteristics: [ ]
+sections:
+ - Name: .text
+ Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+ Alignment: 16
+ SectionData: 5589E5B82B0000005DC3660F1F4400005589E583EC208B450C8B4D088D55F4894DEC89D18945E8E8000000008B4DF4034DF8034DFC894DF08945E4E8000000008945E0E80000000031C98B55E001C20355F08955F0A1000000008B000345F08945F08B45F083C0128945F089C883C4205DC366666666662E0F1F8400000000005589E5B82A0000005DC3
+ Relocations:
+ - VirtualAddress: 40
+ SymbolName: '??0HelloPoint@@QAE@XZ'
+ Type: IMAGE_REL_I386_REL32
+ - VirtualAddress: 60
+ SymbolName: '?LocalFunc@@YAHXZ'
+ Type: IMAGE_REL_I386_REL32
+ - VirtualAddress: 68
+ SymbolName: '?GlobalFunc@@YAHXZ'
+ Type: IMAGE_REL_I386_REL32
+ - VirtualAddress: 86
+ SymbolName: '?GlobalVar@@3PBHB'
+ Type: IMAGE_REL_I386_DIR32
+ - Name: .data
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
+ Alignment: 4
+ SectionData: '00000000'
+ Relocations:
+ - VirtualAddress: 0
+ SymbolName: _ConstantVar
+ Type: IMAGE_REL_I386_DIR32
+ - Name: .bss
+ Characteristics: [ IMAGE_SCN_CNT_UNINITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
+ Alignment: 4
+ SectionData: ''
+ - Name: .text
+ Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+ Alignment: 16
+ SectionData: 5589E550894DFC8B4DFCC70103000000C7410404000000C741080500000089C883C4045DC3
+ - Name: .rdata
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
+ Alignment: 4
+ SectionData: '11000000'
+ - Name: .drectve
+ Characteristics: [ IMAGE_SCN_LNK_INFO, IMAGE_SCN_LNK_REMOVE ]
+ Alignment: 1
+ SectionData: 202F44454641554C544C49423A6C6962636D742E6C6962202F44454641554C544C49423A6F6C646E616D65732E6C6962
+ - Name: '.debug$S'
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
+ Alignment: 4
+ SectionData: 04000000F10000002F0000002D003C1101000000070006000000000000007017000000000000636C616E672076657273696F6E20362E302E30200000F100000036000000300047110000000000000000000000000A00000000000000000000000210000000000000000000476C6F62616C46756E630002004F110000F20000002000000000000000000000000A0000000000000001000000140000000000000010000000F1000000B60000002A00471100000000000000000000000062000000000000000000000006100000000000000000006D61696E000D003E1174000000010061726763001200451116000000080000001F000000000053000D003E11031000000100617267760012004511160000000C0000001F000000000053000A003E1107100000000050001200451116000000F4FFFFFF1F000000000053000A003E117400000000004E001200451116000000F0FFFFFF1F0000000000530002004F110000F200000050000000000000000000000062000000000000000700000044000000000000001E0000000F0000001F0000001C000000200000002800000021000000450000002200000052000000230000005B00000024000000F1000000350000002F0046110000000000000000000000000A00000000000000000000000F100000000000000000004C6F63616C46756E630002004F11000000F20000002000000000000000000000000A000000000000000100000014000000000000000D000000F10000004B00000017000D11030400000000000000005F5F7075726563616C6C0016000D1111100000000000000000476C6F62616C5661720018000C1110100000000000000000436F6E7374616E745661720000F10000002D000000180008110710000048656C6C6F506F696E745479706564656600110008110910000048656C6C6F506F696E7400000000F4000000080000000100000000000000F30000003800000000643A5C7372635C6C6C766D2D6D6F6E6F5C6C6C645C746573745C636F66665C696E707574735C7064622D676C6F62616C732E6370700000
+ Subsections:
+ - !Symbols
+ Records:
+ - Kind: S_COMPILE3
+ Compile3Sym:
+ Flags: [ ]
+ Machine: Pentium3
+ FrontendMajor: 6
+ FrontendMinor: 0
+ FrontendBuild: 0
+ FrontendQFE: 0
+ BackendMajor: 6000
+ BackendMinor: 0
+ BackendBuild: 0
+ BackendQFE: 0
+ Version: 'clang version 6.0.0 '
+ - Kind: S_GPROC32_ID
+ ProcSym:
+ CodeSize: 10
+ DbgStart: 0
+ DbgEnd: 0
+ FunctionType: 4098
+ Flags: [ ]
+ DisplayName: GlobalFunc
+ - Kind: S_PROC_ID_END
+ ScopeEndSym:
+ - Kind: S_GPROC32_ID
+ ProcSym:
+ CodeSize: 98
+ DbgStart: 0
+ DbgEnd: 0
+ FunctionType: 4102
+ Flags: [ ]
+ DisplayName: main
+ - Kind: S_LOCAL
+ LocalSym:
+ Type: 116
+ Flags: [ IsParameter ]
+ VarName: argc
+ - Kind: S_DEFRANGE_REGISTER_REL
+ DefRangeRegisterRelSym:
+ - Kind: S_LOCAL
+ LocalSym:
+ Type: 4099
+ Flags: [ IsParameter ]
+ VarName: argv
+ - Kind: S_DEFRANGE_REGISTER_REL
+ DefRangeRegisterRelSym:
+ - Kind: S_LOCAL
+ LocalSym:
+ Type: 4103
+ Flags: [ ]
+ VarName: P
+ - Kind: S_DEFRANGE_REGISTER_REL
+ DefRangeRegisterRelSym:
+ - Kind: S_LOCAL
+ LocalSym:
+ Type: 116
+ Flags: [ ]
+ VarName: N
+ - Kind: S_DEFRANGE_REGISTER_REL
+ DefRangeRegisterRelSym:
+ - Kind: S_PROC_ID_END
+ ScopeEndSym:
+ - Kind: S_LPROC32_ID
+ ProcSym:
+ CodeSize: 10
+ DbgStart: 0
+ DbgEnd: 0
+ FunctionType: 4111
+ Flags: [ ]
+ DisplayName: LocalFunc
+ - Kind: S_PROC_ID_END
+ ScopeEndSym:
+ - Kind: S_GDATA32
+ DataSym:
+ Type: 1027
+ DisplayName: __purecall
+ - Kind: S_GDATA32
+ DataSym:
+ Type: 4113
+ DisplayName: GlobalVar
+ - Kind: S_LDATA32
+ DataSym:
+ Type: 4112
+ DisplayName: ConstantVar
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4103
+ UDTName: HelloPointTypedef
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4105
+ UDTName: HelloPoint
+ - !FileChecksums
+ Checksums:
+ - FileName: 'd:\src\llvm-mono\lld\test\coff\inputs\pdb-globals.cpp'
+ Kind: None
+ Checksum: ''
+ - !StringTable
+ Strings:
+ - 'd:\src\llvm-mono\lld\test\coff\inputs\pdb-globals.cpp'
+ - ''
+ Relocations:
+ - VirtualAddress: 100
+ SymbolName: '?GlobalFunc@@YAHXZ'
+ Type: IMAGE_REL_I386_SECREL
+ - VirtualAddress: 104
+ SymbolName: '?GlobalFunc@@YAHXZ'
+ Type: IMAGE_REL_I386_SECTION
+ - VirtualAddress: 132
+ SymbolName: '?GlobalFunc@@YAHXZ'
+ Type: IMAGE_REL_I386_SECREL
+ - VirtualAddress: 136
+ SymbolName: '?GlobalFunc@@YAHXZ'
+ Type: IMAGE_REL_I386_SECTION
+ - VirtualAddress: 204
+ SymbolName: _main
+ Type: IMAGE_REL_I386_SECREL
+ - VirtualAddress: 208
+ SymbolName: _main
+ Type: IMAGE_REL_I386_SECTION
+ - VirtualAddress: 243
+ SymbolName: .text
+ Type: IMAGE_REL_I386_SECREL
+ - VirtualAddress: 247
+ SymbolName: .text
+ Type: IMAGE_REL_I386_SECTION
+ - VirtualAddress: 278
+ SymbolName: .text
+ Type: IMAGE_REL_I386_SECREL
+ - VirtualAddress: 282
+ SymbolName: .text
+ Type: IMAGE_REL_I386_SECTION
+ - VirtualAddress: 310
+ SymbolName: .text
+ Type: IMAGE_REL_I386_SECREL
+ - VirtualAddress: 314
+ SymbolName: .text
+ Type: IMAGE_REL_I386_SECTION
+ - VirtualAddress: 342
+ SymbolName: .text
+ Type: IMAGE_REL_I386_SECREL
+ - VirtualAddress: 346
+ SymbolName: .text
+ Type: IMAGE_REL_I386_SECTION
+ - VirtualAddress: 364
+ SymbolName: _main
+ Type: IMAGE_REL_I386_SECREL
+ - VirtualAddress: 368
+ SymbolName: _main
+ Type: IMAGE_REL_I386_SECTION
+ - VirtualAddress: 484
+ SymbolName: '?LocalFunc@@YAHXZ'
+ Type: IMAGE_REL_I386_SECREL
+ - VirtualAddress: 488
+ SymbolName: '?LocalFunc@@YAHXZ'
+ Type: IMAGE_REL_I386_SECTION
+ - VirtualAddress: 516
+ SymbolName: '?LocalFunc@@YAHXZ'
+ Type: IMAGE_REL_I386_SECREL
+ - VirtualAddress: 520
+ SymbolName: '?LocalFunc@@YAHXZ'
+ Type: IMAGE_REL_I386_SECTION
+ - VirtualAddress: 564
+ SymbolName: '?__purecall@@3PAXA'
+ Type: IMAGE_REL_I386_SECREL
+ - VirtualAddress: 568
+ SymbolName: '?__purecall@@3PAXA'
+ Type: IMAGE_REL_I386_SECTION
+ - VirtualAddress: 589
+ SymbolName: '?GlobalVar@@3PBHB'
+ Type: IMAGE_REL_I386_SECREL
+ - VirtualAddress: 593
+ SymbolName: '?GlobalVar@@3PBHB'
+ Type: IMAGE_REL_I386_SECTION
+ - VirtualAddress: 613
+ SymbolName: _ConstantVar
+ Type: IMAGE_REL_I386_SECREL
+ - VirtualAddress: 617
+ SymbolName: _ConstantVar
+ Type: IMAGE_REL_I386_SECTION
+ - Name: '.debug$T'
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
+ Alignment: 4
+ SectionData: 0400000006000112000000000E000810740000000000000000100000160001160000000001100000476C6F62616C46756E6300F10A000210700400000A8000000E0001120200000074000000031000000E0008107400000000000200041000001200011600000000051000006D61696E00F3F2F13200051500008002000000000000000000000000000048656C6C6F506F696E74002E3F415548656C6C6F506F696E74404000F2F1260003120D15030074000000000058000D15030074000000040059000D1503007400000008005A0032000515030000020810000000000000000000000C0048656C6C6F506F696E74002E3F415548656C6C6F506F696E74404000F2F13E00051600000000643A5C7372635C6C6C766D2D6D6F6E6F5C6C6C645C746573745C636F66665C696E707574735C7064622D676C6F62616C732E63707000F2F10E000616091000000A100000060000000A000210071000000A8000001A00091003000000071000000C1000000B000000001000000000000016000216071000000D10000048656C6C6F506F696E7400F11600011600000000011000004C6F63616C46756E6300F2F10A000110740000000100F2F10A000210101000000A800000
+ Types:
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ ]
+ - Kind: LF_PROCEDURE
+ Procedure:
+ ReturnType: 116
+ CallConv: NearC
+ Options: [ None ]
+ ParameterCount: 0
+ ArgumentList: 4096
+ - Kind: LF_FUNC_ID
+ FuncId:
+ ParentScope: 0
+ FunctionType: 4097
+ Name: GlobalFunc
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 1136
+ Attrs: 32778
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ 116, 4099 ]
+ - Kind: LF_PROCEDURE
+ Procedure:
+ ReturnType: 116
+ CallConv: NearC
+ Options: [ None ]
+ ParameterCount: 2
+ ArgumentList: 4100
+ - Kind: LF_FUNC_ID
+ FuncId:
+ ParentScope: 0
+ FunctionType: 4101
+ Name: main
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 0
+ Options: [ None, ForwardReference, HasUniqueName ]
+ FieldList: 0
+ Name: HelloPoint
+ UniqueName: '.?AUHelloPoint@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 0
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 116
+ FieldOffset: 0
+ Name: X
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 116
+ FieldOffset: 4
+ Name: Y
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 116
+ FieldOffset: 8
+ Name: Z
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 3
+ Options: [ None, HasUniqueName ]
+ FieldList: 4104
+ Name: HelloPoint
+ UniqueName: '.?AUHelloPoint@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 12
+ - Kind: LF_STRING_ID
+ StringId:
+ Id: 0
+ String: 'd:\src\llvm-mono\lld\test\coff\inputs\pdb-globals.cpp'
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4105
+ SourceFile: 4106
+ LineNumber: 6
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4103
+ Attrs: 32778
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4103
+ ThisType: 4108
+ CallConv: ThisCall
+ Options: [ None ]
+ ParameterCount: 0
+ ArgumentList: 4096
+ ThisPointerAdjustment: 0
+ - Kind: LF_MFUNC_ID
+ MemberFuncId:
+ ClassType: 4103
+ FunctionType: 4109
+ Name: HelloPoint
+ - Kind: LF_FUNC_ID
+ FuncId:
+ ParentScope: 0
+ FunctionType: 4097
+ Name: LocalFunc
+ - Kind: LF_MODIFIER
+ Modifier:
+ ModifiedType: 116
+ Modifiers: [ None, Const ]
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4112
+ Attrs: 32778
+ - Name: '.debug$S'
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
+ Alignment: 4
+ SectionData: 04000000F1000000650000003C0047110000000000000000000000002500000000000000000000000E1000000000000000000048656C6C6F506F696E743A3A48656C6C6F506F696E74000D003E110C100000010074686973001200451116000000FCFFFFFF0A00000000001B0002004F11000000F20000004000000000000000000000002500000000000000050000003400000000000000060000000A00000007000000100000000800000017000000090000001E00000006000000
+ Subsections:
+ - !Symbols
+ Records:
+ - Kind: S_GPROC32_ID
+ ProcSym:
+ CodeSize: 37
+ DbgStart: 0
+ DbgEnd: 0
+ FunctionType: 4110
+ Flags: [ ]
+ DisplayName: 'HelloPoint::HelloPoint'
+ - Kind: S_LOCAL
+ LocalSym:
+ Type: 4108
+ Flags: [ IsParameter ]
+ VarName: this
+ - Kind: S_DEFRANGE_REGISTER_REL
+ DefRangeRegisterRelSym:
+ - Kind: S_PROC_ID_END
+ ScopeEndSym:
+ Relocations:
+ - VirtualAddress: 44
+ SymbolName: '??0HelloPoint@@QAE@XZ'
+ Type: IMAGE_REL_I386_SECREL
+ - VirtualAddress: 48
+ SymbolName: '??0HelloPoint@@QAE@XZ'
+ Type: IMAGE_REL_I386_SECTION
+ - VirtualAddress: 101
+ SymbolName: .text
+ Type: IMAGE_REL_I386_SECREL
+ - VirtualAddress: 105
+ SymbolName: .text
+ Type: IMAGE_REL_I386_SECTION
+ - VirtualAddress: 124
+ SymbolName: '??0HelloPoint@@QAE@XZ'
+ Type: IMAGE_REL_I386_SECREL
+ - VirtualAddress: 128
+ SymbolName: '??0HelloPoint@@QAE@XZ'
+ Type: IMAGE_REL_I386_SECTION
+symbols:
+ - Name: .text
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 138
+ NumberOfRelocations: 4
+ NumberOfLinenumbers: 0
+ CheckSum: 3215092891
+ Number: 1
+ - Name: .data
+ Value: 0
+ SectionNumber: 2
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 4
+ NumberOfRelocations: 1
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 2
+ - Name: .bss
+ Value: 0
+ SectionNumber: 3
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 4
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 3
+ - Name: .text
+ Value: 0
+ SectionNumber: 4
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 37
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 77530982
+ Number: 4
+ Selection: IMAGE_COMDAT_SELECT_ANY
+ - Name: '??0HelloPoint@@QAE@XZ'
+ Value: 0
+ SectionNumber: 4
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: .rdata
+ Value: 0
+ SectionNumber: 5
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 4
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 3903140090
+ Number: 5
+ - Name: .drectve
+ Value: 0
+ SectionNumber: 6
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 48
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 149686238
+ Number: 6
+ - Name: '.debug$S'
+ Value: 0
+ SectionNumber: 7
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 768
+ NumberOfRelocations: 26
+ NumberOfLinenumbers: 0
+ CheckSum: 2940884584
+ Number: 7
+ - Name: '.debug$S'
+ Value: 0
+ SectionNumber: 9
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 188
+ NumberOfRelocations: 6
+ NumberOfLinenumbers: 0
+ CheckSum: 1246640575
+ Number: 4
+ Selection: IMAGE_COMDAT_SELECT_ASSOCIATIVE
+ - Name: '.debug$T'
+ Value: 0
+ SectionNumber: 8
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 452
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 2561906059
+ Number: 8
+ - Name: '@feat.00'
+ Value: 1
+ SectionNumber: -1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ - Name: '?GlobalFunc@@YAHXZ'
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: _main
+ Value: 16
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: '?LocalFunc@@YAHXZ'
+ Value: 128
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ - Name: '?GlobalVar@@3PBHB'
+ Value: 0
+ SectionNumber: 2
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: '?__purecall@@3PAXA'
+ Value: 0
+ SectionNumber: 3
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: _ConstantVar
+ Value: 0
+ SectionNumber: 5
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+...
diff --git a/test/COFF/Inputs/pdb-hashes-1.yaml b/test/COFF/Inputs/pdb-hashes-1.yaml
new file mode 100644
index 000000000000..ad9e69188f51
--- /dev/null
+++ b/test/COFF/Inputs/pdb-hashes-1.yaml
@@ -0,0 +1,540 @@
+--- !COFF
+header:
+ Machine: IMAGE_FILE_MACHINE_I386
+ Characteristics: [ ]
+sections:
+ - Name: .text
+ Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+ Alignment: 16
+ SectionData: 5589E55683EC188B450C8B4D088D55F4C745F8000000008B7508894DF089D18934248945ECE80000000083EC048D4DF4890C248945E8E80000000083C4185E5DC3
+ Relocations:
+ - VirtualAddress: 38
+ SymbolName: '??0Foo@NS@@QAE@H@Z'
+ Type: IMAGE_REL_I386_REL32
+ - VirtualAddress: 55
+ SymbolName: '?func@NS@@YAHABUFoo@1@@Z'
+ Type: IMAGE_REL_I386_REL32
+ - Name: .data
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
+ Alignment: 4
+ SectionData: ''
+ - Name: .bss
+ Characteristics: [ IMAGE_SCN_CNT_UNINITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
+ Alignment: 4
+ SectionData: ''
+ - Name: .text
+ Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+ Alignment: 16
+ SectionData: 5589E583EC088B4508894DFC8B4DFC8B550889118945F889C883C4085DC20400
+ - Name: .drectve
+ Characteristics: [ IMAGE_SCN_LNK_INFO, IMAGE_SCN_LNK_REMOVE ]
+ Alignment: 1
+ SectionData: 202F44454641554C544C49423A6C6962636D742E6C6962202F44454641554C544C49423A6F6C646E616D65732E6C6962
+ - Name: '.debug$S'
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
+ Alignment: 4
+ SectionData: 04000000F10000002F0000002D003C1101000000070006000000000000007017000000000000636C616E672076657273696F6E20362E302E30200000F50000008400000000000000000000004100000000000000080000000000000052000000070000000400000001000000400000000000000008000000000000007F0000000600040000000000030000003E000000000000000800000000000000BD0000000400040000000000040000003D000000000000000800000000000000FA0000000300080000000000F1000000960000002A00471100000000000000000000000041000000000000000000000003100000000000000000006D61696E000D003E1174000000010061726763001200451116000000080000001700000000002A000D003E11001000000100617267760012004511160000000C0000001700000000002A000A003E1109100000000066001200451116000000F4FFFFFF1700000000002A0002004F110000F200000030000000000000000000000041000000000000000300000024000000000000000300000017000000040000003000000005000000F1000000100000000E000811091000004E533A3A466F6F00F40000003000000001000000100165C9E387F88362A8EB2B49539DD5A65500002B00000010019303CF100D518DAF59C31DA01FEF4AFC0000F30000004801000000443A5C7372635C6C6C766D6275696C645C636C616E675C44656275675C7838365C6F626A312E63707000443A5C7372635C6C6C766D6275696C645C636C616E675C44656275675C7838365C6F626A2E6800245430202E7261536561726368203D202465697020245430205E203D2024657370202454302034202B203D2000245430202E7261536561726368203D202465697020245430205E203D2024657370202454302034202B203D2024656270202454302034202D205E203D200024543020246562702034202B203D202465697020245430205E203D2024657370202454302034202B203D2024656270202454302034202D205E203D200024543020246562702034202B203D202465697020245430205E203D2024657370202454302034202B203D2024656270202454302034202D205E203D2024657369202454302038202D205E203D2000
+ Subsections:
+ - !Symbols
+ Records:
+ - Kind: S_COMPILE3
+ Compile3Sym:
+ Flags: [ ]
+ Machine: Pentium3
+ FrontendMajor: 6
+ FrontendMinor: 0
+ FrontendBuild: 0
+ FrontendQFE: 0
+ BackendMajor: 6000
+ BackendMinor: 0
+ BackendBuild: 0
+ BackendQFE: 0
+ Version: 'clang version 6.0.0 '
+ - !FrameData
+ Frames:
+ - CodeSize: 65
+ FrameFunc: '$T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = '
+ LocalSize: 0
+ MaxStackSize: 0
+ ParamsSize: 8
+ PrologSize: 7
+ RvaStart: 0
+ SavedRegsSize: 0
+ - CodeSize: 64
+ FrameFunc: '$T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = '
+ LocalSize: 0
+ MaxStackSize: 0
+ ParamsSize: 8
+ PrologSize: 6
+ RvaStart: 1
+ SavedRegsSize: 4
+ - CodeSize: 62
+ FrameFunc: '$T0 $ebp 4 + = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = '
+ LocalSize: 0
+ MaxStackSize: 0
+ ParamsSize: 8
+ PrologSize: 4
+ RvaStart: 3
+ SavedRegsSize: 4
+ - CodeSize: 61
+ FrameFunc: '$T0 $ebp 4 + = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $esi $T0 8 - ^ = '
+ LocalSize: 0
+ MaxStackSize: 0
+ ParamsSize: 8
+ PrologSize: 3
+ RvaStart: 4
+ SavedRegsSize: 8
+ - !Symbols
+ Records:
+ - Kind: S_GPROC32_ID
+ ProcSym:
+ CodeSize: 65
+ DbgStart: 0
+ DbgEnd: 0
+ FunctionType: 4099
+ Flags: [ ]
+ DisplayName: main
+ - Kind: S_LOCAL
+ LocalSym:
+ Type: 116
+ Flags: [ IsParameter ]
+ VarName: argc
+ - Kind: S_DEFRANGE_REGISTER_REL
+ DefRangeRegisterRelSym:
+ - Kind: S_LOCAL
+ LocalSym:
+ Type: 4096
+ Flags: [ IsParameter ]
+ VarName: argv
+ - Kind: S_DEFRANGE_REGISTER_REL
+ DefRangeRegisterRelSym:
+ - Kind: S_LOCAL
+ LocalSym:
+ Type: 4105
+ Flags: [ ]
+ VarName: f
+ - Kind: S_DEFRANGE_REGISTER_REL
+ DefRangeRegisterRelSym:
+ - Kind: S_PROC_ID_END
+ ScopeEndSym:
+ - !Lines
+ CodeSize: 65
+ Flags: [ ]
+ RelocOffset: 0
+ RelocSegment: 0
+ Blocks:
+ - FileName: 'D:\src\llvmbuild\clang\Debug\x86\obj1.cpp'
+ Lines:
+ - Offset: 0
+ LineStart: 3
+ IsStatement: false
+ EndDelta: 0
+ - Offset: 23
+ LineStart: 4
+ IsStatement: false
+ EndDelta: 0
+ - Offset: 48
+ LineStart: 5
+ IsStatement: false
+ EndDelta: 0
+ Columns:
+ - !Symbols
+ Records:
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4105
+ UDTName: 'NS::Foo'
+ - !FileChecksums
+ Checksums:
+ - FileName: 'D:\src\llvmbuild\clang\Debug\x86\obj1.cpp'
+ Kind: MD5
+ Checksum: 65C9E387F88362A8EB2B49539DD5A655
+ - FileName: 'D:\src\llvmbuild\clang\Debug\x86\obj.h'
+ Kind: MD5
+ Checksum: 9303CF100D518DAF59C31DA01FEF4AFC
+ - !StringTable
+ Strings:
+ - 'D:\src\llvmbuild\clang\Debug\x86\obj1.cpp'
+ - 'D:\src\llvmbuild\clang\Debug\x86\obj.h'
+ - '$T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = '
+ - '$T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = '
+ - '$T0 $ebp 4 + = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = '
+ - '$T0 $ebp 4 + = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = $esi $T0 8 - ^ = '
+ Relocations:
+ - VirtualAddress: 68
+ SymbolName: _main
+ Type: IMAGE_REL_I386_DIR32NB
+ - VirtualAddress: 240
+ SymbolName: _main
+ Type: IMAGE_REL_I386_SECREL
+ - VirtualAddress: 244
+ SymbolName: _main
+ Type: IMAGE_REL_I386_SECTION
+ - VirtualAddress: 279
+ SymbolName: .text
+ Type: IMAGE_REL_I386_SECREL
+ - VirtualAddress: 283
+ SymbolName: .text
+ Type: IMAGE_REL_I386_SECTION
+ - VirtualAddress: 314
+ SymbolName: .text
+ Type: IMAGE_REL_I386_SECREL
+ - VirtualAddress: 318
+ SymbolName: .text
+ Type: IMAGE_REL_I386_SECTION
+ - VirtualAddress: 346
+ SymbolName: .text
+ Type: IMAGE_REL_I386_SECREL
+ - VirtualAddress: 350
+ SymbolName: .text
+ Type: IMAGE_REL_I386_SECTION
+ - VirtualAddress: 368
+ SymbolName: _main
+ Type: IMAGE_REL_I386_SECREL
+ - VirtualAddress: 372
+ SymbolName: _main
+ Type: IMAGE_REL_I386_SECTION
+ - Name: '.debug$T'
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
+ Alignment: 4
+ SectionData: 040000000A000210700400000A8000000E0001120200000074000000001000000E0008107400000000000200011000001200011600000000021000006D61696E00F3F2F12A0005150000800200000000000000000000000000004E533A3A466F6F002E3F4155466F6F404E53404000F10A000210041000000A8000000A00011201000000740000001A0009100300000004100000051000000B00010006100000000000001A0003120D15030074000000000058001115030007100000466F6F002A0005150200000208100000000000000000000004004E533A3A466F6F002E3F4155466F6F404E53404000F12E00051600000000443A5C7372635C6C6C766D6275696C645C636C616E675C44656275675C7838365C6F626A2E6800F10E000616091000000A100000020000000E0002160410000007100000466F6F00
+ Types:
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 1136
+ Attrs: 32778
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ 116, 4096 ]
+ - Kind: LF_PROCEDURE
+ Procedure:
+ ReturnType: 116
+ CallConv: NearC
+ Options: [ None ]
+ ParameterCount: 2
+ ArgumentList: 4097
+ - Kind: LF_FUNC_ID
+ FuncId:
+ ParentScope: 0
+ FunctionType: 4098
+ Name: main
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 0
+ Options: [ None, ForwardReference, HasUniqueName ]
+ FieldList: 0
+ Name: 'NS::Foo'
+ UniqueName: '.?AUFoo@NS@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 0
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4100
+ Attrs: 32778
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ 116 ]
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4100
+ ThisType: 4101
+ CallConv: ThisCall
+ Options: [ None ]
+ ParameterCount: 1
+ ArgumentList: 4102
+ ThisPointerAdjustment: 0
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 116
+ FieldOffset: 0
+ Name: X
+ - Kind: LF_ONEMETHOD
+ OneMethod:
+ Type: 4103
+ Attrs: 3
+ VFTableOffset: -1
+ Name: Foo
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 2
+ Options: [ None, HasUniqueName ]
+ FieldList: 4104
+ Name: 'NS::Foo'
+ UniqueName: '.?AUFoo@NS@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 4
+ - Kind: LF_STRING_ID
+ StringId:
+ Id: 0
+ String: 'D:\src\llvmbuild\clang\Debug\x86\obj.h'
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4105
+ SourceFile: 4106
+ LineNumber: 2
+ - Kind: LF_MFUNC_ID
+ MemberFuncId:
+ ClassType: 4100
+ FunctionType: 4103
+ Name: Foo
+ - Name: '.debug$H'
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
+ Alignment: 4
+ SectionData: C5C93301000000009E56666824DC4B12E25261D4E09E6E9DA0F4EE31FDEC3D2D96287486127C66070B248ED52E421F55074AE5CC2D68AF9F0A3BEF23993968F7FD82CA84BF0439C1A64C9070C6A6ADB0A34D21DAD0FFC3E99E616EF06A14EA74A2420F9062A1FB04917E5975E3A50EABE5E8FE3945468547C19DC681D0BFB3B797DD91CA4D7F1953C314442D5549419E78044E38A0BF16BFFAA5EE9C0103E7DBFE9941E63379C0B0C0A9021B711ACC4F67008974EBF441031BDD653F6935DFF3112C6A5346EF2AC94B9B7EB56EF55CFA0AF6C1846743F43D846BB19517E12E8873BBA90CC41DD1BEAC89CBA8897AC1BA46762E2557A82D894CEAE81AEF8680D723D403D9A4481F0E28683A98
+ GlobalHashes:
+ Version: 0
+ HashAlgorithm: 0
+ HashValues:
+ - 9E56666824DC4B12E25261D4E09E6E9DA0F4EE31
+ - FDEC3D2D96287486127C66070B248ED52E421F55
+ - 074AE5CC2D68AF9F0A3BEF23993968F7FD82CA84
+ - BF0439C1A64C9070C6A6ADB0A34D21DAD0FFC3E9
+ - 9E616EF06A14EA74A2420F9062A1FB04917E5975
+ - E3A50EABE5E8FE3945468547C19DC681D0BFB3B7
+ - 97DD91CA4D7F1953C314442D5549419E78044E38
+ - A0BF16BFFAA5EE9C0103E7DBFE9941E63379C0B0
+ - C0A9021B711ACC4F67008974EBF441031BDD653F
+ - 6935DFF3112C6A5346EF2AC94B9B7EB56EF55CFA
+ - 0AF6C1846743F43D846BB19517E12E8873BBA90C
+ - C41DD1BEAC89CBA8897AC1BA46762E2557A82D89
+ - 4CEAE81AEF8680D723D403D9A4481F0E28683A98
+ - Name: '.debug$S'
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
+ Alignment: 4
+ SectionData: 04000000F500000064000000000000000000000020000000000000000400000000000000520000000600000004000000010000001F0000000000000004000000000000007F0000000500040000000000030000001D000000000000000400000000000000BD0000000300040000000000F10000007B000000320047110000000000000000000000002000000000000000000000000C100000000000000000004E533A3A466F6F3A3A466F6F000D003E1105100000010074686973001200451116000000FCFFFFFF0F000000000011000A003E1174000000010078001200451116000000080000000F0000000000110002004F1100F2000000200000000000000000000000200000001800000001000000140000000000000003000000
+ Subsections:
+ - !FrameData
+ Frames:
+ - CodeSize: 32
+ FrameFunc: '$T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = '
+ LocalSize: 0
+ MaxStackSize: 0
+ ParamsSize: 4
+ PrologSize: 6
+ RvaStart: 0
+ SavedRegsSize: 0
+ - CodeSize: 31
+ FrameFunc: '$T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = '
+ LocalSize: 0
+ MaxStackSize: 0
+ ParamsSize: 4
+ PrologSize: 5
+ RvaStart: 1
+ SavedRegsSize: 4
+ - CodeSize: 29
+ FrameFunc: '$T0 $ebp 4 + = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = '
+ LocalSize: 0
+ MaxStackSize: 0
+ ParamsSize: 4
+ PrologSize: 3
+ RvaStart: 3
+ SavedRegsSize: 4
+ - !Symbols
+ Records:
+ - Kind: S_GPROC32_ID
+ ProcSym:
+ CodeSize: 32
+ DbgStart: 0
+ DbgEnd: 0
+ FunctionType: 4108
+ Flags: [ ]
+ DisplayName: 'NS::Foo::Foo'
+ - Kind: S_LOCAL
+ LocalSym:
+ Type: 4101
+ Flags: [ IsParameter ]
+ VarName: this
+ - Kind: S_DEFRANGE_REGISTER_REL
+ DefRangeRegisterRelSym:
+ - Kind: S_LOCAL
+ LocalSym:
+ Type: 116
+ Flags: [ IsParameter ]
+ VarName: x
+ - Kind: S_DEFRANGE_REGISTER_REL
+ DefRangeRegisterRelSym:
+ - Kind: S_PROC_ID_END
+ ScopeEndSym:
+ - !Lines
+ CodeSize: 32
+ Flags: [ ]
+ RelocOffset: 0
+ RelocSegment: 0
+ Blocks:
+ - FileName: 'D:\src\llvmbuild\clang\Debug\x86\obj.h'
+ Lines:
+ - Offset: 0
+ LineStart: 3
+ IsStatement: false
+ EndDelta: 0
+ Columns:
+ Relocations:
+ - VirtualAddress: 12
+ SymbolName: '??0Foo@NS@@QAE@H@Z'
+ Type: IMAGE_REL_I386_DIR32NB
+ - VirtualAddress: 152
+ SymbolName: '??0Foo@NS@@QAE@H@Z'
+ Type: IMAGE_REL_I386_SECREL
+ - VirtualAddress: 156
+ SymbolName: '??0Foo@NS@@QAE@H@Z'
+ Type: IMAGE_REL_I386_SECTION
+ - VirtualAddress: 199
+ SymbolName: .text
+ Type: IMAGE_REL_I386_SECREL
+ - VirtualAddress: 203
+ SymbolName: .text
+ Type: IMAGE_REL_I386_SECTION
+ - VirtualAddress: 231
+ SymbolName: .text
+ Type: IMAGE_REL_I386_SECREL
+ - VirtualAddress: 235
+ SymbolName: .text
+ Type: IMAGE_REL_I386_SECTION
+ - VirtualAddress: 252
+ SymbolName: '??0Foo@NS@@QAE@H@Z'
+ Type: IMAGE_REL_I386_SECREL
+ - VirtualAddress: 256
+ SymbolName: '??0Foo@NS@@QAE@H@Z'
+ Type: IMAGE_REL_I386_SECTION
+symbols:
+ - Name: .text
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 65
+ NumberOfRelocations: 2
+ NumberOfLinenumbers: 0
+ CheckSum: 4176946275
+ Number: 1
+ - Name: .data
+ Value: 0
+ SectionNumber: 2
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 0
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 2
+ - Name: .bss
+ Value: 0
+ SectionNumber: 3
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 0
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 3
+ - Name: .text
+ Value: 0
+ SectionNumber: 4
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 32
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 1438182552
+ Number: 4
+ Selection: IMAGE_COMDAT_SELECT_ANY
+ - Name: '??0Foo@NS@@QAE@H@Z'
+ Value: 0
+ SectionNumber: 4
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: .drectve
+ Value: 0
+ SectionNumber: 5
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 48
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 149686238
+ Number: 5
+ - Name: '.debug$S'
+ Value: 0
+ SectionNumber: 6
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 832
+ NumberOfRelocations: 11
+ NumberOfLinenumbers: 0
+ CheckSum: 4106171226
+ Number: 6
+ - Name: '.debug$S'
+ Value: 0
+ SectionNumber: 9
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 284
+ NumberOfRelocations: 9
+ NumberOfLinenumbers: 0
+ CheckSum: 1378739251
+ Number: 4
+ Selection: IMAGE_COMDAT_SELECT_ASSOCIATIVE
+ - Name: '.debug$T'
+ Value: 0
+ SectionNumber: 7
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 316
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 3343977630
+ Number: 7
+ - Name: '.debug$H'
+ Value: 0
+ SectionNumber: 8
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 268
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 3965031229
+ Number: 8
+ - Name: '@feat.00'
+ Value: 1
+ SectionNumber: -1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ - Name: _main
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: '?func@NS@@YAHABUFoo@1@@Z'
+ Value: 0
+ SectionNumber: 0
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+...
diff --git a/test/COFF/Inputs/pdb-hashes-2-missing.yaml b/test/COFF/Inputs/pdb-hashes-2-missing.yaml
new file mode 100644
index 000000000000..74f3a62fcc23
--- /dev/null
+++ b/test/COFF/Inputs/pdb-hashes-2-missing.yaml
@@ -0,0 +1,321 @@
+--- !COFF
+header:
+ Machine: IMAGE_FILE_MACHINE_I386
+ Characteristics: [ ]
+sections:
+ - Name: .text
+ Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+ Alignment: 16
+ SectionData: 5589E5508B45088B4D088B09C1E1018945FC89C883C4045DC3
+ - Name: .data
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
+ Alignment: 4
+ SectionData: ''
+ - Name: .bss
+ Characteristics: [ IMAGE_SCN_CNT_UNINITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
+ Alignment: 4
+ SectionData: ''
+ - Name: .drectve
+ Characteristics: [ IMAGE_SCN_LNK_INFO, IMAGE_SCN_LNK_REMOVE ]
+ Alignment: 1
+ SectionData: 202F44454641554C544C49423A6C6962636D742E6C6962202F44454641554C544C49423A6F6C646E616D65732E6C6962
+ - Name: '.debug$S'
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
+ Alignment: 4
+ SectionData: 04000000F10000002F0000002D003C1101000000070006000000000000007017000000000000636C616E672076657273696F6E20362E302E30200000F5000000640000000000000000000000190000000000000004000000000000002B000000040000000400000001000000180000000000000004000000000000005800000003000400000000000300000016000000000000000400000000000000960000000100040000000000F1000000540000002E0047110000000000000000000000001900000000000000000000000D100000000000000000004E533A3A66756E63000A003E110310000001006600120045111600000008000000070000000000120002004F11F20000002800000000000000000000001900000000000000020000001C00000000000000030000000700000004000000F1000000100000000E0008110A1000004E533A3A466F6F00F40000001800000001000000100159DFAC75D18675AED1AD169FE316317E0000F3000000D400000000443A5C7372635C6C6C766D6275696C645C636C616E675C44656275675C7838365C6F626A322E63707000245430202E7261536561726368203D202465697020245430205E203D2024657370202454302034202B203D2000245430202E7261536561726368203D202465697020245430205E203D2024657370202454302034202B203D2024656270202454302034202D205E203D200024543020246562702034202B203D202465697020245430205E203D2024657370202454302034202B203D2024656270202454302034202D205E203D200000
+ Subsections:
+ - !Symbols
+ Records:
+ - Kind: S_COMPILE3
+ Compile3Sym:
+ Flags: [ ]
+ Machine: Pentium3
+ FrontendMajor: 6
+ FrontendMinor: 0
+ FrontendBuild: 0
+ FrontendQFE: 0
+ BackendMajor: 6000
+ BackendMinor: 0
+ BackendBuild: 0
+ BackendQFE: 0
+ Version: 'clang version 6.0.0 '
+ - !FrameData
+ Frames:
+ - CodeSize: 25
+ FrameFunc: '$T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = '
+ LocalSize: 0
+ MaxStackSize: 0
+ ParamsSize: 4
+ PrologSize: 4
+ RvaStart: 0
+ SavedRegsSize: 0
+ - CodeSize: 24
+ FrameFunc: '$T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = '
+ LocalSize: 0
+ MaxStackSize: 0
+ ParamsSize: 4
+ PrologSize: 3
+ RvaStart: 1
+ SavedRegsSize: 4
+ - CodeSize: 22
+ FrameFunc: '$T0 $ebp 4 + = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = '
+ LocalSize: 0
+ MaxStackSize: 0
+ ParamsSize: 4
+ PrologSize: 1
+ RvaStart: 3
+ SavedRegsSize: 4
+ - !Symbols
+ Records:
+ - Kind: S_GPROC32_ID
+ ProcSym:
+ CodeSize: 25
+ DbgStart: 0
+ DbgEnd: 0
+ FunctionType: 4109
+ Flags: [ ]
+ DisplayName: 'NS::func'
+ - Kind: S_LOCAL
+ LocalSym:
+ Type: 4099
+ Flags: [ IsParameter ]
+ VarName: f
+ - Kind: S_DEFRANGE_REGISTER_REL
+ DefRangeRegisterRelSym:
+ - Kind: S_PROC_ID_END
+ ScopeEndSym:
+ - !Lines
+ CodeSize: 25
+ Flags: [ ]
+ RelocOffset: 0
+ RelocSegment: 0
+ Blocks:
+ - FileName: 'D:\src\llvmbuild\clang\Debug\x86\obj2.cpp'
+ Lines:
+ - Offset: 0
+ LineStart: 3
+ IsStatement: false
+ EndDelta: 0
+ - Offset: 7
+ LineStart: 4
+ IsStatement: false
+ EndDelta: 0
+ Columns:
+ - !Symbols
+ Records:
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4106
+ UDTName: 'NS::Foo'
+ - !FileChecksums
+ Checksums:
+ - FileName: 'D:\src\llvmbuild\clang\Debug\x86\obj2.cpp'
+ Kind: MD5
+ Checksum: 59DFAC75D18675AED1AD169FE316317E
+ - !StringTable
+ Strings:
+ - 'D:\src\llvmbuild\clang\Debug\x86\obj2.cpp'
+ - '$T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = '
+ - '$T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = '
+ - '$T0 $ebp 4 + = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = '
+ - ''
+ Relocations:
+ - VirtualAddress: 68
+ SymbolName: '?func@NS@@YAHABUFoo@1@@Z'
+ Type: IMAGE_REL_I386_DIR32NB
+ - VirtualAddress: 208
+ SymbolName: '?func@NS@@YAHABUFoo@1@@Z'
+ Type: IMAGE_REL_I386_SECREL
+ - VirtualAddress: 212
+ SymbolName: '?func@NS@@YAHABUFoo@1@@Z'
+ Type: IMAGE_REL_I386_SECTION
+ - VirtualAddress: 248
+ SymbolName: .text
+ Type: IMAGE_REL_I386_SECREL
+ - VirtualAddress: 252
+ SymbolName: .text
+ Type: IMAGE_REL_I386_SECTION
+ - VirtualAddress: 268
+ SymbolName: '?func@NS@@YAHABUFoo@1@@Z'
+ Type: IMAGE_REL_I386_SECREL
+ - VirtualAddress: 272
+ SymbolName: '?func@NS@@YAHABUFoo@1@@Z'
+ Type: IMAGE_REL_I386_SECTION
+ - Name: '.debug$T'
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
+ Alignment: 4
+ SectionData: 040000000A000516000000004E5300F12A0005150000800200000000000000000000000000004E533A3A466F6F002E3F4155466F6F404E53404000F10A000110011000000100F2F10A000210021000002A8000000A00011201000000031000000E0008107400000000000100041000000A000210011000000A8000000A00011201000000740000001A0009100300000001100000061000000B00010007100000000000001A0003120D15030074000000000058001115030008100000466F6F002A0005150200000209100000000000000000000004004E533A3A466F6F002E3F4155466F6F404E53404000F12E00051600000000443A5C7372635C6C6C766D6275696C645C636C616E675C44656275675C7838365C6F626A2E6800F10E0006160A1000000B1000000200000012000116001000000510000066756E6300F3F2F1
+ Types:
+ - Kind: LF_STRING_ID
+ StringId:
+ Id: 0
+ String: NS
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 0
+ Options: [ None, ForwardReference, HasUniqueName ]
+ FieldList: 0
+ Name: 'NS::Foo'
+ UniqueName: '.?AUFoo@NS@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 0
+ - Kind: LF_MODIFIER
+ Modifier:
+ ModifiedType: 4097
+ Modifiers: [ None, Const ]
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4098
+ Attrs: 32810
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ 4099 ]
+ - Kind: LF_PROCEDURE
+ Procedure:
+ ReturnType: 116
+ CallConv: NearC
+ Options: [ None ]
+ ParameterCount: 1
+ ArgumentList: 4100
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4097
+ Attrs: 32778
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ 116 ]
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4097
+ ThisType: 4102
+ CallConv: ThisCall
+ Options: [ None ]
+ ParameterCount: 1
+ ArgumentList: 4103
+ ThisPointerAdjustment: 0
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 116
+ FieldOffset: 0
+ Name: X
+ - Kind: LF_ONEMETHOD
+ OneMethod:
+ Type: 4104
+ Attrs: 3
+ VFTableOffset: -1
+ Name: Foo
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 2
+ Options: [ None, HasUniqueName ]
+ FieldList: 4105
+ Name: 'NS::Foo'
+ UniqueName: '.?AUFoo@NS@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 4
+ - Kind: LF_STRING_ID
+ StringId:
+ Id: 0
+ String: 'D:\src\llvmbuild\clang\Debug\x86\obj.h'
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4106
+ SourceFile: 4107
+ LineNumber: 2
+ - Kind: LF_FUNC_ID
+ FuncId:
+ ParentScope: 4096
+ FunctionType: 4101
+ Name: func
+symbols:
+ - Name: .text
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 25
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 1820185021
+ Number: 1
+ - Name: .data
+ Value: 0
+ SectionNumber: 2
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 0
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 2
+ - Name: .bss
+ Value: 0
+ SectionNumber: 3
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 0
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 3
+ - Name: .drectve
+ Value: 0
+ SectionNumber: 4
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 48
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 149686238
+ Number: 4
+ - Name: '.debug$S'
+ Value: 0
+ SectionNumber: 5
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 584
+ NumberOfRelocations: 7
+ NumberOfLinenumbers: 0
+ CheckSum: 2847177244
+ Number: 5
+ - Name: '.debug$T'
+ Value: 0
+ SectionNumber: 6
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 320
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 2684556216
+ Number: 6
+ - Name: '@feat.00'
+ Value: 1
+ SectionNumber: -1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ - Name: '?func@NS@@YAHABUFoo@1@@Z'
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+...
diff --git a/test/COFF/Inputs/pdb-hashes-2.yaml b/test/COFF/Inputs/pdb-hashes-2.yaml
new file mode 100644
index 000000000000..63e9fc02ad5a
--- /dev/null
+++ b/test/COFF/Inputs/pdb-hashes-2.yaml
@@ -0,0 +1,355 @@
+--- !COFF
+header:
+ Machine: IMAGE_FILE_MACHINE_I386
+ Characteristics: [ ]
+sections:
+ - Name: .text
+ Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+ Alignment: 16
+ SectionData: 5589E5508B45088B4D088B09C1E1018945FC89C883C4045DC3
+ - Name: .data
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
+ Alignment: 4
+ SectionData: ''
+ - Name: .bss
+ Characteristics: [ IMAGE_SCN_CNT_UNINITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
+ Alignment: 4
+ SectionData: ''
+ - Name: .drectve
+ Characteristics: [ IMAGE_SCN_LNK_INFO, IMAGE_SCN_LNK_REMOVE ]
+ Alignment: 1
+ SectionData: 202F44454641554C544C49423A6C6962636D742E6C6962202F44454641554C544C49423A6F6C646E616D65732E6C6962
+ - Name: '.debug$S'
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
+ Alignment: 4
+ SectionData: 04000000F10000002F0000002D003C1101000000070006000000000000007017000000000000636C616E672076657273696F6E20362E302E30200000F5000000640000000000000000000000190000000000000004000000000000002B000000040000000400000001000000180000000000000004000000000000005800000003000400000000000300000016000000000000000400000000000000960000000100040000000000F1000000540000002E0047110000000000000000000000001900000000000000000000000D100000000000000000004E533A3A66756E63000A003E110310000001006600120045111600000008000000070000000000120002004F11F20000002800000000000000000000001900000000000000020000001C00000000000000030000000700000004000000F1000000100000000E0008110A1000004E533A3A466F6F00F40000001800000001000000100159DFAC75D18675AED1AD169FE316317E0000F3000000D400000000443A5C7372635C6C6C766D6275696C645C636C616E675C44656275675C7838365C6F626A322E63707000245430202E7261536561726368203D202465697020245430205E203D2024657370202454302034202B203D2000245430202E7261536561726368203D202465697020245430205E203D2024657370202454302034202B203D2024656270202454302034202D205E203D200024543020246562702034202B203D202465697020245430205E203D2024657370202454302034202B203D2024656270202454302034202D205E203D200000
+ Subsections:
+ - !Symbols
+ Records:
+ - Kind: S_COMPILE3
+ Compile3Sym:
+ Flags: [ ]
+ Machine: Pentium3
+ FrontendMajor: 6
+ FrontendMinor: 0
+ FrontendBuild: 0
+ FrontendQFE: 0
+ BackendMajor: 6000
+ BackendMinor: 0
+ BackendBuild: 0
+ BackendQFE: 0
+ Version: 'clang version 6.0.0 '
+ - !FrameData
+ Frames:
+ - CodeSize: 25
+ FrameFunc: '$T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = '
+ LocalSize: 0
+ MaxStackSize: 0
+ ParamsSize: 4
+ PrologSize: 4
+ RvaStart: 0
+ SavedRegsSize: 0
+ - CodeSize: 24
+ FrameFunc: '$T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = '
+ LocalSize: 0
+ MaxStackSize: 0
+ ParamsSize: 4
+ PrologSize: 3
+ RvaStart: 1
+ SavedRegsSize: 4
+ - CodeSize: 22
+ FrameFunc: '$T0 $ebp 4 + = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = '
+ LocalSize: 0
+ MaxStackSize: 0
+ ParamsSize: 4
+ PrologSize: 1
+ RvaStart: 3
+ SavedRegsSize: 4
+ - !Symbols
+ Records:
+ - Kind: S_GPROC32_ID
+ ProcSym:
+ CodeSize: 25
+ DbgStart: 0
+ DbgEnd: 0
+ FunctionType: 4109
+ Flags: [ ]
+ DisplayName: 'NS::func'
+ - Kind: S_LOCAL
+ LocalSym:
+ Type: 4099
+ Flags: [ IsParameter ]
+ VarName: f
+ - Kind: S_DEFRANGE_REGISTER_REL
+ DefRangeRegisterRelSym:
+ - Kind: S_PROC_ID_END
+ ScopeEndSym:
+ - !Lines
+ CodeSize: 25
+ Flags: [ ]
+ RelocOffset: 0
+ RelocSegment: 0
+ Blocks:
+ - FileName: 'D:\src\llvmbuild\clang\Debug\x86\obj2.cpp'
+ Lines:
+ - Offset: 0
+ LineStart: 3
+ IsStatement: false
+ EndDelta: 0
+ - Offset: 7
+ LineStart: 4
+ IsStatement: false
+ EndDelta: 0
+ Columns:
+ - !Symbols
+ Records:
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4106
+ UDTName: 'NS::Foo'
+ - !FileChecksums
+ Checksums:
+ - FileName: 'D:\src\llvmbuild\clang\Debug\x86\obj2.cpp'
+ Kind: MD5
+ Checksum: 59DFAC75D18675AED1AD169FE316317E
+ - !StringTable
+ Strings:
+ - 'D:\src\llvmbuild\clang\Debug\x86\obj2.cpp'
+ - '$T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = '
+ - '$T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = '
+ - '$T0 $ebp 4 + = $eip $T0 ^ = $esp $T0 4 + = $ebp $T0 4 - ^ = '
+ - ''
+ Relocations:
+ - VirtualAddress: 68
+ SymbolName: '?func@NS@@YAHABUFoo@1@@Z'
+ Type: IMAGE_REL_I386_DIR32NB
+ - VirtualAddress: 208
+ SymbolName: '?func@NS@@YAHABUFoo@1@@Z'
+ Type: IMAGE_REL_I386_SECREL
+ - VirtualAddress: 212
+ SymbolName: '?func@NS@@YAHABUFoo@1@@Z'
+ Type: IMAGE_REL_I386_SECTION
+ - VirtualAddress: 248
+ SymbolName: .text
+ Type: IMAGE_REL_I386_SECREL
+ - VirtualAddress: 252
+ SymbolName: .text
+ Type: IMAGE_REL_I386_SECTION
+ - VirtualAddress: 268
+ SymbolName: '?func@NS@@YAHABUFoo@1@@Z'
+ Type: IMAGE_REL_I386_SECREL
+ - VirtualAddress: 272
+ SymbolName: '?func@NS@@YAHABUFoo@1@@Z'
+ Type: IMAGE_REL_I386_SECTION
+ - Name: '.debug$T'
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
+ Alignment: 4
+ SectionData: 040000000A000516000000004E5300F12A0005150000800200000000000000000000000000004E533A3A466F6F002E3F4155466F6F404E53404000F10A000110011000000100F2F10A000210021000002A8000000A00011201000000031000000E0008107400000000000100041000000A000210011000000A8000000A00011201000000740000001A0009100300000001100000061000000B00010007100000000000001A0003120D15030074000000000058001115030008100000466F6F002A0005150200000209100000000000000000000004004E533A3A466F6F002E3F4155466F6F404E53404000F12E00051600000000443A5C7372635C6C6C766D6275696C645C636C616E675C44656275675C7838365C6F626A2E6800F10E0006160A1000000B1000000200000012000116001000000510000066756E6300F3F2F1
+ Types:
+ - Kind: LF_STRING_ID
+ StringId:
+ Id: 0
+ String: NS
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 0
+ Options: [ None, ForwardReference, HasUniqueName ]
+ FieldList: 0
+ Name: 'NS::Foo'
+ UniqueName: '.?AUFoo@NS@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 0
+ - Kind: LF_MODIFIER
+ Modifier:
+ ModifiedType: 4097
+ Modifiers: [ None, Const ]
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4098
+ Attrs: 32810
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ 4099 ]
+ - Kind: LF_PROCEDURE
+ Procedure:
+ ReturnType: 116
+ CallConv: NearC
+ Options: [ None ]
+ ParameterCount: 1
+ ArgumentList: 4100
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4097
+ Attrs: 32778
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ 116 ]
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4097
+ ThisType: 4102
+ CallConv: ThisCall
+ Options: [ None ]
+ ParameterCount: 1
+ ArgumentList: 4103
+ ThisPointerAdjustment: 0
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 116
+ FieldOffset: 0
+ Name: X
+ - Kind: LF_ONEMETHOD
+ OneMethod:
+ Type: 4104
+ Attrs: 3
+ VFTableOffset: -1
+ Name: Foo
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 2
+ Options: [ None, HasUniqueName ]
+ FieldList: 4105
+ Name: 'NS::Foo'
+ UniqueName: '.?AUFoo@NS@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 4
+ - Kind: LF_STRING_ID
+ StringId:
+ Id: 0
+ String: 'D:\src\llvmbuild\clang\Debug\x86\obj.h'
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4106
+ SourceFile: 4107
+ LineNumber: 2
+ - Kind: LF_FUNC_ID
+ FuncId:
+ ParentScope: 4096
+ FunctionType: 4101
+ Name: func
+ - Name: '.debug$H'
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
+ Alignment: 4
+ SectionData: C5C9330100000000EC145CD76AEFE74E78880D531132B3BB8FFACEF79E616EF06A14EA74A2420F9062A1FB04917E59759949E334BA18509ED692F3C65CE242D8450EBC78B81B63AF8316DC324562EB9F0D4A0D708E8A25C263DB05943C19B84A36719E1E414DDA3EDBDF005322238D70F9058EEDC5C50EF11BC849618B51FD89E3A50EABE5E8FE3945468547C19DC681D0BFB3B797DD91CA4D7F1953C314442D5549419E78044E38A0BF16BFFAA5EE9C0103E7DBFE9941E63379C0B0C0A9021B711ACC4F67008974EBF441031BDD653F6935DFF3112C6A5346EF2AC94B9B7EB56EF55CFA0AF6C1846743F43D846BB19517E12E8873BBA90CC41DD1BEAC89CBA8897AC1BA46762E2557A82D89DCBC783AF285D9DBB672F67A81E36906B2038B57
+ GlobalHashes:
+ Version: 0
+ HashAlgorithm: 0
+ HashValues:
+ - EC145CD76AEFE74E78880D531132B3BB8FFACEF7
+ - 9E616EF06A14EA74A2420F9062A1FB04917E5975
+ - 9949E334BA18509ED692F3C65CE242D8450EBC78
+ - B81B63AF8316DC324562EB9F0D4A0D708E8A25C2
+ - 63DB05943C19B84A36719E1E414DDA3EDBDF0053
+ - 22238D70F9058EEDC5C50EF11BC849618B51FD89
+ - E3A50EABE5E8FE3945468547C19DC681D0BFB3B7
+ - 97DD91CA4D7F1953C314442D5549419E78044E38
+ - A0BF16BFFAA5EE9C0103E7DBFE9941E63379C0B0
+ - C0A9021B711ACC4F67008974EBF441031BDD653F
+ - 6935DFF3112C6A5346EF2AC94B9B7EB56EF55CFA
+ - 0AF6C1846743F43D846BB19517E12E8873BBA90C
+ - C41DD1BEAC89CBA8897AC1BA46762E2557A82D89
+ - DCBC783AF285D9DBB672F67A81E36906B2038B57
+symbols:
+ - Name: .text
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 25
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 1820185021
+ Number: 1
+ - Name: .data
+ Value: 0
+ SectionNumber: 2
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 0
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 2
+ - Name: .bss
+ Value: 0
+ SectionNumber: 3
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 0
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 3
+ - Name: .drectve
+ Value: 0
+ SectionNumber: 4
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 48
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 149686238
+ Number: 4
+ - Name: '.debug$S'
+ Value: 0
+ SectionNumber: 5
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 584
+ NumberOfRelocations: 7
+ NumberOfLinenumbers: 0
+ CheckSum: 2847177244
+ Number: 5
+ - Name: '.debug$T'
+ Value: 0
+ SectionNumber: 6
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 320
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 2684556216
+ Number: 6
+ - Name: '.debug$H'
+ Value: 0
+ SectionNumber: 7
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 288
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 2348181452
+ Number: 7
+ - Name: '@feat.00'
+ Value: 1
+ SectionNumber: -1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ - Name: '?func@NS@@YAHABUFoo@1@@Z'
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+...
diff --git a/test/COFF/Inputs/pdb-scopes-a.yaml b/test/COFF/Inputs/pdb-scopes-a.yaml
index e9f4484c7060..e422a6241f27 100644
--- a/test/COFF/Inputs/pdb-scopes-a.yaml
+++ b/test/COFF/Inputs/pdb-scopes-a.yaml
@@ -1,8 +1,8 @@
--- !COFF
-header:
+header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: [ ]
-sections:
+sections:
- Name: .drectve
Characteristics: [ IMAGE_SCN_LNK_INFO, IMAGE_SCN_LNK_REMOVE ]
Alignment: 1
@@ -10,15 +10,15 @@ sections:
- Name: '.debug$S'
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
Alignment: 1
- Subsections:
+ Subsections:
- !Symbols
- Records:
+ Records:
- Kind: S_OBJNAME
- ObjNameSym:
+ ObjNameSym:
Signature: 0
ObjectName: 'C:\src\llvm-project\build\a.obj'
- Kind: S_COMPILE3
- Compile3Sym:
+ Compile3Sym:
Flags: [ SecurityChecks, HotPatch ]
Machine: X64
FrontendMajor: 19
@@ -31,9 +31,9 @@ sections:
BackendQFE: 1
Version: 'Microsoft (R) Optimizing Compiler'
- !Symbols
- Records:
+ Records:
- Kind: S_GPROC32_ID
- ProcSym:
+ ProcSym:
CodeSize: 5
DbgStart: 4
DbgEnd: 4
@@ -41,7 +41,7 @@ sections:
Flags: [ ]
DisplayName: g
- Kind: S_FRAMEPROC
- FrameProcSym:
+ FrameProcSym:
TotalFrameBytes: 0
PaddingFrameBytes: 0
OffsetToPadding: 0
@@ -50,30 +50,30 @@ sections:
SectionIdOfExceptionHandler: 0
Flags: [ AsynchronousExceptionHandling, OptimizedForSpeed ]
- Kind: S_REGREL32
- RegRelativeSym:
+ RegRelativeSym:
Offset: 8
Type: 116
Register: RSP
VarName: x
- Kind: S_PROC_ID_END
- ScopeEndSym:
+ ScopeEndSym:
- !Lines
CodeSize: 5
Flags: [ ]
RelocOffset: 0
RelocSegment: 0
- Blocks:
+ Blocks:
- FileName: 'c:\src\llvm-project\build\a.c'
- Lines:
+ Lines:
- Offset: 0
LineStart: 1
IsStatement: true
EndDelta: 0
- Columns:
+ Columns:
- !Symbols
- Records:
+ Records:
- Kind: S_GPROC32_ID
- ProcSym:
+ ProcSym:
CodeSize: 58
DbgStart: 8
DbgEnd: 53
@@ -81,7 +81,7 @@ sections:
Flags: [ ]
DisplayName: main
- Kind: S_FRAMEPROC
- FrameProcSym:
+ FrameProcSym:
TotalFrameBytes: 56
PaddingFrameBytes: 0
OffsetToPadding: 0
@@ -90,47 +90,47 @@ sections:
SectionIdOfExceptionHandler: 0
Flags: [ AsynchronousExceptionHandling, OptimizedForSpeed ]
- Kind: S_REGREL32
- RegRelativeSym:
+ RegRelativeSym:
Offset: 64
Type: 116
Register: RSP
VarName: argc
- Kind: S_BLOCK32
- BlockSym:
+ BlockSym:
CodeSize: 17
Offset: 15
BlockName: ''
- Kind: S_REGREL32
- RegRelativeSym:
+ RegRelativeSym:
Offset: 32
Type: 116
Register: RSP
VarName: x
- Kind: S_END
- ScopeEndSym:
+ ScopeEndSym:
- Kind: S_BLOCK32
- BlockSym:
+ BlockSym:
CodeSize: 17
Offset: 34
BlockName: ''
- Kind: S_REGREL32
- RegRelativeSym:
+ RegRelativeSym:
Offset: 36
Type: 116
Register: RSP
VarName: y
- Kind: S_END
- ScopeEndSym:
+ ScopeEndSym:
- Kind: S_PROC_ID_END
- ScopeEndSym:
+ ScopeEndSym:
- !Lines
CodeSize: 58
Flags: [ ]
RelocOffset: 0
RelocSegment: 0
- Blocks:
+ Blocks:
- FileName: 'c:\src\llvm-project\build\a.c'
- Lines:
+ Lines:
- Offset: 0
LineStart: 3
IsStatement: true
@@ -163,21 +163,21 @@ sections:
LineStart: 11
IsStatement: true
EndDelta: 0
- Columns:
+ Columns:
- !FileChecksums
- Checksums:
+ Checksums:
- FileName: 'c:\src\llvm-project\build\a.c'
Kind: MD5
Checksum: 7FA72225C3F5630316383BD8BCC3EF72
- !StringTable
- Strings:
+ Strings:
- 'c:\src\llvm-project\build\a.c'
- !Symbols
- Records:
+ Records:
- Kind: S_BUILDINFO
- BuildInfoSym:
+ BuildInfoSym:
BuildId: 4110
- Relocations:
+ Relocations:
- VirtualAddress: 152
SymbolName: g
Type: IMAGE_REL_AMD64_SECREL
@@ -217,78 +217,78 @@ sections:
- Name: '.debug$T'
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
Alignment: 1
- Types:
+ Types:
- Kind: LF_ARGLIST
- ArgList:
+ ArgList:
ArgIndices: [ 116 ]
- Kind: LF_PROCEDURE
- Procedure:
+ Procedure:
ReturnType: 3
CallConv: NearC
Options: [ None ]
ParameterCount: 1
ArgumentList: 4096
- Kind: LF_POINTER
- Pointer:
+ Pointer:
ReferentType: 4097
Attrs: 65548
- Kind: LF_FUNC_ID
- FuncId:
+ FuncId:
ParentScope: 0
FunctionType: 4097
Name: g
- Kind: LF_PROCEDURE
- Procedure:
+ Procedure:
ReturnType: 116
CallConv: NearC
Options: [ None ]
ParameterCount: 1
ArgumentList: 4096
- Kind: LF_FUNC_ID
- FuncId:
+ FuncId:
ParentScope: 0
FunctionType: 4100
Name: main
- Kind: LF_FUNC_ID
- FuncId:
+ FuncId:
ParentScope: 0
FunctionType: 4097
Name: f
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 0
String: 'C:\src\llvm-project\build'
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 0
String: 'C:\PROGRA~2\MICROS~1.0\VC\Bin\amd64\cl.exe'
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 0
String: '-c -Z7 -MT -IC:\PROGRA~2\MICROS~1.0\VC\include -IC:\PROGRA~2\MICROS~1.0\VC\atlmfc\include -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.14393.0\ucrt -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.14393.0\shared -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.14393.0\um'
- Kind: LF_SUBSTR_LIST
- StringList:
+ StringList:
StringIndices: [ 4105 ]
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 4106
String: ' -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.14393.0\winrt -TC -X'
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 0
String: a.c
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 0
String: 'C:\src\llvm-project\build\vc140.pdb'
- Kind: LF_BUILDINFO
- BuildInfo:
+ BuildInfo:
ArgIndices: [ 4103, 4104, 4108, 4109, 4107 ]
- Name: '.text$mn'
Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
Alignment: 16
SectionData: 894C2408C3CCCCCCCCCCCCCCCCCCCCCC894C24084883EC38837C2440007413C74424202A0000008B4C2420E800000000EB11C74424240D0000008B4C2424E80000000033C04883C438C3
- Relocations:
+ Relocations:
- VirtualAddress: 44
SymbolName: f
Type: IMAGE_REL_AMD64_REL32
@@ -303,7 +303,7 @@ sections:
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
Alignment: 4
SectionData: 000000003A00000000000000
- Relocations:
+ Relocations:
- VirtualAddress: 0
SymbolName: '$LN5'
Type: IMAGE_REL_AMD64_ADDR32NB
@@ -313,14 +313,14 @@ sections:
- VirtualAddress: 8
SymbolName: '$unwind$main'
Type: IMAGE_REL_AMD64_ADDR32NB
-symbols:
+symbols:
- Name: .drectve
Value: 0
SectionNumber: 1
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 47
NumberOfRelocations: 0
NumberOfLinenumbers: 0
@@ -332,7 +332,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 628
NumberOfRelocations: 12
NumberOfLinenumbers: 0
@@ -344,7 +344,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 624
NumberOfRelocations: 0
NumberOfLinenumbers: 0
@@ -356,7 +356,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 74
NumberOfRelocations: 2
NumberOfLinenumbers: 0
@@ -392,7 +392,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 8
NumberOfRelocations: 0
NumberOfLinenumbers: 0
@@ -410,7 +410,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 12
NumberOfRelocations: 3
NumberOfLinenumbers: 0
diff --git a/test/COFF/Inputs/pdb-scopes-b.yaml b/test/COFF/Inputs/pdb-scopes-b.yaml
index 2839bf7e3538..b1c602143c3f 100644
--- a/test/COFF/Inputs/pdb-scopes-b.yaml
+++ b/test/COFF/Inputs/pdb-scopes-b.yaml
@@ -1,8 +1,8 @@
--- !COFF
-header:
+header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: [ ]
-sections:
+sections:
- Name: .drectve
Characteristics: [ IMAGE_SCN_LNK_INFO, IMAGE_SCN_LNK_REMOVE ]
Alignment: 1
@@ -10,15 +10,15 @@ sections:
- Name: '.debug$S'
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
Alignment: 1
- Subsections:
+ Subsections:
- !Symbols
- Records:
+ Records:
- Kind: S_OBJNAME
- ObjNameSym:
+ ObjNameSym:
Signature: 0
ObjectName: 'C:\src\llvm-project\build\b.obj'
- Kind: S_COMPILE3
- Compile3Sym:
+ Compile3Sym:
Flags: [ SecurityChecks, HotPatch ]
Machine: X64
FrontendMajor: 19
@@ -31,9 +31,9 @@ sections:
BackendQFE: 1
Version: 'Microsoft (R) Optimizing Compiler'
- !Symbols
- Records:
+ Records:
- Kind: S_GPROC32_ID
- ProcSym:
+ ProcSym:
CodeSize: 62
DbgStart: 8
DbgEnd: 57
@@ -41,7 +41,7 @@ sections:
Flags: [ ]
DisplayName: f
- Kind: S_FRAMEPROC
- FrameProcSym:
+ FrameProcSym:
TotalFrameBytes: 56
PaddingFrameBytes: 0
OffsetToPadding: 0
@@ -50,47 +50,47 @@ sections:
SectionIdOfExceptionHandler: 0
Flags: [ AsynchronousExceptionHandling, OptimizedForSpeed ]
- Kind: S_REGREL32
- RegRelativeSym:
+ RegRelativeSym:
Offset: 64
Type: 116
Register: RSP
VarName: x
- Kind: S_BLOCK32
- BlockSym:
+ BlockSym:
CodeSize: 20
Offset: 15
BlockName: ''
- Kind: S_REGREL32
- RegRelativeSym:
+ RegRelativeSym:
Offset: 32
Type: 116
Register: RSP
VarName: y
- Kind: S_END
- ScopeEndSym:
+ ScopeEndSym:
- Kind: S_BLOCK32
- BlockSym:
+ BlockSym:
CodeSize: 20
Offset: 37
BlockName: ''
- Kind: S_REGREL32
- RegRelativeSym:
+ RegRelativeSym:
Offset: 36
Type: 116
Register: RSP
VarName: w
- Kind: S_END
- ScopeEndSym:
+ ScopeEndSym:
- Kind: S_PROC_ID_END
- ScopeEndSym:
+ ScopeEndSym:
- !Lines
CodeSize: 62
Flags: [ ]
RelocOffset: 0
RelocSegment: 0
- Blocks:
+ Blocks:
- FileName: 'c:\src\llvm-project\build\b.c'
- Lines:
+ Lines:
- Offset: 0
LineStart: 2
IsStatement: true
@@ -123,21 +123,21 @@ sections:
LineStart: 10
IsStatement: true
EndDelta: 0
- Columns:
+ Columns:
- !FileChecksums
- Checksums:
+ Checksums:
- FileName: 'c:\src\llvm-project\build\b.c'
Kind: MD5
Checksum: 8E8C92DB46478902EBEAEBFCFF15A6E0
- !StringTable
- Strings:
+ Strings:
- 'c:\src\llvm-project\build\b.c'
- !Symbols
- Records:
+ Records:
- Kind: S_BUILDINFO
- BuildInfoSym:
+ BuildInfoSym:
BuildId: 4110
- Relocations:
+ Relocations:
- VirtualAddress: 152
SymbolName: f
Type: IMAGE_REL_AMD64_SECREL
@@ -165,76 +165,76 @@ sections:
- Name: '.debug$T'
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
Alignment: 1
- Types:
+ Types:
- Kind: LF_ARGLIST
- ArgList:
+ ArgList:
ArgIndices: [ 0 ]
- Kind: LF_PROCEDURE
- Procedure:
+ Procedure:
ReturnType: 3
CallConv: NearC
Options: [ None ]
ParameterCount: 0
ArgumentList: 4096
- Kind: LF_POINTER
- Pointer:
+ Pointer:
ReferentType: 4097
Attrs: 65548
- Kind: LF_ARGLIST
- ArgList:
+ ArgList:
ArgIndices: [ 116 ]
- Kind: LF_PROCEDURE
- Procedure:
+ Procedure:
ReturnType: 3
CallConv: NearC
Options: [ None ]
ParameterCount: 1
ArgumentList: 4099
- Kind: LF_FUNC_ID
- FuncId:
+ FuncId:
ParentScope: 0
FunctionType: 4100
Name: f
- Kind: LF_FUNC_ID
- FuncId:
+ FuncId:
ParentScope: 0
FunctionType: 4097
Name: g
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 0
String: 'C:\src\llvm-project\build'
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 0
String: 'C:\PROGRA~2\MICROS~1.0\VC\Bin\amd64\cl.exe'
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 0
String: '-c -Z7 -MT -IC:\PROGRA~2\MICROS~1.0\VC\include -IC:\PROGRA~2\MICROS~1.0\VC\atlmfc\include -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.14393.0\ucrt -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.14393.0\shared -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.14393.0\um'
- Kind: LF_SUBSTR_LIST
- StringList:
+ StringList:
StringIndices: [ 4105 ]
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 4106
String: ' -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.14393.0\winrt -TC -X'
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 0
String: b.c
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 0
String: 'C:\src\llvm-project\build\vc140.pdb'
- Kind: LF_BUILDINFO
- BuildInfo:
+ BuildInfo:
ArgIndices: [ 4103, 4104, 4108, 4109, 4107 ]
- Name: '.text$mn'
Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
Alignment: 16
SectionData: 894C24084883EC38837C24400074168B44244083C003894424208B4C2420E800000000EB148B44244083C004894424248B4C2424E8000000004883C438C3
- Relocations:
+ Relocations:
- VirtualAddress: 31
SymbolName: g
Type: IMAGE_REL_AMD64_REL32
@@ -249,7 +249,7 @@ sections:
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
Alignment: 4
SectionData: '000000003E00000000000000'
- Relocations:
+ Relocations:
- VirtualAddress: 0
SymbolName: '$LN5'
Type: IMAGE_REL_AMD64_ADDR32NB
@@ -259,14 +259,14 @@ sections:
- VirtualAddress: 8
SymbolName: '$unwind$f'
Type: IMAGE_REL_AMD64_ADDR32NB
-symbols:
+symbols:
- Name: .drectve
Value: 0
SectionNumber: 1
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 47
NumberOfRelocations: 0
NumberOfLinenumbers: 0
@@ -278,7 +278,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 484
NumberOfRelocations: 8
NumberOfLinenumbers: 0
@@ -290,7 +290,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 616
NumberOfRelocations: 0
NumberOfLinenumbers: 0
@@ -302,7 +302,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 62
NumberOfRelocations: 2
NumberOfLinenumbers: 0
@@ -332,7 +332,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 8
NumberOfRelocations: 0
NumberOfLinenumbers: 0
@@ -350,7 +350,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 12
NumberOfRelocations: 3
NumberOfLinenumbers: 0
diff --git a/test/COFF/Inputs/pdb_comdat_bar.yaml b/test/COFF/Inputs/pdb_comdat_bar.yaml
index 71a9535c50b7..796e71379c47 100644
--- a/test/COFF/Inputs/pdb_comdat_bar.yaml
+++ b/test/COFF/Inputs/pdb_comdat_bar.yaml
@@ -1,8 +1,8 @@
--- !COFF
-header:
+header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: [ ]
-sections:
+sections:
- Name: .drectve
Characteristics: [ IMAGE_SCN_LNK_INFO, IMAGE_SCN_LNK_REMOVE ]
Alignment: 1
@@ -10,15 +10,15 @@ sections:
- Name: '.debug$S'
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
Alignment: 1
- Subsections:
+ Subsections:
- !Symbols
- Records:
+ Records:
- Kind: S_OBJNAME
- ObjNameSym:
+ ObjNameSym:
Signature: 0
ObjectName: 'C:\src\llvm-project\build\pdb_comdat_bar.obj'
- Kind: S_COMPILE3
- Compile3Sym:
+ Compile3Sym:
Flags: [ SecurityChecks, HotPatch ]
Machine: X64
FrontendMajor: 19
@@ -31,9 +31,9 @@ sections:
BackendQFE: 1
Version: 'Microsoft (R) Optimizing Compiler'
- !Symbols
- Records:
+ Records:
- Kind: S_GPROC32_ID
- ProcSym:
+ ProcSym:
PtrParent: 0
PtrEnd: 0
PtrNext: 0
@@ -45,7 +45,7 @@ sections:
Flags: [ ]
DisplayName: bar
- Kind: S_FRAMEPROC
- FrameProcSym:
+ FrameProcSym:
TotalFrameBytes: 40
PaddingFrameBytes: 0
OffsetToPadding: 0
@@ -54,15 +54,15 @@ sections:
SectionIdOfExceptionHandler: 0
Flags: [ AsynchronousExceptionHandling, OptimizedForSpeed ]
- Kind: S_PROC_ID_END
- ScopeEndSym:
+ ScopeEndSym:
- !Lines
CodeSize: 14
Flags: [ ]
RelocOffset: 0
RelocSegment: 0
- Blocks:
+ Blocks:
- FileName: 'c:\src\llvm-project\build\pdb_comdat_bar.c'
- Lines:
+ Lines:
- Offset: 0
LineStart: 3
IsStatement: true
@@ -75,15 +75,15 @@ sections:
LineStart: 5
IsStatement: true
EndDelta: 0
- Columns:
+ Columns:
- !Symbols
- Records:
+ Records:
- Kind: S_GDATA32
- DataSym:
+ DataSym:
Type: 116
DisplayName: global
- !FileChecksums
- Checksums:
+ Checksums:
- FileName: 'c:\src\llvm-project\build\pdb_comdat_bar.c'
Kind: MD5
Checksum: 365279DB4FCBEDD721BBFC3B14A953C2
@@ -91,15 +91,15 @@ sections:
Kind: MD5
Checksum: D74D834EFAC3AE2B45E606A8320B1D5C
- !StringTable
- Strings:
+ Strings:
- 'c:\src\llvm-project\build\pdb_comdat_bar.c'
- 'c:\src\llvm-project\build\foo.h'
- !Symbols
- Records:
+ Records:
- Kind: S_BUILDINFO
- BuildInfoSym:
+ BuildInfoSym:
BuildId: 4110
- Relocations:
+ Relocations:
- VirtualAddress: 168
SymbolName: bar
Type: IMAGE_REL_AMD64_SECREL
@@ -121,70 +121,70 @@ sections:
- Name: '.debug$T'
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
Alignment: 1
- Types:
+ Types:
- Kind: LF_ARGLIST
- ArgList:
+ ArgList:
ArgIndices: [ 0 ]
- Kind: LF_PROCEDURE
- Procedure:
+ Procedure:
ReturnType: 3
CallConv: NearC
Options: [ None ]
ParameterCount: 0
ArgumentList: 4096
- Kind: LF_POINTER
- Pointer:
+ Pointer:
ReferentType: 4097
Attrs: 65548
- Kind: LF_FUNC_ID
- FuncId:
+ FuncId:
ParentScope: 0
FunctionType: 4097
Name: foo
- Kind: LF_ARGLIST
- ArgList:
+ ArgList:
ArgIndices: [ ]
- Kind: LF_PROCEDURE
- Procedure:
+ Procedure:
ReturnType: 3
CallConv: NearC
Options: [ None ]
ParameterCount: 0
ArgumentList: 4100
- Kind: LF_FUNC_ID
- FuncId:
+ FuncId:
ParentScope: 0
FunctionType: 4101
Name: bar
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 0
String: 'C:\src\llvm-project\build'
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 0
String: 'C:\PROGRA~2\MICROS~1.0\VC\Bin\amd64\cl.exe'
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 0
String: '-c -Z7 -MT -IC:\PROGRA~2\MICROS~1.0\VC\include -IC:\PROGRA~2\MICROS~1.0\VC\atlmfc\include -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.14393.0\ucrt -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.14393.0\shared -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.14393.0\um'
- Kind: LF_SUBSTR_LIST
- StringList:
+ StringList:
StringIndices: [ 4105 ]
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 4106
String: ' -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.14393.0\winrt -TC -X'
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 0
String: pdb_comdat_bar.c
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 0
String: 'C:\src\llvm-project\build\vc140.pdb'
- Kind: LF_BUILDINFO
- BuildInfo:
+ BuildInfo:
ArgIndices: [ 4103, 4104, 4108, 4109, 4107 ]
- Name: .bss
Characteristics: [ IMAGE_SCN_CNT_UNINITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
@@ -194,7 +194,7 @@ sections:
Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
Alignment: 16
SectionData: 4883EC28E8000000004883C428C3
- Relocations:
+ Relocations:
- VirtualAddress: 5
SymbolName: foo
Type: IMAGE_REL_AMD64_REL32
@@ -202,7 +202,7 @@ sections:
Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
Alignment: 16
SectionData: 8B0500000000FFC0890500000000C3
- Relocations:
+ Relocations:
- VirtualAddress: 2
SymbolName: global
Type: IMAGE_REL_AMD64_REL32
@@ -212,11 +212,11 @@ sections:
- Name: '.debug$S'
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
Alignment: 1
- Subsections:
+ Subsections:
- !Symbols
- Records:
+ Records:
- Kind: S_GPROC32_ID
- ProcSym:
+ ProcSym:
PtrParent: 0
PtrEnd: 0
PtrNext: 0
@@ -228,7 +228,7 @@ sections:
Flags: [ ]
DisplayName: foo
- Kind: S_FRAMEPROC
- FrameProcSym:
+ FrameProcSym:
TotalFrameBytes: 0
PaddingFrameBytes: 0
OffsetToPadding: 0
@@ -237,15 +237,15 @@ sections:
SectionIdOfExceptionHandler: 0
Flags: [ MarkedInline, AsynchronousExceptionHandling, OptimizedForSpeed ]
- Kind: S_PROC_ID_END
- ScopeEndSym:
+ ScopeEndSym:
- !Lines
CodeSize: 15
Flags: [ ]
RelocOffset: 0
RelocSegment: 0
- Blocks:
+ Blocks:
- FileName: 'c:\src\llvm-project\build\foo.h'
- Lines:
+ Lines:
- Offset: 0
LineStart: 2
IsStatement: true
@@ -258,8 +258,8 @@ sections:
LineStart: 4
IsStatement: true
EndDelta: 0
- Columns:
- Relocations:
+ Columns:
+ Relocations:
- VirtualAddress: 44
SymbolName: foo
Type: IMAGE_REL_AMD64_SECREL
@@ -280,7 +280,7 @@ sections:
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
Alignment: 4
SectionData: '000000000E00000000000000'
- Relocations:
+ Relocations:
- VirtualAddress: 0
SymbolName: '$LN3'
Type: IMAGE_REL_AMD64_ADDR32NB
@@ -290,14 +290,14 @@ sections:
- VirtualAddress: 8
SymbolName: '$unwind$bar'
Type: IMAGE_REL_AMD64_ADDR32NB
-symbols:
+symbols:
- Name: .drectve
Value: 0
SectionNumber: 1
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 47
NumberOfRelocations: 0
NumberOfLinenumbers: 0
@@ -309,7 +309,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 460
NumberOfRelocations: 6
NumberOfLinenumbers: 0
@@ -321,7 +321,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 628
NumberOfRelocations: 0
NumberOfLinenumbers: 0
@@ -333,7 +333,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 4
NumberOfRelocations: 0
NumberOfLinenumbers: 0
@@ -351,7 +351,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 14
NumberOfRelocations: 1
NumberOfLinenumbers: 0
@@ -363,7 +363,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 15
NumberOfRelocations: 2
NumberOfLinenumbers: 0
@@ -376,7 +376,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 148
NumberOfRelocations: 4
NumberOfLinenumbers: 0
@@ -407,7 +407,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 8
NumberOfRelocations: 0
NumberOfLinenumbers: 0
@@ -425,7 +425,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 12
NumberOfRelocations: 3
NumberOfLinenumbers: 0
diff --git a/test/COFF/Inputs/pdb_comdat_main.yaml b/test/COFF/Inputs/pdb_comdat_main.yaml
index d9019d633415..637ac21abc5c 100644
--- a/test/COFF/Inputs/pdb_comdat_main.yaml
+++ b/test/COFF/Inputs/pdb_comdat_main.yaml
@@ -1,8 +1,8 @@
--- !COFF
-header:
+header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: [ ]
-sections:
+sections:
- Name: .drectve
Characteristics: [ IMAGE_SCN_LNK_INFO, IMAGE_SCN_LNK_REMOVE ]
Alignment: 1
@@ -10,15 +10,15 @@ sections:
- Name: '.debug$S'
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
Alignment: 1
- Subsections:
+ Subsections:
- !Symbols
- Records:
+ Records:
- Kind: S_OBJNAME
- ObjNameSym:
+ ObjNameSym:
Signature: 0
ObjectName: 'C:\src\llvm-project\build\pdb_comdat_main.obj'
- Kind: S_COMPILE3
- Compile3Sym:
+ Compile3Sym:
Flags: [ SecurityChecks, HotPatch ]
Machine: X64
FrontendMajor: 19
@@ -31,9 +31,9 @@ sections:
BackendQFE: 1
Version: 'Microsoft (R) Optimizing Compiler'
- !Symbols
- Records:
+ Records:
- Kind: S_GPROC32_ID
- ProcSym:
+ ProcSym:
PtrParent: 0
PtrEnd: 0
PtrNext: 0
@@ -45,7 +45,7 @@ sections:
Flags: [ ]
DisplayName: main
- Kind: S_FRAMEPROC
- FrameProcSym:
+ FrameProcSym:
TotalFrameBytes: 40
PaddingFrameBytes: 0
OffsetToPadding: 0
@@ -54,15 +54,15 @@ sections:
SectionIdOfExceptionHandler: 0
Flags: [ AsynchronousExceptionHandling, OptimizedForSpeed ]
- Kind: S_PROC_ID_END
- ScopeEndSym:
+ ScopeEndSym:
- !Lines
CodeSize: 24
Flags: [ ]
RelocOffset: 0
RelocSegment: 0
- Blocks:
+ Blocks:
- FileName: 'c:\src\llvm-project\build\pdb_comdat_main.c'
- Lines:
+ Lines:
- Offset: 0
LineStart: 2
IsStatement: true
@@ -83,15 +83,15 @@ sections:
LineStart: 6
IsStatement: true
EndDelta: 0
- Columns:
+ Columns:
- !Symbols
- Records:
+ Records:
- Kind: S_GDATA32
- DataSym:
+ DataSym:
Type: 116
DisplayName: global
- !FileChecksums
- Checksums:
+ Checksums:
- FileName: 'c:\src\llvm-project\build\pdb_comdat_main.c'
Kind: MD5
Checksum: F969E51BBE373436D81492EB61387F36
@@ -99,15 +99,15 @@ sections:
Kind: MD5
Checksum: D74D834EFAC3AE2B45E606A8320B1D5C
- !StringTable
- Strings:
+ Strings:
- 'c:\src\llvm-project\build\pdb_comdat_main.c'
- 'c:\src\llvm-project\build\foo.h'
- !Symbols
- Records:
+ Records:
- Kind: S_BUILDINFO
- BuildInfoSym:
+ BuildInfoSym:
BuildId: 4111
- Relocations:
+ Relocations:
- VirtualAddress: 168
SymbolName: main
Type: IMAGE_REL_AMD64_SECREL
@@ -129,81 +129,81 @@ sections:
- Name: '.debug$T'
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
Alignment: 1
- Types:
+ Types:
- Kind: LF_ARGLIST
- ArgList:
+ ArgList:
ArgIndices: [ 0 ]
- Kind: LF_PROCEDURE
- Procedure:
+ Procedure:
ReturnType: 3
CallConv: NearC
Options: [ None ]
ParameterCount: 0
ArgumentList: 4096
- Kind: LF_POINTER
- Pointer:
+ Pointer:
ReferentType: 4097
Attrs: 65548
- Kind: LF_FUNC_ID
- FuncId:
+ FuncId:
ParentScope: 0
FunctionType: 4097
Name: foo
- Kind: LF_ARGLIST
- ArgList:
+ ArgList:
ArgIndices: [ ]
- Kind: LF_PROCEDURE
- Procedure:
+ Procedure:
ReturnType: 116
CallConv: NearC
Options: [ None ]
ParameterCount: 0
ArgumentList: 4100
- Kind: LF_FUNC_ID
- FuncId:
+ FuncId:
ParentScope: 0
FunctionType: 4101
Name: main
- Kind: LF_FUNC_ID
- FuncId:
+ FuncId:
ParentScope: 0
FunctionType: 4097
Name: bar
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 0
String: 'C:\src\llvm-project\build'
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 0
String: 'C:\PROGRA~2\MICROS~1.0\VC\Bin\amd64\cl.exe'
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 0
String: '-c -Z7 -MT -IC:\PROGRA~2\MICROS~1.0\VC\include -IC:\PROGRA~2\MICROS~1.0\VC\atlmfc\include -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.14393.0\ucrt -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.14393.0\shared -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.14393.0\um'
- Kind: LF_SUBSTR_LIST
- StringList:
+ StringList:
StringIndices: [ 4106 ]
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 4107
String: ' -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.14393.0\winrt -TC -X'
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 0
String: pdb_comdat_main.c
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 0
String: 'C:\src\llvm-project\build\vc140.pdb'
- Kind: LF_BUILDINFO
- BuildInfo:
+ BuildInfo:
ArgIndices: [ 4104, 4105, 4109, 4110, 4108 ]
- Name: '.text$mn'
Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
Alignment: 16
SectionData: 4883EC28E800000000E800000000B82A0000004883C428C3
- Relocations:
+ Relocations:
- VirtualAddress: 5
SymbolName: foo
Type: IMAGE_REL_AMD64_REL32
@@ -214,7 +214,7 @@ sections:
Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
Alignment: 16
SectionData: 8B0500000000FFC0890500000000C3
- Relocations:
+ Relocations:
- VirtualAddress: 2
SymbolName: global
Type: IMAGE_REL_AMD64_REL32
@@ -224,11 +224,11 @@ sections:
- Name: '.debug$S'
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
Alignment: 1
- Subsections:
+ Subsections:
- !Symbols
- Records:
+ Records:
- Kind: S_GPROC32_ID
- ProcSym:
+ ProcSym:
PtrParent: 0
PtrEnd: 0
PtrNext: 0
@@ -240,7 +240,7 @@ sections:
Flags: [ ]
DisplayName: foo
- Kind: S_FRAMEPROC
- FrameProcSym:
+ FrameProcSym:
TotalFrameBytes: 0
PaddingFrameBytes: 0
OffsetToPadding: 0
@@ -249,15 +249,15 @@ sections:
SectionIdOfExceptionHandler: 0
Flags: [ MarkedInline, AsynchronousExceptionHandling, OptimizedForSpeed ]
- Kind: S_PROC_ID_END
- ScopeEndSym:
+ ScopeEndSym:
- !Lines
CodeSize: 15
Flags: [ ]
RelocOffset: 0
RelocSegment: 0
- Blocks:
+ Blocks:
- FileName: 'c:\src\llvm-project\build\foo.h'
- Lines:
+ Lines:
- Offset: 0
LineStart: 2
IsStatement: true
@@ -270,8 +270,8 @@ sections:
LineStart: 4
IsStatement: true
EndDelta: 0
- Columns:
- Relocations:
+ Columns:
+ Relocations:
- VirtualAddress: 44
SymbolName: foo
Type: IMAGE_REL_AMD64_SECREL
@@ -292,7 +292,7 @@ sections:
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
Alignment: 4
SectionData: '000000001800000000000000'
- Relocations:
+ Relocations:
- VirtualAddress: 0
SymbolName: '$LN3'
Type: IMAGE_REL_AMD64_ADDR32NB
@@ -302,14 +302,14 @@ sections:
- VirtualAddress: 8
SymbolName: '$unwind$main'
Type: IMAGE_REL_AMD64_ADDR32NB
-symbols:
+symbols:
- Name: .drectve
Value: 0
SectionNumber: 1
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 47
NumberOfRelocations: 0
NumberOfLinenumbers: 0
@@ -321,7 +321,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 480
NumberOfRelocations: 6
NumberOfLinenumbers: 0
@@ -333,7 +333,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 648
NumberOfRelocations: 0
NumberOfLinenumbers: 0
@@ -345,7 +345,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 24
NumberOfRelocations: 2
NumberOfLinenumbers: 0
@@ -357,7 +357,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 15
NumberOfRelocations: 2
NumberOfLinenumbers: 0
@@ -370,7 +370,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 148
NumberOfRelocations: 4
NumberOfLinenumbers: 0
@@ -407,7 +407,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 8
NumberOfRelocations: 0
NumberOfLinenumbers: 0
@@ -425,7 +425,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 12
NumberOfRelocations: 3
NumberOfLinenumbers: 0
diff --git a/test/COFF/Inputs/pdb_lines_1.yaml b/test/COFF/Inputs/pdb_lines_1.yaml
index 3fbb2a94d45f..b52ed97c93c7 100644
--- a/test/COFF/Inputs/pdb_lines_1.yaml
+++ b/test/COFF/Inputs/pdb_lines_1.yaml
@@ -1,8 +1,8 @@
--- !COFF
-header:
+header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: [ ]
-sections:
+sections:
- Name: .drectve
Characteristics: [ IMAGE_SCN_LNK_INFO, IMAGE_SCN_LNK_REMOVE ]
Alignment: 1
@@ -10,15 +10,15 @@ sections:
- Name: '.debug$S'
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
Alignment: 1
- Subsections:
+ Subsections:
- !Symbols
- Records:
+ Records:
- Kind: S_OBJNAME
- ObjNameSym:
+ ObjNameSym:
Signature: 0
ObjectName: 'C:\src\llvm-project\build\pdb_lines_1.obj'
- Kind: S_COMPILE3
- Compile3Sym:
+ Compile3Sym:
Flags: [ SecurityChecks, HotPatch ]
Machine: X64
FrontendMajor: 19
@@ -31,9 +31,9 @@ sections:
BackendQFE: 1
Version: 'Microsoft (R) Optimizing Compiler'
- !Symbols
- Records:
+ Records:
- Kind: S_GPROC32_ID
- ProcSym:
+ ProcSym:
PtrParent: 0
PtrEnd: 0
PtrNext: 0
@@ -45,7 +45,7 @@ sections:
Flags: [ ]
DisplayName: main
- Kind: S_FRAMEPROC
- FrameProcSym:
+ FrameProcSym:
TotalFrameBytes: 40
PaddingFrameBytes: 0
OffsetToPadding: 0
@@ -54,15 +54,15 @@ sections:
SectionIdOfExceptionHandler: 0
Flags: [ AsynchronousExceptionHandling, OptimizedForSpeed ]
- Kind: S_PROC_ID_END
- ScopeEndSym:
+ ScopeEndSym:
- !Lines
CodeSize: 19
Flags: [ ]
RelocOffset: 0
RelocSegment: 0
- Blocks:
+ Blocks:
- FileName: 'c:\src\llvm-project\build\pdb_lines_1.c'
- Lines:
+ Lines:
- Offset: 0
LineStart: 2
IsStatement: true
@@ -79,9 +79,9 @@ sections:
LineStart: 5
IsStatement: true
EndDelta: 0
- Columns:
+ Columns:
- !FileChecksums
- Checksums:
+ Checksums:
- FileName: 'c:\src\llvm-project\build\pdb_lines_1.c'
Kind: MD5
Checksum: 4EB19DCD86C3BA2238A255C718572E7B
@@ -89,15 +89,15 @@ sections:
Kind: MD5
Checksum: 061EB73ABB642532857A4F1D9CBAC323
- !StringTable
- Strings:
+ Strings:
- 'c:\src\llvm-project\build\pdb_lines_1.c'
- 'c:\src\llvm-project\build\foo.h'
- !Symbols
- Records:
+ Records:
- Kind: S_BUILDINFO
- BuildInfoSym:
+ BuildInfoSym:
BuildId: 4111
- Relocations:
+ Relocations:
- VirtualAddress: 164
SymbolName: main
Type: IMAGE_REL_AMD64_SECREL
@@ -113,81 +113,81 @@ sections:
- Name: '.debug$T'
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
Alignment: 1
- Types:
+ Types:
- Kind: LF_ARGLIST
- ArgList:
+ ArgList:
ArgIndices: [ ]
- Kind: LF_PROCEDURE
- Procedure:
+ Procedure:
ReturnType: 3
CallConv: NearC
Options: [ None ]
ParameterCount: 0
ArgumentList: 4096
- Kind: LF_POINTER
- Pointer:
+ Pointer:
ReferentType: 4097
Attrs: 65548
- Kind: LF_FUNC_ID
- FuncId:
+ FuncId:
ParentScope: 0
FunctionType: 4097
Name: foo
- Kind: LF_ARGLIST
- ArgList:
+ ArgList:
ArgIndices: [ 0 ]
- Kind: LF_PROCEDURE
- Procedure:
+ Procedure:
ReturnType: 116
CallConv: NearC
Options: [ None ]
ParameterCount: 0
ArgumentList: 4100
- Kind: LF_FUNC_ID
- FuncId:
+ FuncId:
ParentScope: 0
FunctionType: 4101
Name: main
- Kind: LF_FUNC_ID
- FuncId:
+ FuncId:
ParentScope: 0
FunctionType: 4097
Name: bar
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 0
String: 'C:\src\llvm-project\build'
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 0
String: 'C:\PROGRA~2\MICROS~1.0\VC\Bin\amd64\cl.exe'
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 0
String: '-c -Z7 -MT -IC:\PROGRA~2\MICROS~1.0\VC\include -IC:\PROGRA~2\MICROS~1.0\VC\atlmfc\include -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.14393.0\ucrt -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.14393.0\shared -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.14393.0\um'
- Kind: LF_SUBSTR_LIST
- StringList:
+ StringList:
StringIndices: [ 4106 ]
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 4107
String: ' -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.14393.0\winrt -TC -X'
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 0
String: pdb_lines_1.c
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 0
String: 'C:\src\llvm-project\build\vc140.pdb'
- Kind: LF_BUILDINFO
- BuildInfo:
+ BuildInfo:
ArgIndices: [ 4104, 4105, 4109, 4110, 4108 ]
- Name: '.text$mn'
Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
Alignment: 16
SectionData: 4883EC28E800000000B82A0000004883C428C3
- Relocations:
+ Relocations:
- VirtualAddress: 5
SymbolName: foo
Type: IMAGE_REL_AMD64_REL32
@@ -195,18 +195,18 @@ sections:
Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
Alignment: 16
SectionData: 4883EC28E8000000004883C428C3
- Relocations:
+ Relocations:
- VirtualAddress: 5
SymbolName: bar
Type: IMAGE_REL_AMD64_REL32
- Name: '.debug$S'
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
Alignment: 1
- Subsections:
+ Subsections:
- !Symbols
- Records:
+ Records:
- Kind: S_GPROC32_ID
- ProcSym:
+ ProcSym:
PtrParent: 0
PtrEnd: 0
PtrNext: 0
@@ -218,7 +218,7 @@ sections:
Flags: [ ]
DisplayName: foo
- Kind: S_FRAMEPROC
- FrameProcSym:
+ FrameProcSym:
TotalFrameBytes: 40
PaddingFrameBytes: 0
OffsetToPadding: 0
@@ -227,15 +227,15 @@ sections:
SectionIdOfExceptionHandler: 0
Flags: [ MarkedInline, AsynchronousExceptionHandling, OptimizedForSpeed ]
- Kind: S_PROC_ID_END
- ScopeEndSym:
+ ScopeEndSym:
- !Lines
CodeSize: 14
Flags: [ ]
RelocOffset: 0
RelocSegment: 0
- Blocks:
+ Blocks:
- FileName: 'c:\src\llvm-project\build\foo.h'
- Lines:
+ Lines:
- Offset: 0
LineStart: 2
IsStatement: true
@@ -248,8 +248,8 @@ sections:
LineStart: 4
IsStatement: true
EndDelta: 0
- Columns:
- Relocations:
+ Columns:
+ Relocations:
- VirtualAddress: 44
SymbolName: foo
Type: IMAGE_REL_AMD64_SECREL
@@ -270,7 +270,7 @@ sections:
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_READ ]
Alignment: 4
SectionData: '000000000E00000000000000'
- Relocations:
+ Relocations:
- VirtualAddress: 0
SymbolName: '$LN3'
Type: IMAGE_REL_AMD64_ADDR32NB
@@ -288,7 +288,7 @@ sections:
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
Alignment: 4
SectionData: '000000001300000000000000'
- Relocations:
+ Relocations:
- VirtualAddress: 0
SymbolName: '$LN3'
Type: IMAGE_REL_AMD64_ADDR32NB
@@ -298,14 +298,14 @@ sections:
- VirtualAddress: 8
SymbolName: '$unwind$main'
Type: IMAGE_REL_AMD64_ADDR32NB
-symbols:
+symbols:
- Name: .drectve
Value: 0
SectionNumber: 1
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 47
NumberOfRelocations: 0
NumberOfLinenumbers: 0
@@ -317,7 +317,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 432
NumberOfRelocations: 4
NumberOfLinenumbers: 0
@@ -329,7 +329,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 644
NumberOfRelocations: 0
NumberOfLinenumbers: 0
@@ -341,7 +341,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 19
NumberOfRelocations: 1
NumberOfLinenumbers: 0
@@ -353,7 +353,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 14
NumberOfRelocations: 1
NumberOfLinenumbers: 0
@@ -366,7 +366,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 148
NumberOfRelocations: 4
NumberOfLinenumbers: 0
@@ -409,7 +409,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 8
NumberOfRelocations: 0
NumberOfLinenumbers: 0
@@ -428,7 +428,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 12
NumberOfRelocations: 3
NumberOfLinenumbers: 0
@@ -447,7 +447,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 8
NumberOfRelocations: 0
NumberOfLinenumbers: 0
@@ -465,7 +465,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 12
NumberOfRelocations: 3
NumberOfLinenumbers: 0
diff --git a/test/COFF/Inputs/pdb_lines_2.yaml b/test/COFF/Inputs/pdb_lines_2.yaml
index 8ad8d062db58..8026c19c91d4 100644
--- a/test/COFF/Inputs/pdb_lines_2.yaml
+++ b/test/COFF/Inputs/pdb_lines_2.yaml
@@ -1,8 +1,8 @@
--- !COFF
-header:
+header:
Machine: IMAGE_FILE_MACHINE_AMD64
Characteristics: [ ]
-sections:
+sections:
- Name: .drectve
Characteristics: [ IMAGE_SCN_LNK_INFO, IMAGE_SCN_LNK_REMOVE ]
Alignment: 1
@@ -10,15 +10,15 @@ sections:
- Name: '.debug$S'
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
Alignment: 1
- Subsections:
+ Subsections:
- !Symbols
- Records:
+ Records:
- Kind: S_OBJNAME
- ObjNameSym:
+ ObjNameSym:
Signature: 0
ObjectName: 'C:\src\llvm-project\build\pdb_lines_2.obj'
- Kind: S_COMPILE3
- Compile3Sym:
+ Compile3Sym:
Flags: [ SecurityChecks, HotPatch ]
Machine: X64
FrontendMajor: 19
@@ -31,9 +31,9 @@ sections:
BackendQFE: 1
Version: 'Microsoft (R) Optimizing Compiler'
- !Symbols
- Records:
+ Records:
- Kind: S_GPROC32_ID
- ProcSym:
+ ProcSym:
PtrParent: 0
PtrEnd: 0
PtrNext: 0
@@ -45,7 +45,7 @@ sections:
Flags: [ ]
DisplayName: bar
- Kind: S_FRAMEPROC
- FrameProcSym:
+ FrameProcSym:
TotalFrameBytes: 0
PaddingFrameBytes: 0
OffsetToPadding: 0
@@ -54,15 +54,15 @@ sections:
SectionIdOfExceptionHandler: 0
Flags: [ AsynchronousExceptionHandling, OptimizedForSpeed ]
- Kind: S_PROC_ID_END
- ScopeEndSym:
+ ScopeEndSym:
- !Lines
CodeSize: 1
Flags: [ ]
RelocOffset: 0
RelocSegment: 0
- Blocks:
+ Blocks:
- FileName: 'c:\src\llvm-project\build\pdb_lines_2.c'
- Lines:
+ Lines:
- Offset: 0
LineStart: 1
IsStatement: true
@@ -71,21 +71,21 @@ sections:
LineStart: 2
IsStatement: true
EndDelta: 0
- Columns:
+ Columns:
- !FileChecksums
- Checksums:
+ Checksums:
- FileName: 'c:\src\llvm-project\build\pdb_lines_2.c'
Kind: MD5
Checksum: DF91CB3A2B8D917486574BB50CAC4CC7
- !StringTable
- Strings:
+ Strings:
- 'c:\src\llvm-project\build\pdb_lines_2.c'
- !Symbols
- Records:
+ Records:
- Kind: S_BUILDINFO
- BuildInfoSym:
+ BuildInfoSym:
BuildId: 4106
- Relocations:
+ Relocations:
- VirtualAddress: 164
SymbolName: bar
Type: IMAGE_REL_AMD64_SECREL
@@ -101,64 +101,64 @@ sections:
- Name: '.debug$T'
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
Alignment: 1
- Types:
+ Types:
- Kind: LF_ARGLIST
- ArgList:
+ ArgList:
ArgIndices: [ ]
- Kind: LF_PROCEDURE
- Procedure:
+ Procedure:
ReturnType: 3
CallConv: NearC
Options: [ None ]
ParameterCount: 0
ArgumentList: 4096
- Kind: LF_FUNC_ID
- FuncId:
+ FuncId:
ParentScope: 0
FunctionType: 4097
Name: bar
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 0
String: 'C:\src\llvm-project\build'
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 0
String: 'C:\PROGRA~2\MICROS~1.0\VC\Bin\amd64\cl.exe'
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 0
String: '-c -Z7 -MT -IC:\PROGRA~2\MICROS~1.0\VC\include -IC:\PROGRA~2\MICROS~1.0\VC\atlmfc\include -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.14393.0\ucrt -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.14393.0\shared -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.14393.0\um'
- Kind: LF_SUBSTR_LIST
- StringList:
+ StringList:
StringIndices: [ 4101 ]
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 4102
String: ' -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.14393.0\winrt -TC -X'
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 0
String: pdb_lines_2.c
- Kind: LF_STRING_ID
- StringId:
+ StringId:
Id: 0
String: 'C:\src\llvm-project\build\vc140.pdb'
- Kind: LF_BUILDINFO
- BuildInfo:
+ BuildInfo:
ArgIndices: [ 4099, 4100, 4104, 4105, 4103 ]
- Name: '.text$mn'
Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
Alignment: 16
SectionData: C3
-symbols:
+symbols:
- Name: .drectve
Value: 0
SectionNumber: 1
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 47
NumberOfRelocations: 0
NumberOfLinenumbers: 0
@@ -170,7 +170,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 360
NumberOfRelocations: 4
NumberOfLinenumbers: 0
@@ -182,7 +182,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 568
NumberOfRelocations: 0
NumberOfLinenumbers: 0
@@ -194,7 +194,7 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
+ SectionDefinition:
Length: 1
NumberOfRelocations: 0
NumberOfLinenumbers: 0
diff --git a/test/COFF/arm-thumb-branch20-error.s b/test/COFF/arm-thumb-branch20-error.s
new file mode 100644
index 000000000000..ec7d23b05329
--- /dev/null
+++ b/test/COFF/arm-thumb-branch20-error.s
@@ -0,0 +1,10 @@
+// REQUIRES: arm
+// RUN: llvm-mc -filetype=obj -triple=thumbv7a-windows-gnu %s -o %t.obj
+// RUN: llvm-mc -filetype=obj -triple=thumbv7a-windows-gnu %S/Inputs/far-arm-thumb-abs20.s -o %t.far.obj
+// RUN: not lld-link -entry:_start -subsystem:console %t.obj %t.far.obj -out:%t.exe 2>&1 | FileCheck %s
+ .syntax unified
+ .globl _start
+_start:
+ bne too_far20
+
+// CHECK: relocation out of range
diff --git a/test/COFF/arm64-dynamicbase.s b/test/COFF/arm64-dynamicbase.s
new file mode 100644
index 000000000000..d4cb12c1c8ff
--- /dev/null
+++ b/test/COFF/arm64-dynamicbase.s
@@ -0,0 +1,8 @@
+// REQUIRES: aarch64
+// RUN: llvm-mc -filetype=obj -triple=aarch64-windows %s -o %t.obj
+// RUN: not lld-link -entry:_start -subsystem:console %t.obj -out:%t.exe -dynamicbase:no 2>&1 | FileCheck %s
+ .globl _start
+_start:
+ ret
+
+# CHECK: dynamicbase:no is not compatible with arm64
diff --git a/test/COFF/arm64-import2.test b/test/COFF/arm64-import2.test
new file mode 100644
index 000000000000..3119e73e1d54
--- /dev/null
+++ b/test/COFF/arm64-import2.test
@@ -0,0 +1,85 @@
+# REQUIRES: aarch64
+
+# RUN: yaml2obj < %s > %t.obj
+# RUN: llvm-objdump -d %t.obj | FileCheck %s -check-prefix BEFORE
+# RUN: lld-link /entry:main /subsystem:console /out:%t.exe %t.obj %p/Inputs/library-arm64.lib %p/Inputs/library2-arm64.lib
+# RUN: llvm-objdump -d %t.exe | FileCheck %s -check-prefix AFTER
+# RUN: llvm-readobj -coff-imports %t.exe | FileCheck %s -check-prefix IMPORTS
+
+# BEFORE: Disassembly of section .text:
+# BEFORE: 0: 00 00 00 94 bl #0
+# BEFORE: 4: 00 00 00 94 bl #0
+# BEFORE: 8: c0 03 5f d6 ret
+
+# AFTER: Disassembly of section .text:
+# AFTER: 140001000: 03 00 00 94 bl #12
+# AFTER: 140001004: 05 00 00 94 bl #20
+# AFTER: 140001008: c0 03 5f d6 ret
+# AFTER: 14000100c: 10 00 00 b0 adrp x16, #4096
+# AFTER: 140001010: 10 32 40 f9 ldr x16, [x16, #96]
+# AFTER: 140001014: 00 02 1f d6 br x16
+# AFTER: 140001018: 10 00 00 b0 adrp x16, #4096
+# AFTER: 14000101c: 10 3a 40 f9 ldr x16, [x16, #112]
+# AFTER: 140001020: 00 02 1f d6 br x16
+
+# IMPORTS: Import {
+# IMPORTS: Name: library.dll
+# IMPORTS: ImportLookupTableRVA: 0x2040
+# IMPORTS: ImportAddressTableRVA: 0x2060
+# IMPORTS: Symbol: function (2)
+# IMPORTS: }
+# IMPORTS: Import {
+# IMPORTS: Name: library2.dll
+# IMPORTS: ImportLookupTableRVA: 0x2050
+# IMPORTS: ImportAddressTableRVA: 0x2070
+# IMPORTS: Symbol: function2 (0)
+# IMPORTS: }
+
+--- !COFF
+header:
+ Machine: IMAGE_FILE_MACHINE_ARM64
+ Characteristics: [ ]
+sections:
+ - Name: .text
+ Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+ Alignment: 4
+ SectionData: 0000009400000094C0035FD6
+ Relocations:
+ - VirtualAddress: 0
+ SymbolName: function
+ Type: IMAGE_REL_ARM64_BRANCH26
+ - VirtualAddress: 4
+ SymbolName: function2
+ Type: IMAGE_REL_ARM64_BRANCH26
+symbols:
+ - Name: .text
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 12
+ NumberOfRelocations: 2
+ NumberOfLinenumbers: 0
+ CheckSum: 1438860354
+ Number: 1
+ - Name: main
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: function
+ Value: 0
+ SectionNumber: 0
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: function2
+ Value: 0
+ SectionNumber: 0
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+...
diff --git a/test/COFF/arm64-relocs-imports.test b/test/COFF/arm64-relocs-imports.test
index 3d252aaa2801..57590dcf733a 100644
--- a/test/COFF/arm64-relocs-imports.test
+++ b/test/COFF/arm64-relocs-imports.test
@@ -14,29 +14,67 @@
# BEFORE: 14: 00 01 40 79 ldrh w0, [x8]
# BEFORE: 18: 00 01 40 b9 ldr w0, [x8]
# BEFORE: 1c: 00 01 40 f9 ldr x0, [x8]
-# BEFORE: 20: e0 03 1f 2a mov w0, wzr
-# BEFORE: 24: fe 07 41 f8 ldr x30, [sp], #16
-# BEFORE: 28: c0 03 5f d6 ret
-# BEFORE: 2c: 08 00 00 00 <unknown>
-# BEFORE: 30: 00 00 00 00 <unknown>
+# BEFORE: 20: 00 01 00 39 strb w0, [x8]
+# BEFORE: 24: 00 01 00 79 strh w0, [x8]
+# BEFORE: 28: 00 01 00 b9 str w0, [x8]
+# BEFORE: 2c: 00 01 00 f9 str x0, [x8]
+# BEFORE: 30: 00 01 40 3d ldr b0, [x8]
+# BEFORE: 34: 00 01 40 7d ldr h0, [x8]
+# BEFORE: 38: 00 01 40 bd ldr s0, [x8]
+# BEFORE: 3c: 00 01 40 fd ldr d0, [x8]
+# BEFORE: 40: 00 01 c0 3d ldr q0, [x8]
+# BEFORE: 44: 00 01 00 3d str b0, [x8]
+# BEFORE: 48: 00 01 00 7d str h0, [x8]
+# BEFORE: 4c: 00 01 00 bd str s0, [x8]
+# BEFORE: 50: 00 01 00 fd str d0, [x8]
+# BEFORE: 54: 00 01 80 3d str q0, [x8]
+# BEFORE: 58: 00 05 40 f9 ldr x0, [x8, #8]
+# BEFORE: 5c: 20 1a 01 b0 adrp x0, #36982784
+# BEFORE: 60: 00 fc 4f f9 ldr x0, [x0, #8184]
+# BEFORE: 64: e0 03 1f 2a mov w0, wzr
+# BEFORE: 68: fe 07 41 f8 ldr x30, [sp], #16
+# BEFORE: 6c: c0 03 5f d6 ret
+# BEFORE: 70: 08 00 00 00 <unknown>
+# BEFORE: 74: 00 00 00 00 <unknown>
+# BEFORE: 78: 01 00 00 00 <unknown>
+# BEFORE: 7c: 01 00 00 00 <unknown>
# AFTER: Disassembly of section .text:
# AFTER: 140002000: fe 0f 1f f8 str x30, [sp, #-16]!
# AFTER: 140002004: e0 ff ff f0 adrp x0, #-4096
# AFTER: 140002008: 00 18 00 91 add x0, x0, #6
-# AFTER: 14000200c: 0a 00 00 94 bl #40
+# AFTER: 14000200c: 1d 00 00 94 bl #116
# AFTER: 140002010: 00 21 40 39 ldrb w0, [x8, #8]
# AFTER: 140002014: 00 11 40 79 ldrh w0, [x8, #8]
# AFTER: 140002018: 00 09 40 b9 ldr w0, [x8, #8]
# AFTER: 14000201c: 00 05 40 f9 ldr x0, [x8, #8]
-# AFTER: 140002020: e0 03 1f 2a mov w0, wzr
-# AFTER: 140002024: fe 07 41 f8 ldr x30, [sp], #16
-# AFTER: 140002028: c0 03 5f d6 ret
-# AFTER: 14000202c: 10 10 00 40 <unknown>
-# AFTER: 140002030: 01 00 00 00 <unknown>
-# AFTER: 140002034: 10 00 00 b0 adrp x16, #4096
-# AFTER: 140002038: 10 1e 40 f9 ldr x16, [x16, #56]
-# AFTER: 14000203c: 00 02 1f d6 br x16
+# AFTER: 140002020: 00 21 00 39 strb w0, [x8, #8]
+# AFTER: 140002024: 00 11 00 79 strh w0, [x8, #8]
+# AFTER: 140002028: 00 09 00 b9 str w0, [x8, #8]
+# AFTER: 14000202c: 00 05 00 f9 str x0, [x8, #8]
+# AFTER: 140002030: 00 41 40 3d ldr b0, [x8, #16]
+# AFTER: 140002034: 00 21 40 7d ldr h0, [x8, #16]
+# AFTER: 140002038: 00 11 40 bd ldr s0, [x8, #16]
+# AFTER: 14000203c: 00 09 40 fd ldr d0, [x8, #16]
+# AFTER: 140002040: 00 05 c0 3d ldr q0, [x8, #16]
+# AFTER: 140002044: 00 41 00 3d str b0, [x8, #16]
+# AFTER: 140002048: 00 21 00 7d str h0, [x8, #16]
+# AFTER: 14000204c: 00 11 00 bd str s0, [x8, #16]
+# AFTER: 140002050: 00 09 00 fd str d0, [x8, #16]
+# AFTER: 140002054: 00 05 80 3d str q0, [x8, #16]
+# AFTER: 140002058: 00 09 40 f9 ldr x0, [x8, #16]
+# AFTER: 14000205c: 00 00 00 b0 adrp x0, #4096
+# AFTER: 140002060: 00 fc 47 f9 ldr x0, [x0, #4088]
+# AFTER: 140002064: e0 03 1f 2a mov w0, wzr
+# AFTER: 140002068: fe 07 41 f8 ldr x30, [sp], #16
+# AFTER: 14000206c: c0 03 5f d6 ret
+# AFTER: 140002070: 10 10 00 40 <unknown>
+# AFTER: 140002074: 01 00 00 00 <unknown>
+# AFTER: 140002078: 09 10 00 00 <unknown>
+# AFTER: 14000207c: 09 00 00 00 <unknown>
+# AFTER: 140002080: 10 00 00 b0 adrp x16, #4096
+# AFTER: 140002084: 10 1e 40 f9 ldr x16, [x16, #56]
+# AFTER: 140002088: 00 02 1f d6 br x16
--- !COFF
header:
@@ -46,32 +84,89 @@ sections:
- Name: .text
Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
Alignment: 4
- SectionData: FE0F1FF80000009000080091000000940001403900014079000140B9000140F9E0031F2AFE0741F8C0035FD60800000000000000
+ SectionData: FE0F1FF80000009000080091000000940001403900014079000140B9000140F90001003900010079000100B9000100F90001403D0001407D000140BD000140FD0001C03D0001003D0001007D000100BD000100FD0001803D000540F9201A01B000FC4FF9E0031F2AFE0741F8C0035FD608000000000000000100000001000000
Relocations:
- VirtualAddress: 4
SymbolName: .Lstr
- Type: 4
+ Type: IMAGE_REL_ARM64_PAGEBASE_REL21
- VirtualAddress: 8
SymbolName: .Lstr
- Type: 6
+ Type: IMAGE_REL_ARM64_PAGEOFFSET_12A
- VirtualAddress: 12
SymbolName: function
- Type: 3
+ Type: IMAGE_REL_ARM64_BRANCH26
- VirtualAddress: 16
SymbolName: .Lglobal
- Type: 7
+ Type: IMAGE_REL_ARM64_PAGEOFFSET_12L
- VirtualAddress: 20
SymbolName: .Lglobal
- Type: 7
+ Type: IMAGE_REL_ARM64_PAGEOFFSET_12L
- VirtualAddress: 24
SymbolName: .Lglobal
- Type: 7
+ Type: IMAGE_REL_ARM64_PAGEOFFSET_12L
- VirtualAddress: 28
SymbolName: .Lglobal
- Type: 7
+ Type: IMAGE_REL_ARM64_PAGEOFFSET_12L
+ - VirtualAddress: 32
+ SymbolName: .Lglobal
+ Type: IMAGE_REL_ARM64_PAGEOFFSET_12L
+ - VirtualAddress: 36
+ SymbolName: .Lglobal
+ Type: IMAGE_REL_ARM64_PAGEOFFSET_12L
+ - VirtualAddress: 40
+ SymbolName: .Lglobal
+ Type: IMAGE_REL_ARM64_PAGEOFFSET_12L
- VirtualAddress: 44
SymbolName: .Lglobal
- Type: 14
+ Type: IMAGE_REL_ARM64_PAGEOFFSET_12L
+ - VirtualAddress: 48
+ SymbolName: .Lglobal16
+ Type: IMAGE_REL_ARM64_PAGEOFFSET_12L
+ - VirtualAddress: 52
+ SymbolName: .Lglobal16
+ Type: IMAGE_REL_ARM64_PAGEOFFSET_12L
+ - VirtualAddress: 56
+ SymbolName: .Lglobal16
+ Type: IMAGE_REL_ARM64_PAGEOFFSET_12L
+ - VirtualAddress: 60
+ SymbolName: .Lglobal16
+ Type: IMAGE_REL_ARM64_PAGEOFFSET_12L
+ - VirtualAddress: 64
+ SymbolName: .Lglobal16
+ Type: IMAGE_REL_ARM64_PAGEOFFSET_12L
+ - VirtualAddress: 68
+ SymbolName: .Lglobal16
+ Type: IMAGE_REL_ARM64_PAGEOFFSET_12L
+ - VirtualAddress: 72
+ SymbolName: .Lglobal16
+ Type: IMAGE_REL_ARM64_PAGEOFFSET_12L
+ - VirtualAddress: 76
+ SymbolName: .Lglobal16
+ Type: IMAGE_REL_ARM64_PAGEOFFSET_12L
+ - VirtualAddress: 80
+ SymbolName: .Lglobal16
+ Type: IMAGE_REL_ARM64_PAGEOFFSET_12L
+ - VirtualAddress: 84
+ SymbolName: .Lglobal16
+ Type: IMAGE_REL_ARM64_PAGEOFFSET_12L
+ - VirtualAddress: 88
+ SymbolName: .Lglobal
+ Type: IMAGE_REL_ARM64_PAGEOFFSET_12L
+ - VirtualAddress: 92
+ SymbolName: .Lglobal16
+ Type: IMAGE_REL_ARM64_PAGEBASE_REL21
+ - VirtualAddress: 96
+ SymbolName: .Lglobal0
+ Type: IMAGE_REL_ARM64_PAGEOFFSET_12L
+ - VirtualAddress: 112
+ SymbolName: .Lglobal
+ Type: IMAGE_REL_ARM64_ADDR64
+ - VirtualAddress: 120
+ SymbolName: .Lglobal
+ Type: IMAGE_REL_ARM64_ADDR32NB
+ - VirtualAddress: 124
+ SymbolName: .Lglobal
+ Type: IMAGE_REL_ARM64_SECREL
- Name: .data
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
Alignment: 4
@@ -127,6 +222,18 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
+ - Name: .Lglobal16
+ Value: 16
+ SectionNumber: 4
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ - Name: .Lglobal0
+ Value: 0
+ SectionNumber: 4
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
- Name: function
Value: 0
SectionNumber: 0
diff --git a/test/COFF/armnt-blx23t.test b/test/COFF/armnt-blx23t.test
index 5caf6ebaa127..ec36225e4332 100644
--- a/test/COFF/armnt-blx23t.test
+++ b/test/COFF/armnt-blx23t.test
@@ -37,7 +37,7 @@ sections:
Relocations:
- VirtualAddress: 12
SymbolName: identity
- Type: 21
+ Type: IMAGE_REL_ARM_BLX23T
symbols:
- Name: .text
Value: 0
diff --git a/test/COFF/armnt-branch24t.test b/test/COFF/armnt-branch24t.test
index 6e1114c94a18..88d17e445b1e 100644
--- a/test/COFF/armnt-branch24t.test
+++ b/test/COFF/armnt-branch24t.test
@@ -30,7 +30,7 @@ sections:
Relocations:
- VirtualAddress: 6
SymbolName: identity
- Type: 20
+ Type: IMAGE_REL_ARM_BRANCH24T
symbols:
- Name: .text
Value: 0
diff --git a/test/COFF/armnt-dynamicbase.test b/test/COFF/armnt-dynamicbase.test
new file mode 100644
index 000000000000..50d3bea54fd3
--- /dev/null
+++ b/test/COFF/armnt-dynamicbase.test
@@ -0,0 +1,3 @@
+# RUN: yaml2obj < %p/Inputs/armnt-executable.obj.yaml > %t.obj
+# RUN: not lld-link /out:%t.exe /entry:mainCRTStartup /subsystem:console %t.obj /dynamicbase:no 2>&1 | FileCheck %s
+# CHECK: dynamicbase:no is not compatible with arm
diff --git a/test/COFF/armnt-imports.test b/test/COFF/armnt-imports.test
index 519886eb0c06..7d3612a0df7e 100644
--- a/test/COFF/armnt-imports.test
+++ b/test/COFF/armnt-imports.test
@@ -22,7 +22,7 @@ sections:
Relocations:
- VirtualAddress: 0
SymbolName: __imp_function
- Type: 17
+ Type: IMAGE_REL_ARM_MOV32T
symbols:
- Name: .text
Value: 0
diff --git a/test/COFF/armnt-mov32t-exec.test b/test/COFF/armnt-mov32t-exec.test
index 629f0620730d..abc78c7fcc5b 100644
--- a/test/COFF/armnt-mov32t-exec.test
+++ b/test/COFF/armnt-mov32t-exec.test
@@ -31,7 +31,7 @@ sections:
Relocations:
- VirtualAddress: 4
SymbolName: function
- Type: 17
+ Type: IMAGE_REL_ARM_MOV32T
symbols:
- Name: .text
Value: 0
diff --git a/test/COFF/armnt-movt32t.test b/test/COFF/armnt-movt32t.test
index 6a9bf256e335..7c6965efed6a 100644
--- a/test/COFF/armnt-movt32t.test
+++ b/test/COFF/armnt-movt32t.test
@@ -27,7 +27,7 @@ sections:
Relocations:
- VirtualAddress: 0
SymbolName: buffer
- Type: 17
+ Type: IMAGE_REL_ARM_MOV32T
- Name: .rdata
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
Alignment: 1
diff --git a/test/COFF/common-alignment.test b/test/COFF/common-alignment.test
new file mode 100644
index 000000000000..a4ee15729107
--- /dev/null
+++ b/test/COFF/common-alignment.test
@@ -0,0 +1,78 @@
+# REQUIRES: x86
+# RUN: yaml2obj %s > %t.obj
+# RUN: lld-link /out:%t.exe /entry:main %t.obj %t.obj
+# RUN: llvm-objdump -d %t.exe | FileCheck %s
+
+# Operands of B8 (MOV EAX) are common symbols
+# CHECK: 3000: b8 00 10 00 40
+# CHECK: 3005: b8 10 10 00 40
+
+--- !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: 4
+ SectionData: b800000000b800000000
+ Relocations:
+ - VirtualAddress: 1
+ SymbolName: bssdata4
+ Type: IMAGE_REL_AMD64_ADDR32
+ - VirtualAddress: 6
+ SymbolName: bssdata4_align16
+ Type: IMAGE_REL_AMD64_ADDR32
+ - Name: .data
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
+ Alignment: 4
+ SectionData: 03000000
+ - Name: .drectve
+ Characteristics: [ IMAGE_SCN_LNK_INFO, IMAGE_SCN_LNK_REMOVE ]
+ Alignment: 1
+ SectionData: 202d616c69676e636f6d6d3a62737364617461345f616c69676e31362c340a # -aligncomm:bssdata4_align16,4
+
+symbols:
+ - Name: .text
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 0
+ NumberOfRelocations: 5
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 0
+ - Name: .data
+ Value: 0
+ SectionNumber: 2
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 4
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 0
+ - Name: main
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: bssdata4
+ Value: 4
+ SectionNumber: 0
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: bssdata4_align16
+ Value: 4
+ SectionNumber: 0
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+...
diff --git a/test/COFF/ctors_dtors_priority.s b/test/COFF/ctors_dtors_priority.s
new file mode 100644
index 000000000000..60562ba57a52
--- /dev/null
+++ b/test/COFF/ctors_dtors_priority.s
@@ -0,0 +1,30 @@
+# REQUIRES: x86
+# RUN: llvm-mc -triple=x86_64-windows-gnu -filetype=obj -o %t.obj %s
+# RUN: lld-link -entry:main %t.obj -out:%t.exe
+# RUN: llvm-objdump -s %t.exe | FileCheck %s
+
+.globl main
+main:
+ nop
+
+.section .ctors.00005, "w"
+ .quad 2
+.section .ctors, "w"
+ .quad 1
+.section .ctors.00100, "w"
+ .quad 3
+
+.section .dtors, "w"
+ .quad 1
+.section .dtors.00100, "w"
+ .quad 3
+.section .dtors.00005, "w"
+ .quad 2
+
+# CHECK: Contents of section .ctors:
+# CHECK-NEXT: 140001000 01000000 00000000 02000000 00000000
+# CHECK-NEXT: 140001010 03000000 00000000
+
+# CHECK: Contents of section .dtors:
+# CHECK-NEXT: 140002000 01000000 00000000 02000000 00000000
+# CHECK-NEXT: 140002010 03000000 00000000
diff --git a/test/COFF/debug-dwarf.test b/test/COFF/debug-dwarf.test
new file mode 100644
index 000000000000..156b2f58f64e
--- /dev/null
+++ b/test/COFF/debug-dwarf.test
@@ -0,0 +1,19 @@
+# Check that /debug creates %t.pdb.
+# RUN: rm -f %t.pdb
+# RUN: lld-link /debug /entry:main /out:%t.exe %p/Inputs/ret42.obj
+# RUN: ls %t.pdb
+
+# Check that /debug:dwarf does not create %t.pdb.
+# RUN: rm -f %t.pdb
+# RUN: lld-link /debug:dwarf /entry:main /out:%t.exe %p/Inputs/ret42.obj
+# RUN: not ls %t.pdb
+
+# Check that /debug:dwarf /debug creates %t.pdb.
+# RUN: rm -f %t.pdb
+# RUN: lld-link /debug:dwarf /debug /entry:main /out:%t.exe %p/Inputs/ret42.obj
+# RUN: ls %t.pdb
+
+# Check that /debug:dwarf /pdb:%t.pdb does not create %t.pdb.
+# RUN: rm -f %t.pdb
+# RUN: lld-link /debug:dwarf /pdb:%t.pdb /entry:main /out:%t.exe %p/Inputs/ret42.obj
+# RUN: not ls %t.pdb
diff --git a/test/COFF/def-export-stdcall.s b/test/COFF/def-export-stdcall.s
index 17473f7f9761..851ac6d975b9 100644
--- a/test/COFF/def-export-stdcall.s
+++ b/test/COFF/def-export-stdcall.s
@@ -1,21 +1,89 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=i686-windows-msvc %s -o %t.obj
-# RUN: echo -e "LIBRARY foo\nEXPORTS\n stdcall" > %t.def
+# RUN: echo -e "LIBRARY foo\nEXPORTS\n stdcall\n fastcall\n vectorcall\n _underscored" > %t.def
# RUN: lld-link -entry:dllmain -dll -def:%t.def %t.obj -out:%t.dll -implib:%t.lib
-# RUN: llvm-readobj %t.lib | FileCheck %s
-# CHECK: Name type: undecorate
-# CHECK: __imp__stdcall@8
-# CHECK: _stdcall@8
+# RUN: llvm-readobj %t.lib | FileCheck -check-prefix UNDECORATED-IMPLIB %s
+# RUN: llvm-readobj -coff-exports %t.dll | FileCheck -check-prefix UNDECORATED-EXPORTS %s
+
+# UNDECORATED-IMPLIB: Name type: noprefix
+# UNDECORATED-IMPLIB-NEXT: __imp___underscored
+# UNDECORATED-IMPLIB-NEXT: __underscored
+# UNDECORATED-IMPLIB: Name type: undecorate
+# UNDECORATED-IMPLIB-NEXT: __imp_@fastcall@8
+# UNDECORATED-IMPLIB-NEXT: fastcall@8
+# UNDECORATED-IMPLIB: Name type: undecorate
+# UNDECORATED-IMPLIB-NEXT: __imp__stdcall@8
+# UNDECORATED-IMPLIB-NEXT: _stdcall@8
+# UNDECORATED-IMPLIB: Name type: undecorate
+# UNDECORATED-IMPLIB-NEXT: __imp_vectorcall@@8
+# UNDECORATED-IMPLIB-NEXT: vectorcall@@8
+
+# UNDECORATED-EXPORTS: Name: _underscored
+# UNDECORATED-EXPORTS: Name: fastcall
+# UNDECORATED-EXPORTS: Name: stdcall
+# UNDECORATED-EXPORTS: Name: vectorcall
+
+
+# RUN: echo -e "LIBRARY foo\nEXPORTS\n _stdcall@8\n @fastcall@8\n vectorcall@@8" > %t.def
+# RUN: lld-link -entry:dllmain -dll -def:%t.def %t.obj -out:%t.dll -implib:%t.lib
+# RUN: llvm-readobj %t.lib | FileCheck -check-prefix DECORATED-IMPLIB %s
+# RUN: llvm-readobj -coff-exports %t.dll | FileCheck -check-prefix DECORATED-EXPORTS %s
+
+# DECORATED-IMPLIB: Name type: name
+# DECORATED-IMPLIB-NEXT: __imp_@fastcall@8
+# DECORATED-IMPLIB-NEXT: @fastcall@8
+# TODO: To match link.exe, this one should also be Name type: name.
+# DECORATED-IMPLIB: Name type: noprefix
+# DECORATED-IMPLIB-NEXT: __imp__stdcall@8
+# DECORATED-IMPLIB-NEXT: _stdcall@8
+# DECORATED-IMPLIB: Name type: name
+# DECORATED-IMPLIB-NEXT: __imp_vectorcall@@8
+# DECORATED-IMPLIB-NEXT: vectorcall@@8
+
+# DECORATED-EXPORTS: Name: @fastcall@8
+# TODO: To match link.exe, this one should actually be _stdcall@8
+# DECORATED-EXPORTS: Name: stdcall@8
+# DECORATED-EXPORTS: Name: vectorcall@@8
+
+
+# RUN: echo -e "LIBRARY foo\nEXPORTS\n stdcall@8\n @fastcall@8" > %t.def
+# RUN: lld-link -lldmingw -entry:dllmain -dll -def:%t.def %t.obj -out:%t.dll -implib:%t.lib
+# RUN: llvm-readobj %t.lib | FileCheck -check-prefix DECORATED-MINGW-IMPLIB %s
+# RUN: llvm-readobj -coff-exports %t.dll | FileCheck -check-prefix DECORATED-MINGW-EXPORTS %s
+
+# DECORATED-MINGW-IMPLIB: Name type: name
+# DECORATED-MINGW-IMPLIB-NEXT: __imp_@fastcall@8
+# DECORATED-MINGW-IMPLIB-NEXT: fastcall@8
+# DECORATED-MINGW-IMPLIB: Name type: noprefix
+# DECORATED-MINGW-IMPLIB-NEXT: __imp__stdcall@8
+# DECORATED-MINGW-IMPLIB-NEXT: _stdcall@8
+
+# DECORATED-MINGW-EXPORTS: Name: @fastcall@8
+# DECORATED-MINGW-EXPORTS: Name: stdcall@8
+
.def _stdcall@8;
.scl 2;
.type 32;
.endef
.globl _stdcall@8
+ .globl @fastcall@8
+ .globl vectorcall@@8
+ .globl __underscored
_stdcall@8:
movl 8(%esp), %eax
addl 4(%esp), %eax
retl $8
+@fastcall@8:
+ movl 8(%esp), %eax
+ addl 4(%esp), %eax
+ retl $8
+vectorcall@@8:
+ movl 8(%esp), %eax
+ addl 4(%esp), %eax
+ retl $8
+__underscored:
+ ret
.def _dllmain;
.scl 2;
diff --git a/test/COFF/delayimports-armnt.yaml b/test/COFF/delayimports-armnt.yaml
new file mode 100644
index 000000000000..231b4bc5c1f1
--- /dev/null
+++ b/test/COFF/delayimports-armnt.yaml
@@ -0,0 +1,106 @@
+# REQUIRES: arm
+# RUN: yaml2obj < %s > %t.obj
+# RUN: lld-link %t.obj %p/Inputs/library.lib /subsystem:console \
+# RUN: /entry:mainCRTStartup /alternatename:__delayLoadHelper2=mainCRTStartup \
+# RUN: /delayload:library.dll /out:%t.exe
+# RUN: llvm-readobj -coff-imports %t.exe | FileCheck -check-prefix=IMPORT %s
+# RUN: llvm-readobj -coff-basereloc %t.exe | FileCheck -check-prefix=BASEREL %s
+# RUN: llvm-objdump -d %t.exe | FileCheck -check-prefix=DISASM %s
+
+# IMPORT: Format: COFF-ARM
+# IMPORT-NEXT: Arch: thumb
+# IMPORT-NEXT: AddressSize: 32bit
+# IMPORT-NEXT: DelayImport {
+# IMPORT-NEXT: Name: library.dll
+# IMPORT-NEXT: Attributes: 0x1
+# IMPORT-NEXT: ModuleHandle: 0x3000
+# IMPORT-NEXT: ImportAddressTable: 0x3008
+# IMPORT-NEXT: ImportNameTable: 0x2040
+# IMPORT-NEXT: BoundDelayImportTable: 0x0
+# IMPORT-NEXT: UnloadDelayImportTable: 0x0
+# IMPORT-NEXT: Import {
+# IMPORT-NEXT: Symbol: function (0)
+# IMPORT-NEXT: Address: 0x401019
+# IMPORT-NEXT: }
+# IMPORT-NEXT: }
+#
+# BASEREL: BaseReloc [
+# BASEREL-NEXT: Entry {
+# BASEREL-NEXT: Type: ARM_MOV32(T)
+# BASEREL-NEXT: Address: 0x1000
+# BASEREL-NEXT: }
+# BASEREL-NEXT: Entry {
+# BASEREL-NEXT: Type: ARM_MOV32(T)
+# BASEREL-NEXT: Address: 0x100C
+# BASEREL-NEXT: }
+# BASEREL-NEXT: Entry {
+# BASEREL-NEXT: Type: ARM_MOV32(T)
+# BASEREL-NEXT: Address: 0x1018
+# BASEREL-NEXT: }
+# BASEREL-NEXT: Entry {
+# BASEREL-NEXT: Type: ARM_MOV32(T)
+# BASEREL-NEXT: Address: 0x102E
+# BASEREL-NEXT: }
+# BASEREL-NEXT: Entry {
+# BASEREL-NEXT: Type: HIGHLOW
+# BASEREL-NEXT: Address: 0x3008
+# BASEREL-NEXT: }
+# BASEREL-NEXT: Entry {
+# BASEREL-NEXT: Type: ABSOLUTE
+# BASEREL-NEXT: Address: 0x3000
+# BASEREL-NEXT: }
+# BASEREL-NEXT: ]
+#
+# DISASM: 401018: 43 f2 08 0c movw r12, #12296
+# DISASM-NEXT: 40101c: c0 f2 40 0c movt r12, #64
+# DISASM-NEXT: 401020: 2d e9 0f 48 push.w {r0, r1, r2, r3, r11, lr}
+# DISASM-NEXT: 401024: 0d f2 10 0b addw r11, sp, #16
+# DISASM-NEXT: 401028: 2d ed 10 0b vpush {d0, d1, d2, d3, d4, d5, d6, d7}
+# DISASM-NEXT: 40102c: 61 46 mov r1, r12
+# DISASM-NEXT: 40102e: 42 f2 00 00 movw r0, #8192
+# DISASM-NEXT: 401032: c0 f2 40 00 movt r0, #64
+# DISASM-NEXT: 401036: ff f7 e3 ff bl #-58
+# DISASM-NEXT: 40103a: 84 46 mov r12, r0
+# DISASM-NEXT: 40103c: bd ec 10 0b vpop {d0, d1, d2, d3, d4, d5, d6, d7}
+# DISASM-NEXT: 401040: bd e8 0f 48 pop.w {r0, r1, r2, r3, r11, lr}
+# DISASM-NEXT: 401044: 60 47 bx r12
+
+--- !COFF
+header:
+ Machine: IMAGE_FILE_MACHINE_ARMNT
+ Characteristics: [ ]
+sections:
+ - Name: .text
+ Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_PURGEABLE, IMAGE_SCN_MEM_16BIT, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+ Alignment: 4
+ SectionData: 40F20000C0F2000000680047
+ Relocations:
+ - VirtualAddress: 0
+ SymbolName: __imp_function
+ Type: IMAGE_REL_ARM_MOV32T
+symbols:
+ - Name: .text
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 12
+ NumberOfRelocations: 1
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 1
+ - Name: mainCRTStartup
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: __imp_function
+ Value: 0
+ SectionNumber: 0
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+...
diff --git a/test/COFF/delayimports32.test b/test/COFF/delayimports32.test
index 53aadbb6a185..006eecff4d95 100644
--- a/test/COFF/delayimports32.test
+++ b/test/COFF/delayimports32.test
@@ -73,7 +73,7 @@ BASEREL-NEXT: ]
DISASM: 202b: 68 20 10 40 00 pushl $4198432
DISASM-NEXT: 2030: 68 00 40 40 00 pushl $4210688
-DISASM-NEXT: 2035: e8 c6 ff ff ff calll -58 <_main@0>
+DISASM-NEXT: 2035: e8 c6 ff ff ff calll -58 <.text>
DISASM-NEXT: 203a: 5a popl %edx
DISASM-NEXT: 203b: 59 popl %ecx
DISASM-NEXT: 203c: ff e0 jmpl *%eax
@@ -81,7 +81,7 @@ DISASM-NEXT: 203e: 51 pushl %ecx
DISASM-NEXT: 203f: 52 pushl %edx
DISASM-NEXT: 2040: 68 24 10 40 00 pushl $4198436
DISASM-NEXT: 2045: 68 00 40 40 00 pushl $4210688
-DISASM-NEXT: 204a: e8 b1 ff ff ff calll -79 <_main@0>
+DISASM-NEXT: 204a: e8 b1 ff ff ff calll -79 <.text>
DISASM-NEXT: 204f: 5a popl %edx
DISASM-NEXT: 2050: 59 popl %ecx
DISASM-NEXT: 2051: ff e0 jmpl *%eax
diff --git a/test/COFF/dllexport-mingw.s b/test/COFF/dllexport-mingw.s
new file mode 100644
index 000000000000..8bf035b36dcf
--- /dev/null
+++ b/test/COFF/dllexport-mingw.s
@@ -0,0 +1,24 @@
+# REQEUIRES: x86
+
+# RUN: llvm-mc -triple=i686-windows-gnu %s -filetype=obj -o %t.obj
+
+# RUN: lld-link -lldmingw -dll -out:%t.dll -entry:main %t.obj -implib:%t.lib
+# RUN: llvm-readobj %t.lib | FileCheck %s
+
+# CHECK: Symbol: __imp___underscoredFunc
+# CHECK: Symbol: __underscoredFunc
+# CHECK: Symbol: __imp__func
+# CHECK: Symbol: _func
+
+.global _main
+.global _func
+.global __underscoredFunc
+.text
+_main:
+ ret
+_func:
+ ret
+__underscoredFunc:
+ ret
+.section .drectve
+.ascii "-export:func -export:_underscoredFunc"
diff --git a/test/COFF/driver.test b/test/COFF/driver.test
index 0832350a4f30..36de6c200cb1 100644
--- a/test/COFF/driver.test
+++ b/test/COFF/driver.test
@@ -1,3 +1,6 @@
# RUN: not lld-link nosuchfile.obj >& %t.log
# RUN: FileCheck -check-prefix=MISSING %s < %t.log
MISSING: nosuchfile.obj: {{[Nn]}}o such file or directory
+
+# RUN: lld-link --version | FileCheck -check-prefix=VERSION %s
+VERSION: {{LLD [0-9]+\.[0-9]+}}
diff --git a/test/COFF/duplicate.test b/test/COFF/duplicate.test
new file mode 100644
index 000000000000..c2f743ebc28f
--- /dev/null
+++ b/test/COFF/duplicate.test
@@ -0,0 +1,12 @@
+RUN: llc -mtriple x86_64-windows-msvc -filetype obj -o alpha.obj %S/Inputs/alpha.ll
+RUN: llc -mtriple x86_64-windows-msvc -filetype obj -o beta.obj %S/Inputs/beta.ll
+RUN: lld-link /out:alpha.dll /dll alpha.obj /implib:alpha.lib
+RUN: not lld-link /out:beta.dll /dll alpha.obj beta.obj alpha.lib 2>&1 | FileCheck %s -check-prefix CHECK-ALPHA
+
+CHECK-ALPHA: error: duplicate symbol: f in {{.*}}alpha.obj and in alpha.dll
+
+RUN: llc -mtriple x86_64-windows-msvc -filetype obj -o gamma.obj %S/Inputs/gamma.ll
+RUN: not lld-link /out:gamma.exe /subsystem:console /entry:mainCRTStartup gamma.obj alpha.lib 2>&1 | FileCheck %s -check-prefix CHECK-GAMMA
+
+CHECK-GAMMA: error: duplicate symbol: __imp_f in {{.*}}gamma.obj and in alpha.dll
+
diff --git a/test/COFF/entry-drectve.test b/test/COFF/entry-drectve.test
new file mode 100644
index 000000000000..e51e7cb201f3
--- /dev/null
+++ b/test/COFF/entry-drectve.test
@@ -0,0 +1,24 @@
+# RUN: yaml2obj < %s > %t.obj
+# RUN: lld-link /subsystem:console /out:%t.exe %t.obj
+
+--- !COFF
+header:
+ Machine: IMAGE_FILE_MACHINE_I386
+ Characteristics: []
+sections:
+ - Name: .text
+ Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+ Alignment: 4
+ SectionData: B800000000506800000000680000000050E80000000050E800000000
+ - Name: .drectve
+ Characteristics: [ IMAGE_SCN_LNK_INFO, IMAGE_SCN_LNK_REMOVE ]
+ Alignment: 1
+ SectionData: 2f656e7472793a437573746f6d456e74727900 # /entry:CustomEntry
+symbols:
+ - Name: _CustomEntry
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+...
diff --git a/test/COFF/entry-inference.test b/test/COFF/entry-inference.test
index 2eb9a6863983..294870bf4185 100644
--- a/test/COFF/entry-inference.test
+++ b/test/COFF/entry-inference.test
@@ -14,10 +14,10 @@
# RUN: not lld-link /out:%t.exe %t.obj > %t.log 2>&1
# RUN: FileCheck -check-prefix=WWINMAIN %s < %t.log
-# MAIN: <root>: undefined symbol: mainCRTStartup
-# WMAIN: <root>: undefined symbol: wmainCRTStartup
-# WINMAIN: <root>: undefined symbol: WinMainCRTStartup
-# WWINMAIN: <root>: undefined symbol: wWinMainCRTStartup
+# MAIN: error: <root>: undefined symbol: mainCRTStartup
+# WMAIN: error: <root>: undefined symbol: wmainCRTStartup
+# WINMAIN: error: <root>: undefined symbol: WinMainCRTStartup
+# WWINMAIN: error: <root>: undefined symbol: wWinMainCRTStartup
--- !COFF
header:
diff --git a/test/COFF/export-all.s b/test/COFF/export-all.s
new file mode 100644
index 000000000000..96c7dca5df29
--- /dev/null
+++ b/test/COFF/export-all.s
@@ -0,0 +1,86 @@
+# REQEUIRES: x86
+
+# RUN: llvm-mc -triple=i686-windows-gnu %s -filetype=obj -o %t.obj
+
+# RUN: lld-link -lldmingw -dll -out:%t.dll -entry:DllMainCRTStartup@12 %t.obj -implib:%t.lib
+# RUN: llvm-readobj -coff-exports %t.dll | FileCheck %s
+# RUN: llvm-readobj %t.lib | FileCheck -check-prefix=IMPLIB %s
+
+# CHECK-NOT: Name: DllMainCRTStartup
+# CHECK-NOT: Name: _imp__unexported
+# CHECK: Name: dataSym
+# CHECK: Name: foobar
+# CHECK-NOT: Name: unexported
+
+# IMPLIB: Symbol: __imp__dataSym
+# IMPLIB-NOT: Symbol: _dataSym
+# IMPLIB: Symbol: __imp__foobar
+# IMPLIB: Symbol: _foobar
+
+.global _foobar
+.global _DllMainCRTStartup@12
+.global _dataSym
+.global _unexported
+.global __imp__unexported
+.text
+_DllMainCRTStartup@12:
+ ret
+_foobar:
+ ret
+_unexported:
+ ret
+.data
+_dataSym:
+ .int 4
+__imp__unexported:
+ .int _unexported
+
+# Test specifying -export-all-symbols, on an object file that contains
+# dllexport directive for some of the symbols.
+
+# RUN: yaml2obj < %p/Inputs/export.yaml > %t.obj
+#
+# RUN: lld-link -out:%t.dll -dll %t.obj -lldmingw -export-all-symbols -output-def:%t.def
+# RUN: llvm-readobj -coff-exports %t.dll | FileCheck -check-prefix=CHECK2 %s
+# RUN: cat %t.def | FileCheck -check-prefix=CHECK2-DEF %s
+
+# Note, this will actually export _DllMainCRTStartup as well, since
+# it uses the standard spelling in this object file, not the MinGW one.
+
+# CHECK2: Name: exportfn1
+# CHECK2: Name: exportfn2
+# CHECK2: Name: exportfn3
+
+# CHECK2-DEF: EXPORTS
+# CHECK2-DEF: exportfn1 @3
+# CHECK2-DEF: exportfn2 @4
+# CHECK2-DEF: exportfn3 @5
+
+# Test ignoring certain object files and libs.
+
+# RUN: echo -e ".global foobar\n.global DllMainCRTStartup\n.text\nDllMainCRTStartup:\nret\nfoobar:\ncall mingwfunc\ncall crtfunc\nret\n" > %t.main.s
+# RUN: llvm-mc -triple=x86_64-windows-gnu %t.main.s -filetype=obj -o %t.main.obj
+# RUN: mkdir -p %T/libs
+# RUN: echo -e ".global mingwfunc\n.text\nmingwfunc:\nret\n" > %T/libs/mingwfunc.s
+# RUN: llvm-mc -triple=x86_64-windows-gnu %T/libs/mingwfunc.s -filetype=obj -o %T/libs/mingwfunc.o
+# RUN: llvm-ar rcs %T/libs/libmingwex.a %T/libs/mingwfunc.o
+# RUN: echo -e ".global crtfunc\n.text\ncrtfunc:\nret\n" > %T/libs/crtfunc.s
+# RUN: llvm-mc -triple=x86_64-windows-gnu %T/libs/crtfunc.s -filetype=obj -o %T/libs/crt2.o
+# RUN: lld-link -out:%t.dll -dll -entry:DllMainCRTStartup %t.main.obj -lldmingw %T/libs/crt2.o %T/libs/libmingwex.a -output-def:%t.def
+# RUN: echo "EOF" >> %t.def
+# RUN: cat %t.def | FileCheck -check-prefix=CHECK-EXCLUDE %s
+
+# CHECK-EXCLUDE: EXPORTS
+# CHECK-EXCLUDE-NEXT: foobar @1
+# CHECK-EXCLUDE-NEXT: EOF
+
+# Test that we handle import libraries together with -opt:noref.
+
+# RUN: yaml2obj < %p/Inputs/hello32.yaml > %t.obj
+# RUN: lld-link -lldmingw -dll -out:%t.dll -entry:main@0 %t.obj -implib:%t.lib -opt:noref %p/Inputs/std32.lib -output-def:%t.def
+# RUN: echo "EOF" >> %t.def
+# RUN: cat %t.def | FileCheck -check-prefix=CHECK-IMPLIB %s
+
+# CHECK-IMPLIB: EXPORTS
+# CHECK-IMPLIB-NEXT: main@0 @1
+# CHECK-IMPLIB-NEXT: EOF
diff --git a/test/COFF/export-arm64.yaml b/test/COFF/export-arm64.yaml
new file mode 100644
index 000000000000..ad9a96db4100
--- /dev/null
+++ b/test/COFF/export-arm64.yaml
@@ -0,0 +1,70 @@
+# REQUIRES: aarch64
+
+# RUN: yaml2obj < %s > %t.obj
+# RUN: lld-link /out:%t.dll /dll %t.obj /export:exportfn1 /export:exportfn2 /implib:%t.lib
+# RUN: llvm-objdump -p %t.dll | FileCheck %s
+# RUN: llvm-objdump -r %t.lib | FileCheck %s -check-prefix=RELOCS
+
+# CHECK: Export Table:
+# CHECK: DLL name: export-arm64.yaml.tmp.dll
+# CHECK: Ordinal RVA Name
+# CHECK-NEXT: 0 0
+# CHECK-NEXT: 1 0x1008 exportfn1
+# CHECK-NEXT: 2 0x1010 exportfn2
+# CHECK-NEXT: 3 0x1018 exportfn3
+
+# RELOCS: IMAGE_REL_ARM64_ADDR32NB .idata$6
+# RELOCS: IMAGE_REL_ARM64_ADDR32NB .idata$4
+# RELOCS: IMAGE_REL_ARM64_ADDR32NB .idata$5
+
+--- !COFF
+header:
+ Machine: IMAGE_FILE_MACHINE_ARM64
+ Characteristics: []
+sections:
+ - Name: .text
+ Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_PURGEABLE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+ Alignment: 4
+ SectionData: e0031f2ac0035fd6e0031f2ac0035fd6e0031f2ac0035fd6e0031f2ac0035fd6
+ - Name: .drectve
+ Characteristics: [ IMAGE_SCN_LNK_INFO, IMAGE_SCN_LNK_REMOVE ]
+ Alignment: 1
+ SectionData: 2f6578706f72743a6578706f7274666e3300 # /export:exportfn3
+symbols:
+ - Name: .text
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 32
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 1
+ - Name: _DllMainCRTStartup
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: exportfn1
+ Value: 8
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: exportfn2
+ Value: 16
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: exportfn3
+ Value: 24
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+...
diff --git a/test/COFF/export-armnt.yaml b/test/COFF/export-armnt.yaml
new file mode 100644
index 000000000000..461d5a033fe2
--- /dev/null
+++ b/test/COFF/export-armnt.yaml
@@ -0,0 +1,72 @@
+# REQUIRES: arm
+
+# RUN: yaml2obj < %s > %t.obj
+#
+# RUN: lld-link /out:%t.dll /dll %t.obj /export:exportfn1 /export:exportfn2
+# RUN: llvm-objdump -p %t.dll | FileCheck %s
+
+# CHECK: Export Table:
+# CHECK: DLL name: export-armnt.yaml.tmp.dll
+# CHECK: Ordinal RVA Name
+# CHECK-NEXT: 0 0
+# CHECK-NEXT: 1 0x1005 exportfn1
+# CHECK-NEXT: 2 0x1009 exportfn2
+# CHECK-NEXT: 3 0x1009 exportfn3
+
+--- !COFF
+header:
+ Machine: IMAGE_FILE_MACHINE_ARMNT
+ Characteristics: []
+sections:
+ - Name: .text
+ Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+ Alignment: 4
+ SectionData: 704700bf704700bf704700bf
+ - Name: .drectve
+ Characteristics: [ IMAGE_SCN_LNK_INFO, IMAGE_SCN_LNK_REMOVE ]
+ Alignment: 1
+ SectionData: 2f6578706f72743a6578706f7274666e3300 # /export:exportfn3
+symbols:
+ - Name: .text
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 12
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 0
+ - Name: _DllMainCRTStartup
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: exportfn1
+ Value: 4
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: exportfn2
+ Value: 8
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: exportfn3
+ Value: 8
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: '?mangled@@YAHXZ'
+ Value: 8
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+...
diff --git a/test/COFF/export32.test b/test/COFF/export32.test
index 83de18b11624..34cd1a73319e 100644
--- a/test/COFF/export32.test
+++ b/test/COFF/export32.test
@@ -57,6 +57,11 @@
# RUN: lld-link /out:%t.dll /dll %t.obj /def:%t.def
# RUN: llvm-objdump -p %t.dll | FileCheck -check-prefix=CHECK5 %s
+# RUN: echo "EXPORTS exportfn1 @ 3" > %t.def
+# RUN: echo "fn2=exportfn2 @ 2" >> %t.def
+# RUN: lld-link /out:%t.dll /dll %t.obj /def:%t.def
+# RUN: llvm-objdump -p %t.dll | FileCheck -check-prefix=CHECK5 %s
+
# CHECK5: Export Table:
# CHECK5: DLL name: export32.test.tmp.dll
# CHECK5: Ordinal RVA Name
diff --git a/test/COFF/filename-casing.s b/test/COFF/filename-casing.s
new file mode 100644
index 000000000000..e210aea9358a
--- /dev/null
+++ b/test/COFF/filename-casing.s
@@ -0,0 +1,14 @@
+# REQUIRES: x86
+
+# RUN: llvm-mc -filetype=obj -triple=x86_64-windows-msvc -o %T/MixedCase.obj %s
+# RUN: not lld-link /entry:main %T/MixedCase.obj 2>&1 | FileCheck -check-prefix=OBJECT %s
+
+# RUN: llvm-lib /out:%T/MixedCase.lib %T/MixedCase.obj
+# RUN: not lld-link /machine:x64 /entry:main %T/MixedCase.lib 2>&1 | FileCheck -check-prefix=ARCHIVE %s
+
+# OBJECT: MixedCase.obj: undefined symbol: f
+# ARCHIVE: MixedCase.lib(MixedCase.obj): undefined symbol: f
+
+.globl main
+main:
+ callq f
diff --git a/test/COFF/force.test b/test/COFF/force.test
index 80bd275558f6..b96c1f84cd44 100644
--- a/test/COFF/force.test
+++ b/test/COFF/force.test
@@ -1,10 +1,11 @@
# RUN: yaml2obj < %s > %t.obj
# RUN: not lld-link /out:%t.exe /entry:main %t.obj >& %t.log
-# RUN: FileCheck %s < %t.log
+# RUN: FileCheck -check-prefix=ERROR %s < %t.log
# RUN: lld-link /out:%t.exe /entry:main %t.obj /force >& %t.log
-# RUN: FileCheck %s < %t.log
+# RUN: FileCheck -check-prefix=WARN %s < %t.log
-# CHECK: .obj: undefined symbol: foo
+# ERROR: error: {{.*}}.obj: undefined symbol: foo
+# WARN: warning: {{.*}}.obj: undefined symbol: foo
--- !COFF
header:
diff --git a/test/COFF/guardcf.test b/test/COFF/guardcf.test
index 4f99d705301c..57dca5870d0f 100644
--- a/test/COFF/guardcf.test
+++ b/test/COFF/guardcf.test
@@ -71,4 +71,10 @@ symbols:
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: __enclave_config
+ Value: 0
+ SectionNumber: 0
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
...
diff --git a/test/COFF/hello32.test b/test/COFF/hello32.test
index e987bb953890..2399193da6a1 100644
--- a/test/COFF/hello32.test
+++ b/test/COFF/hello32.test
@@ -39,13 +39,13 @@ HEADER-NEXT: MajorImageVersion: 0
HEADER-NEXT: MinorImageVersion: 0
HEADER-NEXT: MajorSubsystemVersion: 6
HEADER-NEXT: MinorSubsystemVersion: 0
-HEADER-NEXT: SizeOfImage: 16896
+HEADER-NEXT: SizeOfImage: 20480
HEADER-NEXT: SizeOfHeaders: 512
HEADER-NEXT: Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI (0x3)
-HEADER-NEXT: Characteristics [ (0x9940)
+HEADER-NEXT: Characteristics [ (0x9540)
HEADER-NEXT: IMAGE_DLL_CHARACTERISTICS_APPCONTAINER (0x1000)
HEADER-NEXT: IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE (0x40)
-HEADER-NEXT: IMAGE_DLL_CHARACTERISTICS_NO_BIND (0x800)
+HEADER-NEXT: IMAGE_DLL_CHARACTERISTICS_NO_SEH (0x400)
HEADER-NEXT: IMAGE_DLL_CHARACTERISTICS_NX_COMPAT (0x100)
HEADER-NEXT: IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE (0x8000)
HEADER-NEXT: ]
diff --git a/test/COFF/icf-associative.test b/test/COFF/icf-associative.test
index bfaeabb4d41a..3b2aa5de41b1 100644
--- a/test/COFF/icf-associative.test
+++ b/test/COFF/icf-associative.test
@@ -1,5 +1,5 @@
# RUN: yaml2obj < %s > %t.obj
-# RUN: lld-link /entry:foo /out:%t.exe /subsystem:console /include:bar \
+# RUN: lld-link /opt:icf /entry:foo /out:%t.exe /subsystem:console /include:bar \
# RUN: /debug /verbose %t.obj > %t.log 2>&1
# RUN: FileCheck %s < %t.log
diff --git a/test/COFF/icf-executable.s b/test/COFF/icf-executable.s
new file mode 100644
index 000000000000..7f923d25ca45
--- /dev/null
+++ b/test/COFF/icf-executable.s
@@ -0,0 +1,18 @@
+# RUN: llvm-mc -triple=x86_64-windows-msvc %s -filetype=obj -o %t.obj
+# RUN: lld-link -entry:main %t.obj -out:%t.exe -verbose 2>&1 | FileCheck %s
+
+# CHECK: Selected internal
+# CHECK: Removed f2
+
+.section .text,"xr",one_only,internal
+internal:
+.globl main
+main:
+call f2
+ret
+
+.section .text,"xr",one_only,f2
+.globl f2
+f2:
+call main
+ret
diff --git a/test/COFF/icf-simple.test b/test/COFF/icf-simple.test
index c302c8796a95..ead7e7679ce6 100644
--- a/test/COFF/icf-simple.test
+++ b/test/COFF/icf-simple.test
@@ -1,5 +1,5 @@
# RUN: yaml2obj < %s > %t.obj
-# RUN: lld-link /entry:foo /out:%t.exe /subsystem:console /include:bar \
+# RUN: lld-link /opt:icf /entry:foo /out:%t.exe /subsystem:console /include:bar \
# RUN: /verbose %t.obj > %t.log 2>&1
# RUN: FileCheck -check-prefix=ICF %s < %t.log
@@ -13,6 +13,31 @@
# RUN: /verbose /opt:noref,noicf %t.obj > %t.log 2>&1
# RUN: FileCheck -check-prefix=NOICF %s < %t.log
+# ICF is on by default (no /opt: flags).
+# RUN: lld-link /entry:foo /out:%t.exe /subsystem:console \
+# RUN: /include:bar /verbose %t.obj > %t.log 2>&1
+# RUN: FileCheck -check-prefix=ICF %s < %t.log
+
+# /debug disables ICF.
+# RUN: lld-link /debug /entry:foo /out:%t.exe /subsystem:console \
+# RUN: /include:bar /verbose %t.obj > %t.log 2>&1
+# RUN: FileCheck -check-prefix=NOICF %s < %t.log
+
+# /opt:noref disables ICF.
+# RUN: lld-link /opt:noref /entry:foo /out:%t.exe /subsystem:console \
+# RUN: /include:bar /verbose %t.obj > %t.log 2>&1
+# RUN: FileCheck -check-prefix=NOICF %s < %t.log
+
+# /debug /opt:ref enables ICF.
+# RUN: lld-link /debug /opt:ref /entry:foo /out:%t.exe /subsystem:console \
+# RUN: /include:bar /verbose %t.obj > %t.log 2>&1
+# RUN: FileCheck -check-prefix=ICF %s < %t.log
+
+# /debug /opt:noicf,ref disables ICF.
+# RUN: lld-link /debug /opt:noicf,ref /entry:foo /out:%t.exe /subsystem:console \
+# RUN: /include:bar /verbose %t.obj > %t.log 2>&1
+# RUN: FileCheck -check-prefix=NOICF %s < %t.log
+
# NOICF-NOT: Removed foo
# NOICF-NOT: Removed bar
diff --git a/test/COFF/icf-xdata.s b/test/COFF/icf-xdata.s
new file mode 100644
index 000000000000..8fb4bad057bd
--- /dev/null
+++ b/test/COFF/icf-xdata.s
@@ -0,0 +1,86 @@
+# RUN: llvm-mc %s -triple x86_64-windows-msvc -filetype=obj -o %t.obj
+# RUN: lld-link %t.obj -dll -noentry -out:%t.dll
+# RUN: llvm-readobj -sections %t.dll | FileCheck %s
+
+# There shouldn't be much xdata, because all three .pdata entries (12 bytes
+# each) should use the same .xdata unwind info.
+# CHECK: Name: .pdata
+# CHECK-NEXT: VirtualSize: 0x24
+# CHECK: Name: .xdata
+# CHECK-NEXT: VirtualSize: 0x8
+
+ .text
+callee:
+ ret
+
+ .def xdata1;
+ .scl 2;
+ .type 32;
+ .endef
+ .section .text,"xr",one_only,xdata1
+ .globl xdata1 # -- Begin function xdata1
+ .p2align 4, 0x90
+xdata1: # @xdata1
+.seh_proc xdata1
+# BB#0: # %entry
+ subq $40, %rsp
+ .seh_stackalloc 40
+ .seh_endprologue
+ callq callee
+ nop
+ addq $40, %rsp
+ jmp callee # TAILCALL
+ .seh_handlerdata
+ .section .text,"xr",one_only,xdata1
+ .seh_endproc
+ # -- End function
+ .def xdata2;
+ .scl 2;
+ .type 32;
+ .endef
+ .section .text,"xr",one_only,xdata2
+ .globl xdata2 # -- Begin function xdata2
+ .p2align 4, 0x90
+xdata2: # @xdata2
+.seh_proc xdata2
+# BB#0: # %entry
+ subq $40, %rsp
+ .seh_stackalloc 40
+ .seh_endprologue
+ callq callee
+ callq callee
+ nop
+ addq $40, %rsp
+ jmp callee # TAILCALL
+ .seh_handlerdata
+ .section .text,"xr",one_only,xdata2
+ .seh_endproc
+ # -- End function
+ .def xdata3;
+ .scl 2;
+ .type 32;
+ .endef
+ .section .text,"xr",one_only,xdata3
+ .globl xdata3 # -- Begin function xdata3
+ .p2align 4, 0x90
+xdata3: # @xdata3
+.seh_proc xdata3
+# BB#0: # %entry
+ subq $40, %rsp
+ .seh_stackalloc 40
+ .seh_endprologue
+ callq callee
+ callq callee
+ callq callee
+ nop
+ addq $40, %rsp
+ jmp callee # TAILCALL
+ .seh_handlerdata
+ .section .text,"xr",one_only,xdata3
+ .seh_endproc
+ # -- End function
+ .section .drectve,"yn"
+ .ascii " -export:xdata1"
+ .ascii " -export:xdata2"
+ .ascii " -export:xdata3"
+
diff --git a/test/COFF/include.test b/test/COFF/include.test
index e7b0c58d5a19..e7e9095cff8b 100644
--- a/test/COFF/include.test
+++ b/test/COFF/include.test
@@ -62,6 +62,19 @@ symbols:
CheckSum: 0
Number: 0
Selection: IMAGE_COMDAT_SELECT_ANY
+ - Name: '.text$mn'
+ Value: 0
+ SectionNumber: 3
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 6
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 0
+ Selection: IMAGE_COMDAT_SELECT_ANY
- Name: main
Value: 0
SectionNumber: 1
diff --git a/test/COFF/libpath.test b/test/COFF/libpath.test
index da465bc556bc..77b4c546c992 100644
--- a/test/COFF/libpath.test
+++ b/test/COFF/libpath.test
@@ -5,14 +5,22 @@
# RUN: env LIB=%t/a lld-link /out:%t.exe /entry:main /verbose \
# RUN: std64.lib /subsystem:console %p/Inputs/hello64.obj \
-# RUN: /libpath:%t/b /libpath:%t/c > %t.log
+# RUN: /libpath:%t/b /libpath:%t/c 2> %t.log
# RUN: FileCheck -check-prefix=CHECK1 %s < %t.log
CHECK1: b{{[/\\]}}std64.lib
# RUN: lld-link /out:%t.exe /entry:main /verbose \
# RUN: std64.lib /subsystem:console %p/Inputs/hello64.obj \
-# RUN: /libpath:%t/a /libpath:%t/b /libpath:%t/c > %t.log
+# RUN: /libpath:%t/a /libpath:%t/b /libpath:%t/c 2> %t.log
# RUN: FileCheck -check-prefix=CHECK2 %s < %t.log
CHECK2: a{{[/\\]}}std64.lib
+
+# RUN: lld-link /out:%t.exe /entry:main /verbose \
+# RUN: %t/a/std64.lib /subsystem:console %p/Inputs/hello64.obj \
+# RUN: /libpath:%t/b /verbose > %t.log 2>&1
+# RUN: FileCheck -check-prefix=CHECK3 %s < %t.log
+
+CHECK3: Reading {{.*}}a/std64.lib
+CHECK3-NOT: Reading {{.*}}b/std64.lib
diff --git a/test/COFF/linkrepro-manifest.test b/test/COFF/linkrepro-manifest.test
new file mode 100644
index 000000000000..a938ab590b2e
--- /dev/null
+++ b/test/COFF/linkrepro-manifest.test
@@ -0,0 +1,12 @@
+REQUIRES: x86, gnutar, manifest_tool
+
+RUN: rm -rf %t && mkdir %t && cd %t
+RUN: lld-link -entry:__ImageBase -nodefaultlib -linkrepro:%t -manifest:embed %p/Inputs/std32.lib -subsystem:console
+RUN: tar tf repro.tar | FileCheck --check-prefix=LIST %s
+RUN: tar xOf repro.tar repro/response.txt | FileCheck %s
+
+LIST: manifest.res
+
+CHECK-NOT: -manifest:
+CHECK: .manifest.res
+CHECK-NOT: -manifest:
diff --git a/test/COFF/linkrepro-pdb.test b/test/COFF/linkrepro-pdb.test
new file mode 100644
index 000000000000..33aa0bc4a90e
--- /dev/null
+++ b/test/COFF/linkrepro-pdb.test
@@ -0,0 +1,9 @@
+REQUIRES: x86, gnutar
+
+RUN: rm -rf %t && mkdir -p %t && cd %t
+RUN: yaml2obj %S/Inputs/pdb-type-server-simple-a.yaml -o a.obj
+RUN: yaml2obj %S/Inputs/pdb-type-server-simple-b.yaml -o b.obj
+RUN: llvm-pdbutil yaml2pdb %S/Inputs/pdb-type-server-simple-ts.yaml -pdb ts.pdb
+RUN: lld-link a.obj b.obj -entry:main -debug -out:t.exe -pdb:t.pdb -nodefaultlib -linkrepro:.
+RUN: tar xOf repro.tar repro/%:t/ts.pdb > repro-ts.pdb
+RUN: diff ts.pdb repro-ts.pdb
diff --git a/test/COFF/linkrepro-res.test b/test/COFF/linkrepro-res.test
new file mode 100644
index 000000000000..cf0aa1636ce2
--- /dev/null
+++ b/test/COFF/linkrepro-res.test
@@ -0,0 +1,12 @@
+# REQUIRES: x86, shell
+
+# RUN: rm -rf %t.dir
+# RUN: mkdir -p %t.dir/build
+# RUN: cd %t.dir/build
+# RUN: lld-link %p/Inputs/resource.res /subsystem:console /machine:x64 \
+# RUN: /entry:__ImageBase /linkrepro:. /out:%t.exe
+# RUN: tar xf repro.tar
+# RUN: diff %p/Inputs/resource.res repro/%:p/Inputs/resource.res
+# RUN: FileCheck %s --check-prefix=RSP < repro/response.txt
+
+# RSP: resource.res
diff --git a/test/COFF/loadcfg.test b/test/COFF/loadcfg.test
index b74917f15707..072ee6b1edb8 100644
--- a/test/COFF/loadcfg.test
+++ b/test/COFF/loadcfg.test
@@ -14,10 +14,6 @@ sections:
Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
Alignment: 4
SectionData: B82A000000C3
- - Name: .text
- Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
- Alignment: 4
- SectionData: B82A000000C3
- Name: .rdata
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
Alignment: 16
@@ -35,19 +31,6 @@ symbols:
NumberOfLinenumbers: 0
CheckSum: 0
Number: 0
- - Name: .text
- Value: 0
- SectionNumber: 2
- SimpleType: IMAGE_SYM_TYPE_NULL
- ComplexType: IMAGE_SYM_DTYPE_NULL
- StorageClass: IMAGE_SYM_CLASS_STATIC
- SectionDefinition:
- Length: 6
- NumberOfRelocations: 0
- NumberOfLinenumbers: 0
- CheckSum: 0
- Number: 0
- Selection: IMAGE_COMDAT_SELECT_ANY
- Name: main
Value: 0
SectionNumber: 1
@@ -56,7 +39,7 @@ symbols:
StorageClass: IMAGE_SYM_CLASS_EXTERNAL
- Name: .rdata
Value: 0
- SectionNumber: 3
+ SectionNumber: 2
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_STATIC
@@ -68,7 +51,7 @@ symbols:
Number: 3
- Name: _load_config_used
Value: 0
- SectionNumber: 3
+ SectionNumber: 2
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_EXTERNAL
diff --git a/test/COFF/locally-imported-arm64.test b/test/COFF/locally-imported-arm64.test
new file mode 100644
index 000000000000..35200ffc1e8d
--- /dev/null
+++ b/test/COFF/locally-imported-arm64.test
@@ -0,0 +1,61 @@
+# RUN: yaml2obj < %s > %t.obj
+# RUN: lld-link /out:%t.exe /entry:main %t.obj
+# RUN: llvm-objdump -s %t.exe | FileCheck %s
+# RUN: llvm-readobj -coff-basereloc %t.exe | FileCheck -check-prefix=BASEREL %s
+
+# CHECK: Contents of section .text:
+# CHECK-NEXT: 1000 00200000
+# CHECK: Contents of section .rdata:
+# CHECK-NEXT: 2000 04100040 01000000
+
+# BASEREL: BaseReloc [
+# BASEREL-NEXT: Entry {
+# BASEREL-NEXT: Type: DIR64
+# BASEREL-NEXT: Address: 0x2000
+# BASEREL-NEXT: }
+# BASEREL-NEXT: Entry {
+# BASEREL-NEXT: Type: ABSOLUTE
+# BASEREL-NEXT: Address: 0x2000
+# BASEREL-NEXT: }
+# BASEREL-NEXT: ]
+
+--- !COFF
+header:
+ Machine: IMAGE_FILE_MACHINE_ARM64
+ Characteristics: []
+sections:
+ - Name: .text
+ Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+ Alignment: 4
+ SectionData: 00000000
+ Relocations:
+ - VirtualAddress: 0
+ SymbolName: __imp_main
+ Type: IMAGE_REL_ARM64_ADDR32NB
+symbols:
+ - Name: .text
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 4
+ NumberOfRelocations: 1
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 0
+ Selection: IMAGE_COMDAT_SELECT_ANY
+ - Name: main
+ Value: 4
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: __imp_main
+ Value: 0
+ SectionNumber: 0
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+...
diff --git a/test/COFF/locally-imported-warn-multiple.s b/test/COFF/locally-imported-warn-multiple.s
new file mode 100644
index 000000000000..247ec58b0fdb
--- /dev/null
+++ b/test/COFF/locally-imported-warn-multiple.s
@@ -0,0 +1,14 @@
+# REQUIRES: x86
+
+# RUN: llvm-mc -filetype=obj -triple=x86_64-windows-msvc -o %T/locally-imported-def.obj %S/Inputs/locally-imported-def.s
+# RUN: llvm-mc -filetype=obj -triple=x86_64-windows-msvc -o %T/locally-imported-imp1.obj %S/Inputs/locally-imported-imp.s
+# RUN: llvm-mc -filetype=obj -triple=x86_64-windows-msvc -o %T/locally-imported-imp2.obj %S/Inputs/locally-imported-imp.s
+# RUN: llvm-mc -filetype=obj -triple=x86_64-windows-msvc -o %t.obj %s
+# RUN: lld-link /entry:main %T/locally-imported-def.obj %T/locally-imported-imp1.obj %T/locally-imported-imp2.obj %t.obj 2>&1 | FileCheck %s
+
+# CHECK: warning: [[TESTDIR:.+]]locally-imported-imp1.obj: locally defined symbol imported: f (defined in [[TESTDIR]]locally-imported-def.obj)
+# CHECK-NEXT: warning: [[TESTDIR:.+]]locally-imported-imp2.obj: locally defined symbol imported: f (defined in [[TESTDIR]]locally-imported-def.obj)
+
+.globl main
+main:
+ ret
diff --git a/test/COFF/locally-imported.test b/test/COFF/locally-imported.test
index a10da4b11bcb..b269cecf00b7 100644
--- a/test/COFF/locally-imported.test
+++ b/test/COFF/locally-imported.test
@@ -1,8 +1,10 @@
# RUN: yaml2obj < %s > %t.obj
-# RUN: lld-link /out:%t.exe /entry:main %t.obj
+# RUN: lld-link /out:%t.exe /entry:main %t.obj 2>&1 | FileCheck -check-prefix=WARN %s
# RUN: llvm-objdump -s %t.exe | FileCheck %s
# RUN: llvm-readobj -coff-basereloc %t.exe | FileCheck -check-prefix=BASEREL %s
+# WARN: warning: [[INPUT:.+]]: locally defined symbol imported: main (defined in [[INPUT]])
+
# CHECK: Contents of section .text:
# CHECK-NEXT: 1000 00200000
# CHECK: Contents of section .rdata:
diff --git a/test/COFF/long-section-name.test b/test/COFF/long-section-name.test
index 1de329db0296..bad7876c888f 100644
--- a/test/COFF/long-section-name.test
+++ b/test/COFF/long-section-name.test
@@ -1,7 +1,10 @@
# RUN: yaml2obj < %s > %t.obj
-# RUN: lld-link /debug /out:%t.exe /entry:main %t.obj
+# RUN: lld-link /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -sections %t.exe | FileCheck %s
+# RUN: lld-link /debug /out:%t2.exe /entry:main %t.obj
+# RUN: llvm-readobj -sections %t2.exe | FileCheck %s
+# CHECK: Name: .eh_fram (
# CHECK: Name: .data_long_section_name
# CHECK: Name: .text_long_section_name
@@ -11,10 +14,14 @@ header:
Characteristics: [ ]
sections:
- Name: .text_long_section_name
- Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+ Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_DISCARDABLE ]
Alignment: 4
SectionData: B82A000000C3
- Name: .data_long_section_name
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE, IMAGE_SCN_MEM_DISCARDABLE ]
+ Alignment: 4
+ SectionData: "00"
+ - Name: .eh_frame
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
Alignment: 4
SectionData: "00"
@@ -49,6 +56,18 @@ symbols:
NumberOfLinenumbers: 0
CheckSum: 0
Number: 0
+ - Name: .eh_frame
+ Value: 0
+ SectionNumber: 3
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 0
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 0
- Name: main
Value: 0
SectionNumber: 1
diff --git a/test/COFF/lto-cache.ll b/test/COFF/lto-cache.ll
new file mode 100644
index 000000000000..ad1a3b71f19a
--- /dev/null
+++ b/test/COFF/lto-cache.ll
@@ -0,0 +1,21 @@
+; REQUIRES: x86
+
+; RUN: opt -module-hash -module-summary %s -o %t.o
+; RUN: opt -module-hash -module-summary %p/Inputs/lto-cache.ll -o %t2.o
+
+; RUN: rm -Rf %t.cache && mkdir %t.cache
+; Create two files that would be removed by cache pruning due to age.
+; We should only remove files matching the pattern "llvmcache-*".
+; RUN: touch -t 197001011200 %t.cache/llvmcache-foo %t.cache/foo
+; RUN: lld-link /lldltocache:%t.cache /lldltocachepolicy:prune_after=1h /out:%t3 /entry:main %t2.o %t.o
+
+; Two cached objects, plus a timestamp file and "foo", minus the file we removed.
+; RUN: ls %t.cache | count 4
+
+target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-pc-windows-msvc"
+
+define void @globalfunc() #0 {
+entry:
+ ret void
+}
diff --git a/test/COFF/lto-opt-level.ll b/test/COFF/lto-opt-level.ll
index 674b6cc0f934..cacd0637731a 100644
--- a/test/COFF/lto-opt-level.ll
+++ b/test/COFF/lto-opt-level.ll
@@ -1,10 +1,10 @@
; RUN: llvm-as -o %t.obj %s
-; RUN: lld-link /out:%t0.exe /entry:main /subsystem:console /opt:lldlto=0 /debug %t.obj
-; RUN: llvm-nm %t0.exe | FileCheck --check-prefix=CHECK-O0 %s
-; RUN: lld-link /out:%t2.exe /entry:main /subsystem:console /opt:lldlto=2 /debug %t.obj
-; RUN: llvm-nm %t2.exe | FileCheck --check-prefix=CHECK-O2 %s
-; RUN: lld-link /out:%t2a.exe /entry:main /subsystem:console /debug %t.obj
-; RUN: llvm-nm %t2a.exe | FileCheck --check-prefix=CHECK-O2 %s
+; RUN: lld-link /out:%t0.exe /entry:main /subsystem:console /opt:lldlto=0 /lldmap:%t0.map %t.obj
+; RUN: FileCheck --check-prefix=CHECK-O0 %s < %t0.map
+; RUN: lld-link /out:%t2.exe /entry:main /subsystem:console /opt:lldlto=2 /lldmap:%t2.map %t.obj
+; RUN: FileCheck --check-prefix=CHECK-O2 %s < %t2.map
+; RUN: lld-link /out:%t2a.exe /entry:main /subsystem:console /lldmap:%t2a.map %t.obj
+; RUN: FileCheck --check-prefix=CHECK-O2 %s < %t2a.map
target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-windows-msvc"
diff --git a/test/COFF/lto-reloc-model.ll b/test/COFF/lto-reloc-model.ll
new file mode 100644
index 000000000000..bea19e9ce3e9
--- /dev/null
+++ b/test/COFF/lto-reloc-model.ll
@@ -0,0 +1,19 @@
+; RUN: llvm-as -o %t %s
+; RUN: lld-link /entry:main /subsystem:console /out:%t.exe %t
+; RUN: llvm-objdump -d %t.exe | FileCheck %s
+
+target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
+target triple = "i686-pc-windows-msvc"
+
+@foo = thread_local global i8 0
+
+module asm "__tls_index = 1"
+module asm "__tls_array = 2"
+
+define i8* @main() {
+ ; CHECK: movl 1, %eax
+ ; CHECK: movl %fs:2, %ecx
+ ; CHECK: movl (%ecx,%eax,4), %eax
+ ; CHECK: leal (%eax), %eax
+ ret i8* @foo
+}
diff --git a/test/COFF/manifest.test b/test/COFF/manifest.test
index accec48d6866..31587b43e2e9 100644
--- a/test/COFF/manifest.test
+++ b/test/COFF/manifest.test
@@ -57,10 +57,24 @@ DEPENDENCY: </dependentAssembly>
DEPENDENCY: </dependency>
DEPENDENCY: </assembly>
-# RUN: lld-link /manifest /out:%t.exe /entry:main /manifestuac:no %t.obj
+# RUN: lld-link /manifest /out:%t.exe /entry:main /manifestuac:no \
+# RUN: /manifestdependency:"foo='bar'" %t.obj
# RUN: FileCheck -check-prefix=NOUAC %s < %t.exe.manifest
NOUAC: <?xml version="1.0" standalone="yes"?>
NOUAC: <assembly xmlns="urn:schemas-microsoft-com:asm.v1"
NOUAC: manifestVersion="1.0">
+NOUAC: <dependency>
+NOUAC: <dependentAssembly>
+NOUAC: <assemblyIdentity foo='bar' />
+NOUAC: </dependentAssembly>
+NOUAC: </dependency>
NOUAC: </assembly>
+
+# RUN: lld-link /manifest /out:%t.exe /entry:main /manifestuac:no %t.obj
+# RUN: FileCheck -check-prefix=NOUACNODEP %s < %t.exe.manifest
+
+NOUACNODEP: <?xml version="1.0" standalone="yes"?>
+NOUACNODEP: <assembly xmlns="urn:schemas-microsoft-com:asm.v1"
+NOUACNODEP: manifestVersion="1.0">
+NOUACNODEP: </assembly>
diff --git a/test/COFF/manifestinput-error.test b/test/COFF/manifestinput-error.test
new file mode 100644
index 000000000000..eca7d0d03927
--- /dev/null
+++ b/test/COFF/manifestinput-error.test
@@ -0,0 +1,10 @@
+# UNSUPPORTED: manifest_tool
+# UNSUPPORTED: libxml2
+
+# RUN: yaml2obj %p/Inputs/ret42.yaml > %t.obj
+# RUN: not lld-link /out:%t.exe /entry:main \
+# RUN: /manifest:embed \
+# RUN: /manifestuac:"level='requireAdministrator'" \
+# RUN: /manifestinput:%p/Inputs/manifestinput.test %t.obj 2>&1 | FileCheck %s
+
+# CHECK: error: unable to find mt.exe in PATH: No such file or directory
diff --git a/test/COFF/manifestinput-nowarning.test b/test/COFF/manifestinput-nowarning.test
new file mode 100644
index 000000000000..d8dd864d533f
--- /dev/null
+++ b/test/COFF/manifestinput-nowarning.test
@@ -0,0 +1,11 @@
+# UNSUPPORTED: libxml2
+# REQUIRES: manifest_tool
+
+# RUN: yaml2obj %p/Inputs/ret42.yaml > %t.obj
+# RUN: lld-link /out:%t.exe /entry:main \
+# RUN: /manifest:embed \
+# RUN: /manifestuac:"level='requireAdministrator'" \
+# RUN: /manifestinput:%p/Inputs/manifestinput.test %t.obj | \
+# RUN: FileCheck -allow-empty %s
+
+# CHECK-NOT: warning: error with internal manifest tool: no libxml2
diff --git a/test/COFF/manifestinput.test b/test/COFF/manifestinput.test
index 95ebc22f7410..51c189098261 100644
--- a/test/COFF/manifestinput.test
+++ b/test/COFF/manifestinput.test
@@ -1,4 +1,4 @@
-# REQUIRES: win_mt
+# REQUIRES: manifest_tool
# RUN: yaml2obj %p/Inputs/ret42.yaml > %t.obj
# RUN: lld-link /out:%t.exe /entry:main \
@@ -11,7 +11,7 @@
TEST_EMBED: ResourceTableRVA: 0x1000
TEST_EMBED-NEXT: ResourceTableSize: 0x298
TEST_EMBED-DAG: Resources [
-TEST_EMBED-NEXT: Total Number of Resources: 1
+TEST_EMBED-NEXT: Total Number of Resources: 1
TEST_EMBED-DAG: Number of String Entries: 0
TEST_EMBED-NEXT: Number of ID Entries: 1
TEST_EMBED-NEXT: Type: kRT_MANIFEST (ID 24) [
diff --git a/test/COFF/msvclto-archive.ll b/test/COFF/msvclto-archive.ll
index 334565a1bef7..f09532721024 100644
--- a/test/COFF/msvclto-archive.ll
+++ b/test/COFF/msvclto-archive.ll
@@ -9,14 +9,14 @@
; RUN: mkdir -p %t.dir
; RUN: llvm-mc -triple=x86_64-pc-windows-msvc -filetype=obj -o %t.dir/bitcode.obj %p/Inputs/msvclto.s
; RUN: lld-link %t-main1.a %t.dir/bitcode.obj /msvclto /out:%t.exe /opt:lldlto=1 /opt:icf \
-; RUN: /entry:main /verbose > %t.log || true
+; RUN: /entry:main /verbose 2> %t.log || true
; RUN: FileCheck -check-prefix=BC %s < %t.log
; BC-NOT: Creating a temporary archive for
; RUN: rm -f %t-main2.a
; RUN: llvm-ar cru %t-main2.a %t.dir/bitcode.obj
; RUN: lld-link %t.obj %t-main2.a /msvclto /out:%t.exe /opt:lldlto=1 /opt:icf \
-; RUN: /entry:main /verbose > %t.log || true
+; RUN: /entry:main /verbose 2> %t.log || true
; RUN: FileCheck -check-prefix=OBJ %s < %t.log
; OBJ-NOT: Creating a temporary archive
@@ -25,7 +25,7 @@
; RUN: rm -f %t-main3.a
; RUN: llvm-ar cruT %t-main3.a %t.dir/bitcode.obj
; RUN: lld-link %t.obj %t-main3.a /msvclto /out:%t.exe /opt:lldlto=1 /opt:icf \
-; RUN: /entry:main /verbose > %t.log || true
+; RUN: /entry:main /verbose 2> %t.log || true
; RUN: FileCheck -check-prefix=THIN %s < %t.log
; THIN: Creating a temporary archive
diff --git a/test/COFF/msvclto-order.ll b/test/COFF/msvclto-order.ll
index 6f569af4af0c..1758077fe748 100644
--- a/test/COFF/msvclto-order.ll
+++ b/test/COFF/msvclto-order.ll
@@ -5,7 +5,7 @@
; RUN: llc -filetype=obj %S/Inputs/msvclto-order-b.ll -o %T/msvclto-order-b.obj
; RUN: llvm-ar crs %T/msvclto-order-b.lib %T/msvclto-order-b.obj
; RUN: lld-link /verbose /msvclto /out:%t.exe /entry:main %t.obj \
-; RUN: %T/msvclto-order-a.lib %T/msvclto-order-b.lib > %t.log || true
+; RUN: %T/msvclto-order-a.lib %T/msvclto-order-b.lib 2> %t.log || true
; RUN: FileCheck %s < %t.log
; CHECK: : link.exe
diff --git a/test/COFF/msvclto.ll b/test/COFF/msvclto.ll
index 66fabeb80c74..b29982737f14 100644
--- a/test/COFF/msvclto.ll
+++ b/test/COFF/msvclto.ll
@@ -3,7 +3,7 @@
; RUN: mkdir -p %t.dir
; RUN: llvm-mc -triple=x86_64-pc-windows-msvc -filetype=obj -o %t.dir/bitcode.obj %p/Inputs/msvclto.s
; RUN: lld-link %t.obj %t.dir/bitcode.obj /msvclto /out:%t.exe /opt:lldlto=1 /opt:icf \
-; RUN: /entry:main /verbose > %t.log || true
+; RUN: /entry:main /verbose 2> %t.log || true
; RUN: FileCheck %s < %t.log
; CHECK: /opt:icf /entry:main
diff --git a/test/COFF/nodefaultlib.test b/test/COFF/nodefaultlib.test
index 867dc8f18e78..c0f8d50fc7ed 100644
--- a/test/COFF/nodefaultlib.test
+++ b/test/COFF/nodefaultlib.test
@@ -19,9 +19,9 @@
# RUN: /nodefaultlib:std64.lib >& %t.log || true
# RUN: FileCheck -check-prefix=CHECK3 %s < %t.log
-CHECK1: hello64.obj: {{[Nn]}}o such file or directory
-CHECK2: hello64: {{[Nn]}}o such file or directory
-CHECK3: hello64.obj: undefined symbol: MessageBoxA
+CHECK1: error: could not open hello64.obj: {{[Nn]}}o such file or directory
+CHECK2: error: could not open hello64: {{[Nn]}}o such file or directory
+CHECK3: error: {{.*}}hello64.obj: undefined symbol: MessageBoxA
# RUN: lld-link /libpath:%T /out:%t.exe /entry:main \
# RUN: /subsystem:console hello64.obj /defaultlib:std64.lib
diff --git a/test/COFF/nopdb.test b/test/COFF/nopdb.test
deleted file mode 100644
index 29797bbf9310..000000000000
--- a/test/COFF/nopdb.test
+++ /dev/null
@@ -1,14 +0,0 @@
-# Check that /debug creates %t.pdb.
-# RUN: rm -f %t.pdb
-# RUN: lld-link /debug /entry:main /out:%t.exe %p/Inputs/ret42.obj
-# RUN: ls %t.pdb
-
-# Check that /debug /nopdb does not create %t.pdb.
-# RUN: rm -f %t.pdb
-# RUN: lld-link /debug /nopdb /entry:main /out:%t.exe %p/Inputs/ret42.obj
-# RUN: not ls %t.pdb
-
-# Check that /debug /nopdb /pdb:%t.pdb does not create %t.pdb.
-# RUN: rm -f %t.pdb
-# RUN: lld-link /debug /nopdb /pdb:%t.pdb /entry:main /out:%t.exe %p/Inputs/ret42.obj
-# RUN: not ls %t.pdb
diff --git a/test/COFF/options.test b/test/COFF/options.test
index a23da1971d15..39f944beddbc 100644
--- a/test/COFF/options.test
+++ b/test/COFF/options.test
@@ -2,7 +2,13 @@
# RUN: lld-link /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=BIND %s
-BIND: IMAGE_DLL_CHARACTERISTICS_NO_BIND
+# RUN: lld-link /allowbind /out:%t.exe /entry:main %t.obj
+# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=BIND %s
+BIND-NOT: IMAGE_DLL_CHARACTERISTICS_NO_BIND
+
+# RUN: lld-link /allowbind:no /out:%t.exe /entry:main %t.obj
+# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=NOBIND %s
+NOBIND: IMAGE_DLL_CHARACTERISTICS_NO_BIND
# RUN: lld-link /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=ISO %s
diff --git a/test/COFF/pdata-arm64.yaml b/test/COFF/pdata-arm64.yaml
new file mode 100644
index 000000000000..f21749b9253f
--- /dev/null
+++ b/test/COFF/pdata-arm64.yaml
@@ -0,0 +1,87 @@
+# RUN: yaml2obj < %s > %t.obj
+#
+# RUN: lld-link /out:%t.exe /entry:func1 /subsystem:console %t.obj
+# RUN: llvm-objdump -s -section=.pdata %t.exe | FileCheck -check-prefix=PDATA %s
+
+# PDATA: 00200000 2500a100 24200000 31002201
+
+--- !COFF
+header:
+ Machine: IMAGE_FILE_MACHINE_ARM64
+ Characteristics: [ ]
+sections:
+ - Name: .text
+ Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+ Alignment: 4
+ SectionData: ff4300d1f37b00a9f303012a00000094e003132a00000094f37b40a9ff430091c0035fd6f353bea9fe0b00f9f303012af403022a00000094e003132a00000094e003142a00000094fe0b40f9f353c2a8c0035fd6c0035fd6
+ Relocations:
+ - VirtualAddress: 12
+ SymbolName: func3
+ Type: IMAGE_REL_ARM64_BRANCH26
+ - VirtualAddress: 20
+ SymbolName: func3
+ Type: IMAGE_REL_ARM64_BRANCH26
+ - VirtualAddress: 52
+ SymbolName: func3
+ Type: IMAGE_REL_ARM64_BRANCH26
+ - VirtualAddress: 60
+ SymbolName: func3
+ Type: IMAGE_REL_ARM64_BRANCH26
+ - VirtualAddress: 68
+ SymbolName: func3
+ Type: IMAGE_REL_ARM64_BRANCH26
+ - Name: .pdata
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
+ Alignment: 4
+ SectionData: 0000000031002201000000002500a100
+ Relocations:
+ - VirtualAddress: 0
+ SymbolName: func2
+ Type: IMAGE_REL_ARM64_ADDR32NB
+ - VirtualAddress: 8
+ SymbolName: func1
+ Type: IMAGE_REL_ARM64_ADDR32NB
+symbols:
+ - Name: .text
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 57
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 1
+ - Name: .pdata
+ Value: 0
+ SectionNumber: 2
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 16
+ NumberOfRelocations: 2
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 2
+ - Name: func1
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: func2
+ Value: 36
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: func3
+ Value: 84
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+...
diff --git a/test/COFF/pdb-comdat.test b/test/COFF/pdb-comdat.test
index f85dacdbf4bb..655f215e0199 100644
--- a/test/COFF/pdb-comdat.test
+++ b/test/COFF/pdb-comdat.test
@@ -25,8 +25,8 @@ pdb_comdat_main.obj should be included in the PDB.
RUN: rm -rf %t && mkdir -p %t && cd %t
RUN: yaml2obj %S/Inputs/pdb_comdat_main.yaml -o pdb_comdat_main.obj
RUN: yaml2obj %S/Inputs/pdb_comdat_bar.yaml -o pdb_comdat_bar.obj
-RUN: lld-link pdb_comdat_main.obj pdb_comdat_bar.obj -out:t.exe -debug -pdb:t.pdb -nodefaultlib -entry:main
-RUN: llvm-pdbutil dump -l -symbols t.pdb | FileCheck %s
+RUN: lld-link pdb_comdat_main.obj pdb_comdat_bar.obj -out:%t.exe -debug -pdb:%t.pdb -nodefaultlib -entry:main
+RUN: llvm-pdbutil dump -l -symbols -globals %t.pdb | FileCheck %s
CHECK: Lines
CHECK: ============================================================
@@ -38,6 +38,20 @@ CHECK: c:\src\llvm-project\build\pdb_comdat_bar.c (MD5: 365279DB4FCBEDD721
CHECK-NOT: c:\src\llvm-project\build\foo.h
CHECK-LABEL: Mod 0002 | `* Linker *`:
+CHECK-LABEL: Global Symbols
+CHECK-NEXT: ============================================================
+CHECK-NEXT: Records
+CHECK-NEXT: 84 | S_PROCREF [size = 20] `main`
+CHECK-NEXT: module = 1, sum name = 0, offset = 120
+CHECK-NEXT: 128 | S_PROCREF [size = 20] `foo`
+CHECK-NEXT: module = 1, sum name = 0, offset = 208
+CHECK-NEXT: 148 | S_PROCREF [size = 20] `bar`
+CHECK-NEXT: module = 2, sum name = 0, offset = 120
+CHECK-NEXT: 104 | S_GDATA32 [size = 24] `global`
+CHECK-NEXT: type = 0x0074 (int), addr = 0000:0000
+CHECK-NEXT: 168 | S_GDATA32 [size = 24] `global`
+CHECK-NEXT: type = 0x0074 (int), addr = 0000:0000
+
CHECK: Symbols
CHECK: ============================================================
CHECK-LABEL: Mod 0000 | `{{.*}}pdb_comdat_main.obj`:
@@ -46,7 +60,7 @@ CHECK: 60 | S_COMPILE3 [size = 60]
CHECK: machine = intel x86-x64, Ver = Microsoft (R) Optimizing Compiler, language = c
CHECK: frontend = 19.0.24215.1, backend = 19.0.24215.1
CHECK: flags = security checks | hot patchable
-CHECK: 120 | S_GPROC32_ID [size = 44] `main`
+CHECK: 120 | S_GPROC32 [size = 44] `main`
CHECK: parent = 0, end = 196, addr = 0002:0000, code size = 24
CHECK: debug start = 4, debug end = 19, flags = none
CHECK: 164 | S_FRAMEPROC [size = 32]
@@ -54,24 +68,22 @@ CHECK: size = 40, padding size = 0, offset to padding = 0
CHECK: bytes of callee saved registers = 0, exception handler addr = 0000:0000
CHECK: flags = has async eh | opt speed
CHECK: 196 | S_END [size = 4]
-CHECK: 200 | S_GDATA32 [size = 24] `global`
-CHECK: type = 0x0074 (int), addr = 0000:0000
-CHECK: 224 | S_BUILDINFO [size = 8] BuildId = `0x100A`
-CHECK: 232 | S_GPROC32_ID [size = 44] `foo`
-CHECK: parent = 0, end = 308, addr = 0002:0032, code size = 15
+CHECK: 200 | S_BUILDINFO [size = 8] BuildId = `0x100A`
+CHECK: 208 | S_GPROC32 [size = 44] `foo`
+CHECK: parent = 0, end = 284, addr = 0002:0032, code size = 15
CHECK: debug start = 0, debug end = 14, flags = none
-CHECK: 276 | S_FRAMEPROC [size = 32]
+CHECK: 252 | S_FRAMEPROC [size = 32]
CHECK: size = 0, padding size = 0, offset to padding = 0
CHECK: bytes of callee saved registers = 0, exception handler addr = 0000:0000
CHECK: flags = marked inline | has async eh | opt speed
-CHECK: 308 | S_END [size = 4]
+CHECK: 284 | S_END [size = 4]
CHECK-LABEL: Mod 0001 | `{{.*}}pdb_comdat_bar.obj`:
CHECK: 4 | S_OBJNAME [size = 56] sig=0, `C:\src\llvm-project\build\pdb_comdat_bar.obj`
CHECK: 60 | S_COMPILE3 [size = 60]
CHECK: machine = intel x86-x64, Ver = Microsoft (R) Optimizing Compiler, language = c
CHECK: frontend = 19.0.24215.1, backend = 19.0.24215.1
CHECK: flags = security checks | hot patchable
-CHECK: 120 | S_GPROC32_ID [size = 44] `bar`
+CHECK: 120 | S_GPROC32 [size = 44] `bar`
CHECK: parent = 0, end = 196, addr = 0002:0048, code size = 14
CHECK: debug start = 4, debug end = 9, flags = none
CHECK: 164 | S_FRAMEPROC [size = 32]
@@ -79,10 +91,8 @@ CHECK: size = 40, padding size = 0, offset to padding = 0
CHECK: bytes of callee saved registers = 0, exception handler addr = 0000:0000
CHECK: flags = has async eh | opt speed
CHECK: 196 | S_END [size = 4]
-CHECK: 200 | S_GDATA32 [size = 24] `global`
-CHECK: type = 0x0074 (int), addr = 0000:0000
-CHECK: 224 | S_BUILDINFO [size = 8] BuildId = `0x100D`
-CHECK-NOT: S_GPROC32_ID {{.*}} `foo`
+CHECK: 200 | S_BUILDINFO [size = 8] BuildId = `0x100D`
+CHECK-NOT: S_GPROC32 {{.*}} `foo`
CHECK-LABEL: Mod 0002 | `* Linker *`:
Reorder the object files and verify that the other table is selected.
@@ -97,3 +107,6 @@ REORDER-LABEL: Mod 0001 | `{{.*}}pdb_comdat_main.obj`:
REORDER: c:\src\llvm-project\build\pdb_comdat_main.c
REORDER-NOT: c:\src\llvm-project\build\foo.h
REORDER-LABEL: Mod 0002 | `* Linker *`:
+
+Make sure that we don't crash on non-prevailing debug sections if -debug is not enabled.
+RUN: lld-link pdb_comdat_main.obj pdb_comdat_bar.obj -out:%t.exe -nodefaultlib -entry:main
diff --git a/test/COFF/pdb-diff.test b/test/COFF/pdb-diff.test
index 79b23a5c026d..17d26b60353e 100644
--- a/test/COFF/pdb-diff.test
+++ b/test/COFF/pdb-diff.test
@@ -4,8 +4,11 @@ as the "baseline" for us to measure against. Then we link the same object
file with LLD and compare the two PDBs. Since the baseline object file and
PDB are already checked in, we just run LLD on the object file.
-RUN: lld-link /debug /pdb:%T/pdb-diff-lld.pdb /nodefaultlib /entry:main %S/Inputs/pdb-diff.obj
-RUN: llvm-pdbutil diff -result -values=false -left-bin-root=%S -right-bin-root=D:/src/llvm-mono/lld/test/COFF/ %T/pdb-diff-lld.pdb %S/Inputs/pdb-diff-cl.pdb | FileCheck %s
+RUN: rm -f %T/pdb-diff-lld.pdb %T/pdb-diff-lld.exe
+RUN: lld-link /debug /pdb:%T/pdb-diff-lld.pdb /out:%T/pdb-diff-lld.exe /nodefaultlib \
+RUN: /entry:main %S/Inputs/pdb-diff.obj
+RUN: llvm-pdbutil diff -result -values=false -left-bin-root=%S -right-bin-root=D:/src/llvm-mono/lld/test/COFF/ \
+RUN: %T/pdb-diff-lld.pdb %S/Inputs/pdb-diff-cl.pdb | FileCheck %s
CHECK: ----------------------
CHECK-NEXT: | MSF Super Block |
@@ -25,7 +28,7 @@ CHECK-NEXT: | Stream Directory |
CHECK-NEXT: |------------------------------+---|
CHECK-NEXT: | File | |
CHECK-NEXT: |------------------------------+---|
-CHECK-NEXT: | Stream Count | D |
+CHECK-NEXT: | Stream Count | I |
CHECK-NEXT: |------------------------------+---|
CHECK-NEXT: | Old MSF Directory | I |
CHECK-NEXT: |------------------------------+---|
@@ -55,9 +58,9 @@ CHECK-NEXT: | IPI Hash | {{[EI]}} |
CHECK-NEXT: |------------------------------+---|
CHECK-NEXT: | Public Symbol Hash | {{[EI]}} |
CHECK-NEXT: |------------------------------+---|
-CHECK-NEXT: | Public Symbol Records | {{[EI]}} |
+CHECK-NEXT: | Global Symbol Hash | {{[EI]}} |
CHECK-NEXT: |------------------------------+---|
-CHECK-NEXT: | Global Symbol Hash | D |
+CHECK-NEXT: | Symbol Records | {{[EI]}} |
CHECK-NEXT: |------------------------------+---|
CHECK-NEXT: ------------------------------------
CHECK-NEXT: | String Table |
@@ -152,7 +155,7 @@ CHECK-NEXT: | DBG (NewFPO) | {{[EI]}} |
CHECK-NEXT: |----------------------------------------+---|
CHECK-NEXT: | DBG (SectionHdrOrig) | I |
CHECK-NEXT: |----------------------------------------+---|
-CHECK-NEXT: | Globals Stream | D |
+CHECK-NEXT: | Globals Stream | {{[EI]}} |
CHECK-NEXT: |----------------------------------------+---|
CHECK-NEXT: | Publics Stream | {{[EI]}} |
CHECK-NEXT: |----------------------------------------+---|
@@ -186,7 +189,7 @@ CHECK-NEXT: | - Pdb File Path Index | I |
CHECK-NEXT: |----------------------------------------+---|
CHECK-NEXT: | - Source File Name Index | I |
CHECK-NEXT: |----------------------------------------+---|
-CHECK-NEXT: | - Symbol Byte Size | D |
+CHECK-NEXT: | - Symbol Byte Size |
CHECK-NEXT: |----------------------------------------+---|
CHECK-NEXT: | Module "* Linker *" |
CHECK-NEXT: |----------------------------------------+---|
diff --git a/test/COFF/pdb-global-gc.yaml b/test/COFF/pdb-global-gc.yaml
index b66b3f2ca7b8..f2c4450809b0 100644
--- a/test/COFF/pdb-global-gc.yaml
+++ b/test/COFF/pdb-global-gc.yaml
@@ -1,8 +1,8 @@
# RUN: yaml2obj %s -o %t.obj
# RUN: llvm-mc %S/Inputs/pdb-global-gc.s -triple x86_64-windows-msvc -filetype=obj -o %t2.obj
# RUN: lld-link %t.obj %t2.obj -debug -entry:main \
-# RUN: -nodefaultlib -debug -out:%t.exe -pdb:%t.pdb -verbose
-# RUN: llvm-pdbutil dump -symbols %t.pdb | FileCheck %s
+# RUN: -nodefaultlib -opt:ref -out:%t.exe -pdb:%t.pdb -verbose
+# RUN: llvm-pdbutil dump -symbols -globals %t.pdb | FileCheck %s
# This tests the case where an __imp_ chunk is discarded by linker GC. The debug
# info may refer to the __imp_ symbol still.
@@ -12,13 +12,17 @@
# int discarded() { return __wc_mb_cur; }
# int main() { return g2; }
-# CHECK: Symbols
-# CHECK: ============================================================
-# CHECK: Mod 0000 | `{{.*}}pdb-global-gc.yaml.tmp.obj`:
-# CHECK: 4 | S_GDATA32 [size = 28] `__wc_mb_cur`
-# CHECK-NEXT: type = 0x0070 (char), addr = 0000:0000
-# CHECK: Mod 0001 | `{{.*}}pdb-global-gc.yaml.tmp2.obj`:
-# CHECK: Mod 0002 | `* Linker *`:
+# CHECK: Global Symbols
+# CHECK-NEXT: ============================================================
+# CHECK-NEXT: Records
+# CHECK-NEXT: 20 | S_GDATA32 [size = 28] `__wc_mb_cur`
+# CHECK-NEXT: type = 0x0070 (char), addr = 0000:0000
+
+# CHECK: Symbols
+# CHECK: ============================================================
+# CHECK-NEXT: Mod 0000 | `{{.*}}pdb-global-gc.yaml.tmp.obj`:
+# CHECK-NEXT: Mod 0001 | `{{.*}}pdb-global-gc.yaml.tmp2.obj`:
+# CHECK-NEXT: Mod 0002 | `* Linker *`:
--- !COFF
header:
diff --git a/test/COFF/pdb-global-hashes.test b/test/COFF/pdb-global-hashes.test
new file mode 100644
index 000000000000..b47e43826537
--- /dev/null
+++ b/test/COFF/pdb-global-hashes.test
@@ -0,0 +1,93 @@
+RUN: yaml2obj %p/Inputs/pdb-hashes-1.yaml > %t.1.obj
+RUN: yaml2obj %p/Inputs/pdb-hashes-2.yaml > %t.2.obj
+RUN: yaml2obj %p/Inputs/pdb-hashes-2-missing.yaml > %t.2.missing.obj
+RUN: lld-link /debug %t.1.obj %t.2.obj /entry:main /nodefaultlib /PDB:%t.nohash.pdb
+RUN: lld-link /debug:ghash %t.1.obj %t.2.obj /entry:main /nodefaultlib /PDB:%t.hash.pdb
+RUN: lld-link /debug:ghash %t.1.obj %t.2.missing.obj /entry:main /nodefaultlib /PDB:%t.mixed.pdb
+RUN: llvm-pdbutil dump -types -ids %t.nohash.pdb | FileCheck %s
+RUN: llvm-pdbutil dump -types -ids %t.hash.pdb | FileCheck %s
+RUN: llvm-pdbutil dump -types -ids %t.mixed.pdb | FileCheck %s
+
+; These object files were generated via the following inputs and commands:
+; ----------------------------------------------
+; // obj.h
+; namespace NS {
+; struct Foo {
+; explicit Foo(int x) : X(x) {}
+; int X;
+; };
+;
+; int func(const Foo &f);
+; }
+; ----------------------------------------------
+; // obj1.cpp
+; #include "obj.h"
+;
+; int main(int argc, char **argv) {
+; NS::Foo f(argc);
+; return NS::func(f);
+; }
+; ----------------------------------------------
+; // obj2.cpp
+; #include "obj.h"
+;
+; int NS::func(const Foo &f) {
+; return 2 * f.X;
+; }
+; ----------------------------------------------
+; $ clang-cl /Z7 /GS- obj1.cpp /c /o obj1.obj
+; $ clang-cl /Z7 /GS- obj2.cpp /c /o obj2.obj
+
+CHECK: Types (TPI Stream)
+CHECK-NEXT: ============================================================
+CHECK-NEXT: Showing 13 records
+CHECK-NEXT: 0x1000 | LF_POINTER [size = 12]
+CHECK-NEXT: referent = 0x0470 (char*), mode = pointer, opts = None, kind = ptr32
+CHECK-NEXT: 0x1001 | LF_ARGLIST [size = 16]
+CHECK-NEXT: 0x0074 (int): `int`
+CHECK-NEXT: 0x1000: `char**`
+CHECK-NEXT: 0x1002 | LF_PROCEDURE [size = 16]
+CHECK-NEXT: return type = 0x0074 (int), # args = 2, param list = 0x1001
+CHECK-NEXT: calling conv = cdecl, options = None
+CHECK-NEXT: 0x1003 | LF_STRUCTURE [size = 44] `NS::Foo`
+CHECK-NEXT: unique name: `.?AUFoo@NS@@`
+CHECK-NEXT: vtable: <no type>, base list: <no type>, field list: <no type>
+CHECK-NEXT: options: forward ref | has unique name
+CHECK-NEXT: 0x1004 | LF_POINTER [size = 12]
+CHECK-NEXT: referent = 0x1003, mode = pointer, opts = None, kind = ptr32
+CHECK-NEXT: 0x1005 | LF_ARGLIST [size = 12]
+CHECK-NEXT: 0x0074 (int): `int`
+CHECK-NEXT: 0x1006 | LF_MFUNCTION [size = 28]
+CHECK-NEXT: return type = 0x0003 (void), # args = 1, param list = 0x1005
+CHECK-NEXT: class type = 0x1003, this type = 0x1004, this adjust = 0
+CHECK-NEXT: calling conv = thiscall, options = None
+CHECK-NEXT: 0x1007 | LF_FIELDLIST [size = 28]
+CHECK-NEXT: - LF_MEMBER [name = `X`, Type = 0x0074 (int), offset = 0, attrs = public]
+CHECK-NEXT: - LF_ONEMETHOD [name = `Foo`]
+CHECK-NEXT: type = 0x1006, vftable offset = -1, attrs = public
+CHECK-NEXT: 0x1008 | LF_STRUCTURE [size = 44] `NS::Foo`
+CHECK-NEXT: unique name: `.?AUFoo@NS@@`
+CHECK-NEXT: vtable: <no type>, base list: <no type>, field list: 0x1007
+CHECK-NEXT: options: has unique name
+CHECK-NEXT: 0x1009 | LF_MODIFIER [size = 12]
+CHECK-NEXT: referent = 0x1003, modifiers = const
+CHECK-NEXT: 0x100A | LF_POINTER [size = 12]
+CHECK-NEXT: referent = 0x1009, mode = ref, opts = None, kind = ptr32
+CHECK-NEXT: 0x100B | LF_ARGLIST [size = 12]
+CHECK-NEXT: 0x100A: `const NS::Foo&`
+CHECK-NEXT: 0x100C | LF_PROCEDURE [size = 16]
+CHECK-NEXT: return type = 0x0074 (int), # args = 1, param list = 0x100B
+CHECK-NEXT: calling conv = cdecl, options = None
+CHECK: Types (IPI Stream)
+CHECK-NEXT: ============================================================
+CHECK-NEXT: Showing 6 records
+CHECK-NEXT: 0x1000 | LF_FUNC_ID [size = 20]
+CHECK-NEXT: name = main, type = 0x1002, parent scope = <no type>
+CHECK-NEXT: 0x1001 | LF_STRING_ID [size = 48] ID: <no type>, String: D:\src\llvmbuild\clang\Debug\x86\obj.h
+CHECK-NEXT: 0x1002 | LF_UDT_SRC_LINE [size = 16]
+CHECK-NEXT: udt = 0x1008, file = 4097, line = 2
+CHECK-NEXT: 0x1003 | LF_MFUNC_ID [size = 16]
+CHECK-NEXT: name = Foo, type = 0x1006, class type = 0x1003
+CHECK-NEXT: 0x1004 | LF_STRING_ID [size = 12] ID: <no type>, String: NS
+CHECK-NEXT: 0x1005 | LF_FUNC_ID [size = 20]
+CHECK-NEXT: name = func, type = 0x100C, parent scope = 0x1004
diff --git a/test/COFF/pdb-globals.test b/test/COFF/pdb-globals.test
new file mode 100644
index 000000000000..b5e4f49cb458
--- /dev/null
+++ b/test/COFF/pdb-globals.test
@@ -0,0 +1,42 @@
+RUN: yaml2obj %S/Inputs/pdb-globals.yaml > %t.obj
+RUN: lld-link /debug /nodefaultlib /entry:main /out:%t.exe /pdb:%t.pdb %t.obj
+RUN: llvm-pdbutil dump -symbols -globals %t.pdb | FileCheck %s
+
+# Test that we correctly distribute symbols between the globals and module
+# symbol streams. Specifically:
+# * S_UDT, S_GDATA32, and S_CONSTANT end up in the globals stream, and are
+# omitted from the module stream.
+# * S_GPROC32 and S_LPROC32 end up in the symbols stream, but S_PROCREF and
+# S_LPROCREF are added to the globals stream that refer to the module
+# stream.
+# * S_LDATA32 is copied byte for byte into both streams.
+
+
+CHECK-LABEL: Global Symbols
+CHECK-NEXT: ============================================================
+CHECK-NEXT: Records
+CHECK-NEXT: 160 | S_PROCREF [size = 28] `GlobalFunc`
+CHECK-NEXT: module = 1, sum name = 0, offset = 52
+CHECK-NEXT: 188 | S_PROCREF [size = 20] `main`
+CHECK-NEXT: module = 1, sum name = 0, offset = 108
+CHECK-NEXT: 208 | S_LPROCREF [size = 24] `LocalFunc`
+CHECK-NEXT: module = 1, sum name = 0, offset = 292
+CHECK-NEXT: 312 | S_PROCREF [size = 40] `HelloPoint::HelloPoint`
+CHECK-NEXT: module = 1, sum name = 0, offset = 376
+CHECK-NEXT: 232 | S_GDATA32 [size = 28] `__purecall`
+CHECK-NEXT: type = 0x0403 (void*), addr = 0000:0000
+CHECK-NEXT: 260 | S_GDATA32 [size = 24] `GlobalVar`
+CHECK-NEXT: type = 0x100B (const int*), addr = 0001:0000
+CHECK-NEXT: 284 | S_LDATA32 [size = 28] `ConstantVar`
+CHECK-NEXT: type = 0x100A (const int), addr = 0002:0000
+
+CHECK-LABEL: Symbols
+CHECK-NEXT: ============================================================
+CHECK-NEXT: Mod 0000
+CHECK-NOT: | S_GDATA32
+CHECK-NOT: | S_UDT
+CHECK: 52 | S_GPROC32 [size = 52] `GlobalFunc`
+CHECK: 108 | S_GPROC32 [size = 44] `main`
+CHECK: 292 | S_LPROC32 [size = 52] `LocalFunc`
+CHECK: 348 | S_LDATA32 [size = 28] `ConstantVar`
+CHECK: 376 | S_GPROC32 [size = 64] `HelloPoint::HelloPoint`
diff --git a/test/COFF/pdb-heapsite.yaml b/test/COFF/pdb-heapsite.yaml
new file mode 100644
index 000000000000..966ae4284890
--- /dev/null
+++ b/test/COFF/pdb-heapsite.yaml
@@ -0,0 +1,1561 @@
+# RUN: yaml2obj %s -o %t.obj
+# RUN: lld-link %t.obj -dll -debug -noentry -nodefaultlib -debug -out:%t.exe -pdb:%t.pdb
+# RUN: llvm-pdbutil dump -symbols %t.pdb | FileCheck %s
+
+# This object generated from this C++ source:
+# // t.cpp
+# void *operator new(size_t) { return nullptr; }
+# struct Foo { int x; };
+# extern "C" __declspec(dllexport) Foo *f() { return new Foo; }
+
+# Compile as:
+# $ cl -c -Z7 t.cpp
+
+# CHECK: S_HEAPALLOCSITE [size = 16]
+# CHECK-NEXT: type = 0x1000 (Foo), addr = {{.*}} call size = 5
+
+--- !COFF
+header:
+ Machine: IMAGE_FILE_MACHINE_AMD64
+ Characteristics: [ ]
+sections:
+ - Name: .drectve
+ Characteristics: [ IMAGE_SCN_LNK_INFO, IMAGE_SCN_LNK_REMOVE ]
+ Alignment: 1
+ SectionData: 2020202F44454641554C544C49423A224C4942434D5422202F44454641554C544C49423A224F4C444E414D455322202F4558504F52543A6620
+ - Name: '.debug$S'
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
+ Alignment: 1
+ Subsections:
+ - !Symbols
+ Records:
+ - Kind: S_OBJNAME
+ ObjNameSym:
+ Signature: 0
+ ObjectName: 'C:\src\llvm-project\build\t.obj'
+ - Kind: S_COMPILE3
+ Compile3Sym:
+ Flags: [ SecurityChecks, HotPatch ]
+ Machine: X64
+ FrontendMajor: 19
+ FrontendMinor: 11
+ FrontendBuild: 25508
+ FrontendQFE: 2
+ BackendMajor: 19
+ BackendMinor: 11
+ BackendBuild: 25508
+ BackendQFE: 2
+ Version: 'Microsoft (R) Optimizing Compiler'
+ - !Symbols
+ Records:
+ - Kind: S_GPROC32_ID
+ ProcSym:
+ CodeSize: 8
+ DbgStart: 5
+ DbgEnd: 7
+ FunctionType: 4104
+ Flags: [ ]
+ DisplayName: operator new
+ - Kind: S_FRAMEPROC
+ FrameProcSym:
+ TotalFrameBytes: 0
+ PaddingFrameBytes: 0
+ OffsetToPadding: 0
+ BytesOfCalleeSavedRegisters: 0
+ OffsetOfExceptionHandler: 0
+ SectionIdOfExceptionHandler: 0
+ Flags: [ AsynchronousExceptionHandling, OptimizedForSpeed ]
+ - Kind: S_REGREL32
+ RegRelativeSym:
+ Offset: 8
+ Type: 35
+ Register: RSP
+ VarName: __formal
+ - Kind: S_PROC_ID_END
+ ScopeEndSym:
+ - !Lines
+ CodeSize: 8
+ Flags: [ ]
+ RelocOffset: 0
+ RelocSegment: 0
+ Blocks:
+ - FileName: 'c:\src\llvm-project\build\t.cpp'
+ Lines:
+ - Offset: 0
+ LineStart: 1
+ IsStatement: true
+ EndDelta: 0
+ Columns:
+ - !Symbols
+ Records:
+ - Kind: S_GPROC32_ID
+ ProcSym:
+ CodeSize: 29
+ DbgStart: 4
+ DbgEnd: 24
+ FunctionType: 4107
+ Flags: [ ]
+ DisplayName: f
+ - Kind: S_FRAMEPROC
+ FrameProcSym:
+ TotalFrameBytes: 56
+ PaddingFrameBytes: 0
+ OffsetToPadding: 0
+ BytesOfCalleeSavedRegisters: 0
+ OffsetOfExceptionHandler: 0
+ SectionIdOfExceptionHandler: 0
+ Flags: [ AsynchronousExceptionHandling, OptimizedForSpeed ]
+ - Kind: S_HEAPALLOCSITE
+ HeapAllocationSiteSym:
+ Offset: 9
+ CallInstructionSize: 5
+ Type: 4096
+ - Kind: S_PROC_ID_END
+ ScopeEndSym:
+ - !Lines
+ CodeSize: 29
+ Flags: [ ]
+ RelocOffset: 0
+ RelocSegment: 0
+ Blocks:
+ - FileName: 'c:\src\llvm-project\build\t.cpp'
+ Lines:
+ - Offset: 0
+ LineStart: 3
+ IsStatement: true
+ EndDelta: 0
+ Columns:
+ - !Symbols
+ Records:
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4098
+ UDTName: Foo
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4196
+ UDTName: '__vc_attributes::event_sourceAttribute'
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4188
+ UDTName: '__vc_attributes::event_sourceAttribute::optimize_e'
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4185
+ UDTName: '__vc_attributes::event_sourceAttribute::type_e'
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4181
+ UDTName: '__vc_attributes::helper_attributes::v1_alttypeAttribute'
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4175
+ UDTName: '__vc_attributes::helper_attributes::v1_alttypeAttribute::type_e'
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4171
+ UDTName: '__vc_attributes::helper_attributes::usageAttribute'
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4165
+ UDTName: '__vc_attributes::helper_attributes::usageAttribute::usage_e'
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4161
+ UDTName: '__vc_attributes::threadingAttribute'
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4153
+ UDTName: '__vc_attributes::threadingAttribute::threading_e'
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4149
+ UDTName: '__vc_attributes::aggregatableAttribute'
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4141
+ UDTName: '__vc_attributes::aggregatableAttribute::type_e'
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4137
+ UDTName: '__vc_attributes::event_receiverAttribute'
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4127
+ UDTName: '__vc_attributes::event_receiverAttribute::type_e'
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4123
+ UDTName: '__vc_attributes::moduleAttribute'
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4110
+ UDTName: '__vc_attributes::moduleAttribute::type_e'
+ - Kind: S_UDT
+ UDTSym:
+ Type: 35
+ UDTName: size_t
+ - !FileChecksums
+ Checksums:
+ - FileName: 'c:\src\llvm-project\build\t.cpp'
+ Kind: MD5
+ Checksum: 3C4D132707FA572FA0869E4E4DAA7F85
+ - !StringTable
+ Strings:
+ - 'c:\src\llvm-project\build\t.cpp'
+ - !Symbols
+ Records:
+ - Kind: S_BUILDINFO
+ BuildInfoSym:
+ BuildId: 4205
+ Relocations:
+ - VirtualAddress: 152
+ SymbolName: '??2@YAPEAX_K@Z'
+ Type: IMAGE_REL_AMD64_SECREL
+ - VirtualAddress: 156
+ SymbolName: '??2@YAPEAX_K@Z'
+ Type: IMAGE_REL_AMD64_SECTION
+ - VirtualAddress: 240
+ SymbolName: '??2@YAPEAX_K@Z'
+ Type: IMAGE_REL_AMD64_SECREL
+ - VirtualAddress: 244
+ SymbolName: '??2@YAPEAX_K@Z'
+ Type: IMAGE_REL_AMD64_SECTION
+ - VirtualAddress: 312
+ SymbolName: f
+ Type: IMAGE_REL_AMD64_SECREL
+ - VirtualAddress: 316
+ SymbolName: f
+ Type: IMAGE_REL_AMD64_SECTION
+ - VirtualAddress: 355
+ SymbolName: f
+ Type: IMAGE_REL_AMD64_SECREL
+ - VirtualAddress: 359
+ SymbolName: f
+ Type: IMAGE_REL_AMD64_SECTION
+ - VirtualAddress: 380
+ SymbolName: f
+ Type: IMAGE_REL_AMD64_SECREL
+ - VirtualAddress: 384
+ SymbolName: f
+ Type: IMAGE_REL_AMD64_SECTION
+ - Name: '.debug$T'
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
+ Alignment: 1
+ Types:
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 0
+ Options: [ None, ForwardReference, HasUniqueName ]
+ FieldList: 0
+ Name: Foo
+ UniqueName: '.?AUFoo@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 0
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 116
+ FieldOffset: 0
+ Name: x
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 1
+ Options: [ None, HasUniqueName ]
+ FieldList: 4097
+ Name: Foo
+ UniqueName: '.?AUFoo@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 4
+ - Kind: LF_STRING_ID
+ StringId:
+ Id: 0
+ String: 'c:\src\llvm-project\build\t.cpp'
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4098
+ SourceFile: 4099
+ LineNumber: 2
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4096
+ Attrs: 65548
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ 35 ]
+ - Kind: LF_PROCEDURE
+ Procedure:
+ ReturnType: 1539
+ CallConv: NearC
+ Options: [ None ]
+ ParameterCount: 1
+ ArgumentList: 4102
+ - Kind: LF_FUNC_ID
+ FuncId:
+ ParentScope: 0
+ FunctionType: 4103
+ Name: operator new
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ ]
+ - Kind: LF_PROCEDURE
+ Procedure:
+ ReturnType: 4101
+ CallConv: NearC
+ Options: [ None ]
+ ParameterCount: 0
+ ArgumentList: 4105
+ - Kind: LF_FUNC_ID
+ FuncId:
+ ParentScope: 0
+ FunctionType: 4106
+ Name: f
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 0
+ Options: [ None, ForwardReference, HasUniqueName ]
+ FieldList: 0
+ Name: '__vc_attributes::moduleAttribute'
+ UniqueName: '.?AUmoduleAttribute@__vc_attributes@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 0
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 1
+ Name: dll
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 2
+ Name: exe
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 3
+ Name: service
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 4
+ Name: unspecified
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 2
+ Name: EXE
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 3
+ Name: SERVICE
+ - Kind: LF_ENUM
+ Enum:
+ NumEnumerators: 6
+ Options: [ None, Nested, HasUniqueName ]
+ FieldList: 4109
+ Name: '__vc_attributes::moduleAttribute::type_e'
+ UniqueName: '.?AW4type_e@moduleAttribute@__vc_attributes@@'
+ UnderlyingType: 116
+ - Kind: LF_STRING_ID
+ StringId:
+ Id: 0
+ String: 'c:\src\llvm-project\build\predefined c++ attributes (compiler internal)'
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4110
+ SourceFile: 4111
+ LineNumber: 482
+ - Kind: LF_MODIFIER
+ Modifier:
+ ModifiedType: 112
+ Modifiers: [ None, Const ]
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4113
+ Attrs: 65548
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ 4110, 4114, 4114, 4114, 116, 48, 4114, 116,
+ 4114, 4114, 116, 48, 48, 4114, 4114 ]
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4108
+ Attrs: 66572
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4108
+ ThisType: 4116
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 15
+ ArgumentList: 4115
+ ThisPointerAdjustment: 0
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ 4110 ]
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4108
+ ThisType: 4116
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 1
+ ArgumentList: 4118
+ ThisPointerAdjustment: 0
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4108
+ ThisType: 4116
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 0
+ ArgumentList: 4105
+ ThisPointerAdjustment: 0
+ - Kind: LF_METHODLIST
+ MethodOverloadList:
+ Methods:
+ - Type: 4117
+ Attrs: 3
+ VFTableOffset: -1
+ Name: ''
+ - Type: 4119
+ Attrs: 3
+ VFTableOffset: -1
+ Name: ''
+ - Type: 4120
+ Attrs: 3
+ VFTableOffset: -1
+ Name: ''
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_NESTTYPE
+ NestedType:
+ Type: 4110
+ Name: type_e
+ - Kind: LF_METHOD
+ OverloadedMethod:
+ NumOverloads: 3
+ MethodList: 4121
+ Name: moduleAttribute
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 4110
+ FieldOffset: 0
+ Name: type
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 4114
+ FieldOffset: 8
+ Name: name
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 4114
+ FieldOffset: 16
+ Name: version
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 4114
+ FieldOffset: 24
+ Name: uuid
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 116
+ FieldOffset: 32
+ Name: lcid
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 48
+ FieldOffset: 36
+ Name: control
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 4114
+ FieldOffset: 40
+ Name: helpstring
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 116
+ FieldOffset: 48
+ Name: helpstringcontext
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 4114
+ FieldOffset: 56
+ Name: helpstringdll
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 4114
+ FieldOffset: 64
+ Name: helpfile
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 116
+ FieldOffset: 72
+ Name: helpcontext
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 48
+ FieldOffset: 76
+ Name: hidden
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 48
+ FieldOffset: 77
+ Name: restricted
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 4114
+ FieldOffset: 80
+ Name: custom
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 4114
+ FieldOffset: 88
+ Name: resource_name
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 19
+ Options: [ None, HasConstructorOrDestructor, ContainsNestedClass, HasUniqueName ]
+ FieldList: 4122
+ Name: '__vc_attributes::moduleAttribute'
+ UniqueName: '.?AUmoduleAttribute@__vc_attributes@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 96
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4123
+ SourceFile: 4111
+ LineNumber: 481
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 0
+ Options: [ None, ForwardReference, HasUniqueName ]
+ FieldList: 0
+ Name: '__vc_attributes::event_receiverAttribute'
+ UniqueName: '.?AUevent_receiverAttribute@__vc_attributes@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 0
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 0
+ Name: native
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 1
+ Name: com
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 2
+ Name: managed
+ - Kind: LF_ENUM
+ Enum:
+ NumEnumerators: 3
+ Options: [ None, Nested, HasUniqueName ]
+ FieldList: 4126
+ Name: '__vc_attributes::event_receiverAttribute::type_e'
+ UniqueName: '.?AW4type_e@event_receiverAttribute@__vc_attributes@@'
+ UnderlyingType: 116
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4127
+ SourceFile: 4111
+ LineNumber: 136
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ 4127, 48 ]
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4125
+ Attrs: 66572
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4125
+ ThisType: 4130
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 2
+ ArgumentList: 4129
+ ThisPointerAdjustment: 0
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ 4127 ]
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4125
+ ThisType: 4130
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 1
+ ArgumentList: 4132
+ ThisPointerAdjustment: 0
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4125
+ ThisType: 4130
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 0
+ ArgumentList: 4105
+ ThisPointerAdjustment: 0
+ - Kind: LF_METHODLIST
+ MethodOverloadList:
+ Methods:
+ - Type: 4131
+ Attrs: 3
+ VFTableOffset: -1
+ Name: ''
+ - Type: 4133
+ Attrs: 3
+ VFTableOffset: -1
+ Name: ''
+ - Type: 4134
+ Attrs: 3
+ VFTableOffset: -1
+ Name: ''
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_NESTTYPE
+ NestedType:
+ Type: 4127
+ Name: type_e
+ - Kind: LF_METHOD
+ OverloadedMethod:
+ NumOverloads: 3
+ MethodList: 4135
+ Name: event_receiverAttribute
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 4127
+ FieldOffset: 0
+ Name: type
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 48
+ FieldOffset: 4
+ Name: layout_dependent
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 6
+ Options: [ None, HasConstructorOrDestructor, ContainsNestedClass, HasUniqueName ]
+ FieldList: 4136
+ Name: '__vc_attributes::event_receiverAttribute'
+ UniqueName: '.?AUevent_receiverAttribute@__vc_attributes@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 8
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4137
+ SourceFile: 4111
+ LineNumber: 135
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 0
+ Options: [ None, ForwardReference, HasUniqueName ]
+ FieldList: 0
+ Name: '__vc_attributes::aggregatableAttribute'
+ UniqueName: '.?AUaggregatableAttribute@__vc_attributes@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 0
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 0
+ Name: never
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 1
+ Name: allowed
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 2
+ Name: always
+ - Kind: LF_ENUM
+ Enum:
+ NumEnumerators: 3
+ Options: [ None, Nested, HasUniqueName ]
+ FieldList: 4140
+ Name: '__vc_attributes::aggregatableAttribute::type_e'
+ UniqueName: '.?AW4type_e@aggregatableAttribute@__vc_attributes@@'
+ UnderlyingType: 116
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4141
+ SourceFile: 4111
+ LineNumber: 545
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ 4141 ]
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4139
+ Attrs: 66572
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4139
+ ThisType: 4144
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 1
+ ArgumentList: 4143
+ ThisPointerAdjustment: 0
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4139
+ ThisType: 4144
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 0
+ ArgumentList: 4105
+ ThisPointerAdjustment: 0
+ - Kind: LF_METHODLIST
+ MethodOverloadList:
+ Methods:
+ - Type: 4145
+ Attrs: 3
+ VFTableOffset: -1
+ Name: ''
+ - Type: 4146
+ Attrs: 3
+ VFTableOffset: -1
+ Name: ''
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_NESTTYPE
+ NestedType:
+ Type: 4141
+ Name: type_e
+ - Kind: LF_METHOD
+ OverloadedMethod:
+ NumOverloads: 2
+ MethodList: 4147
+ Name: aggregatableAttribute
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 4141
+ FieldOffset: 0
+ Name: type
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 4
+ Options: [ None, HasConstructorOrDestructor, ContainsNestedClass, HasUniqueName ]
+ FieldList: 4148
+ Name: '__vc_attributes::aggregatableAttribute'
+ UniqueName: '.?AUaggregatableAttribute@__vc_attributes@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 4
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4149
+ SourceFile: 4111
+ LineNumber: 544
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 0
+ Options: [ None, ForwardReference, HasUniqueName ]
+ FieldList: 0
+ Name: '__vc_attributes::threadingAttribute'
+ UniqueName: '.?AUthreadingAttribute@__vc_attributes@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 0
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 1
+ Name: apartment
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 2
+ Name: single
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 3
+ Name: free
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 4
+ Name: neutral
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 5
+ Name: both
+ - Kind: LF_ENUM
+ Enum:
+ NumEnumerators: 5
+ Options: [ None, Nested, HasUniqueName ]
+ FieldList: 4152
+ Name: '__vc_attributes::threadingAttribute::threading_e'
+ UniqueName: '.?AW4threading_e@threadingAttribute@__vc_attributes@@'
+ UnderlyingType: 116
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4153
+ SourceFile: 4111
+ LineNumber: 423
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ 4153 ]
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4151
+ Attrs: 66572
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4151
+ ThisType: 4156
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 1
+ ArgumentList: 4155
+ ThisPointerAdjustment: 0
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4151
+ ThisType: 4156
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 0
+ ArgumentList: 4105
+ ThisPointerAdjustment: 0
+ - Kind: LF_METHODLIST
+ MethodOverloadList:
+ Methods:
+ - Type: 4157
+ Attrs: 3
+ VFTableOffset: -1
+ Name: ''
+ - Type: 4158
+ Attrs: 3
+ VFTableOffset: -1
+ Name: ''
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_NESTTYPE
+ NestedType:
+ Type: 4153
+ Name: threading_e
+ - Kind: LF_METHOD
+ OverloadedMethod:
+ NumOverloads: 2
+ MethodList: 4159
+ Name: threadingAttribute
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 4153
+ FieldOffset: 0
+ Name: value
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 4
+ Options: [ None, HasConstructorOrDestructor, ContainsNestedClass, HasUniqueName ]
+ FieldList: 4160
+ Name: '__vc_attributes::threadingAttribute'
+ UniqueName: '.?AUthreadingAttribute@__vc_attributes@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 4
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4161
+ SourceFile: 4111
+ LineNumber: 422
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 0
+ Options: [ None, ForwardReference, HasUniqueName ]
+ FieldList: 0
+ Name: '__vc_attributes::helper_attributes::usageAttribute'
+ UniqueName: '.?AUusageAttribute@helper_attributes@__vc_attributes@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 0
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 0
+ Name: eAnyUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 1
+ Name: eCoClassUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 2
+ Name: eCOMInterfaceUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 6
+ Name: eInterfaceUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 8
+ Name: eMemberUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 16
+ Name: eMethodUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 32
+ Name: eInterfaceMethodUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 64
+ Name: eInterfaceMemberUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 128
+ Name: eCoClassMemberUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 256
+ Name: eCoClassMethodUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 768
+ Name: eGlobalMethodUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 1024
+ Name: eGlobalDataUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 2048
+ Name: eClassUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 4096
+ Name: eInterfaceParameterUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 12288
+ Name: eMethodParameterUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 16384
+ Name: eIDLModuleUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 32768
+ Name: eAnonymousUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 65536
+ Name: eTypedefUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 131072
+ Name: eUnionUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 262144
+ Name: eEnumUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 524288
+ Name: eDefineTagUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 1048576
+ Name: eStructUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 2097152
+ Name: eLocalUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 4194304
+ Name: ePropertyUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 8388608
+ Name: eEventUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 16777216
+ Name: eTemplateUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 16777216
+ Name: eModuleUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 33554432
+ Name: eIllegalUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 67108864
+ Name: eAsynchronousUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 4161535
+ Name: eAnyIDLUsage
+ - Kind: LF_ENUM
+ Enum:
+ NumEnumerators: 30
+ Options: [ None, Nested, HasUniqueName ]
+ FieldList: 4164
+ Name: '__vc_attributes::helper_attributes::usageAttribute::usage_e'
+ UniqueName: '.?AW4usage_e@usageAttribute@helper_attributes@__vc_attributes@@'
+ UnderlyingType: 116
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4165
+ SourceFile: 4111
+ LineNumber: 51
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ 117 ]
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4163
+ Attrs: 66572
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4163
+ ThisType: 4168
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 1
+ ArgumentList: 4167
+ ThisPointerAdjustment: 0
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_NESTTYPE
+ NestedType:
+ Type: 4165
+ Name: usage_e
+ - Kind: LF_ONEMETHOD
+ OneMethod:
+ Type: 4169
+ Attrs: 3
+ VFTableOffset: -1
+ Name: usageAttribute
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 117
+ FieldOffset: 0
+ Name: value
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 3
+ Options: [ None, HasConstructorOrDestructor, ContainsNestedClass, HasUniqueName ]
+ FieldList: 4170
+ Name: '__vc_attributes::helper_attributes::usageAttribute'
+ UniqueName: '.?AUusageAttribute@helper_attributes@__vc_attributes@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 4
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4171
+ SourceFile: 4111
+ LineNumber: 49
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 0
+ Options: [ None, ForwardReference, HasUniqueName ]
+ FieldList: 0
+ Name: '__vc_attributes::helper_attributes::v1_alttypeAttribute'
+ UniqueName: '.?AUv1_alttypeAttribute@helper_attributes@__vc_attributes@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 0
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 0
+ Name: eBoolean
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 1
+ Name: eInteger
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 2
+ Name: eFloat
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 3
+ Name: eDouble
+ - Kind: LF_ENUM
+ Enum:
+ NumEnumerators: 4
+ Options: [ None, Nested, HasUniqueName ]
+ FieldList: 4174
+ Name: '__vc_attributes::helper_attributes::v1_alttypeAttribute::type_e'
+ UniqueName: '.?AW4type_e@v1_alttypeAttribute@helper_attributes@__vc_attributes@@'
+ UnderlyingType: 116
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4175
+ SourceFile: 4111
+ LineNumber: 38
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ 4175 ]
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4173
+ Attrs: 66572
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4173
+ ThisType: 4178
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 1
+ ArgumentList: 4177
+ ThisPointerAdjustment: 0
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_NESTTYPE
+ NestedType:
+ Type: 4175
+ Name: type_e
+ - Kind: LF_ONEMETHOD
+ OneMethod:
+ Type: 4179
+ Attrs: 3
+ VFTableOffset: -1
+ Name: v1_alttypeAttribute
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 4175
+ FieldOffset: 0
+ Name: type
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 3
+ Options: [ None, HasConstructorOrDestructor, ContainsNestedClass, HasUniqueName ]
+ FieldList: 4180
+ Name: '__vc_attributes::helper_attributes::v1_alttypeAttribute'
+ UniqueName: '.?AUv1_alttypeAttribute@helper_attributes@__vc_attributes@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 4
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4181
+ SourceFile: 4111
+ LineNumber: 37
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 0
+ Options: [ None, ForwardReference, HasUniqueName ]
+ FieldList: 0
+ Name: '__vc_attributes::event_sourceAttribute'
+ UniqueName: '.?AUevent_sourceAttribute@__vc_attributes@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 0
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 0
+ Name: native
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 1
+ Name: com
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 2
+ Name: managed
+ - Kind: LF_ENUM
+ Enum:
+ NumEnumerators: 3
+ Options: [ None, Nested, HasUniqueName ]
+ FieldList: 4184
+ Name: '__vc_attributes::event_sourceAttribute::type_e'
+ UniqueName: '.?AW4type_e@event_sourceAttribute@__vc_attributes@@'
+ UnderlyingType: 116
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4185
+ SourceFile: 4111
+ LineNumber: 1142
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 0
+ Name: speed
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 1
+ Name: size
+ - Kind: LF_ENUM
+ Enum:
+ NumEnumerators: 2
+ Options: [ None, Nested, HasUniqueName ]
+ FieldList: 4187
+ Name: '__vc_attributes::event_sourceAttribute::optimize_e'
+ UniqueName: '.?AW4optimize_e@event_sourceAttribute@__vc_attributes@@'
+ UnderlyingType: 116
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4188
+ SourceFile: 4111
+ LineNumber: 1145
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ 4185 ]
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4183
+ Attrs: 66572
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4183
+ ThisType: 4191
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 1
+ ArgumentList: 4190
+ ThisPointerAdjustment: 0
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4183
+ ThisType: 4191
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 0
+ ArgumentList: 4105
+ ThisPointerAdjustment: 0
+ - Kind: LF_METHODLIST
+ MethodOverloadList:
+ Methods:
+ - Type: 4192
+ Attrs: 3
+ VFTableOffset: -1
+ Name: ''
+ - Type: 4193
+ Attrs: 3
+ VFTableOffset: -1
+ Name: ''
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_NESTTYPE
+ NestedType:
+ Type: 4185
+ Name: type_e
+ - Kind: LF_NESTTYPE
+ NestedType:
+ Type: 4188
+ Name: optimize_e
+ - Kind: LF_METHOD
+ OverloadedMethod:
+ NumOverloads: 2
+ MethodList: 4194
+ Name: event_sourceAttribute
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 4185
+ FieldOffset: 0
+ Name: type
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 4188
+ FieldOffset: 4
+ Name: optimize
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 48
+ FieldOffset: 8
+ Name: decorate
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 7
+ Options: [ None, HasConstructorOrDestructor, ContainsNestedClass, HasUniqueName ]
+ FieldList: 4195
+ Name: '__vc_attributes::event_sourceAttribute'
+ UniqueName: '.?AUevent_sourceAttribute@__vc_attributes@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 12
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4196
+ SourceFile: 4111
+ LineNumber: 1141
+ - Kind: LF_STRING_ID
+ StringId:
+ Id: 0
+ String: 'C:\src\llvm-project\build'
+ - Kind: LF_STRING_ID
+ StringId:
+ Id: 0
+ String: 'C:\PROGRA~2\MICROS~1\2017\PROFES~1\VC\Tools\MSVC\14.11.25503\bin\HostX64\x64\cl.exe'
+ - Kind: LF_STRING_ID
+ StringId:
+ Id: 0
+ String: '-c -Z7 -MT -IC:\PROGRA~2\MICROS~1\2017\PROFES~1\VC\Tools\MSVC\14.11.25503\ATLMFC\include -IC:\PROGRA~2\MICROS~1\2017\PROFES~1\VC\Tools\MSVC\14.11.25503\include -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.16299.0\ucrt -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.16299.0\'
+ - Kind: LF_SUBSTR_LIST
+ StringList:
+ StringIndices: [ 4200 ]
+ - Kind: LF_STRING_ID
+ StringId:
+ Id: 4201
+ String: 'shared -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.16299.0\um -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.16299.0\winrt -TP -X'
+ - Kind: LF_STRING_ID
+ StringId:
+ Id: 0
+ String: t.cpp
+ - Kind: LF_STRING_ID
+ StringId:
+ Id: 0
+ String: 'C:\src\llvm-project\build\vc140.pdb'
+ - Kind: LF_BUILDINFO
+ BuildInfo:
+ ArgIndices: [ 4198, 4199, 4203, 4204, 4202 ]
+ - Name: '.text$mn'
+ Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+ Alignment: 16
+ SectionData: 48894C240833C0C3CCCCCCCCCCCCCCCC4883EC38B904000000E8000000004889442420488B4424204883C438C3
+ Relocations:
+ - VirtualAddress: 26
+ SymbolName: '??2@YAPEAX_K@Z'
+ Type: IMAGE_REL_AMD64_REL32
+ - Name: .xdata
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
+ Alignment: 4
+ SectionData: '0104010004620000'
+ - Name: .pdata
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
+ Alignment: 4
+ SectionData: 000000001D00000000000000
+ Relocations:
+ - VirtualAddress: 0
+ SymbolName: '$LN3'
+ Type: IMAGE_REL_AMD64_ADDR32NB
+ - VirtualAddress: 4
+ SymbolName: '$LN3'
+ Type: IMAGE_REL_AMD64_ADDR32NB
+ - VirtualAddress: 8
+ SymbolName: '$unwind$f'
+ Type: IMAGE_REL_AMD64_ADDR32NB
+symbols:
+ - Name: '@comp.id'
+ Value: 17130404
+ SectionNumber: -1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ - Name: '@feat.00'
+ Value: 2147484048
+ SectionNumber: -1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ - Name: .drectve
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 57
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 1455566745
+ Number: 0
+ - Name: '.debug$S'
+ Value: 0
+ SectionNumber: 2
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 1364
+ NumberOfRelocations: 10
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 0
+ - Name: '.debug$T'
+ Value: 0
+ SectionNumber: 3
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 6560
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 0
+ - Name: '.text$mn'
+ Value: 0
+ SectionNumber: 4
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 45
+ NumberOfRelocations: 1
+ NumberOfLinenumbers: 0
+ CheckSum: 1509507051
+ Number: 0
+ - Name: '??2@YAPEAX_K@Z'
+ Value: 0
+ SectionNumber: 4
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: f
+ Value: 16
+ SectionNumber: 4
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: '$LN3'
+ Value: 16
+ SectionNumber: 4
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_LABEL
+ - Name: .xdata
+ Value: 0
+ SectionNumber: 5
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 8
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 931692337
+ Number: 0
+ - Name: '$unwind$f'
+ Value: 0
+ SectionNumber: 5
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ - Name: .pdata
+ Value: 0
+ SectionNumber: 6
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 12
+ NumberOfRelocations: 3
+ NumberOfLinenumbers: 0
+ CheckSum: 3887998202
+ Number: 0
+ - Name: '$pdata$f'
+ Value: 0
+ SectionNumber: 6
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+...
diff --git a/test/COFF/pdb-import-gc.yaml b/test/COFF/pdb-import-gc.yaml
index 80484cb75f4f..8f50a111411c 100644
--- a/test/COFF/pdb-import-gc.yaml
+++ b/test/COFF/pdb-import-gc.yaml
@@ -1,7 +1,7 @@
# RUN: yaml2obj %s -o %t.obj
# RUN: lld-link %t.obj %S/Inputs/pdb-import-gc.lib -debug -entry:main \
-# RUN: -nodefaultlib -debug -out:%t.exe -pdb:%t.pdb
-# RUN: llvm-pdbutil dump -symbols %t.pdb | FileCheck %s
+# RUN: -nodefaultlib -opt:ref -out:%t.exe -pdb:%t.pdb
+# RUN: llvm-pdbutil dump -globals -symbols %t.pdb | FileCheck %s
# This tests the case where an __imp_ chunk is discarded by linker GC. The debug
# info may refer to the __imp_ symbol still.
@@ -11,12 +11,16 @@
# int discarded() { return __wc_mb_cur; }
# int main() { return g2; }
-# CHECK: Symbols
-# CHECK: ============================================================
-# CHECK: Mod 0000 | `{{.*}}pdb-import-gc.yaml.tmp.obj`:
-# CHECK: 4 | S_GDATA32 [size = 32] `__imp___wc_mb_cur`
-# CHECK-NEXT: type = 0x0070 (char), addr = 0000:0000
-# CHECK: Mod 0001 | `* Linker *`:
+# CHECK: Global Symbols
+# CHECK-NEXT: ============================================================
+# CHECK-NEXT: Records
+# CHECK-NEXT: 20 | S_GDATA32 [size = 32] `__imp___wc_mb_cur`
+# CHECK-NEXT: type = 0x0070 (char), addr = 0000:0000
+
+# CHECK: Symbols
+# CHECK-NEXT: ============================================================
+# CHECK-NEXT: Mod 0000 | `{{.*}}pdb-import-gc.yaml.tmp.obj`:
+# CHECK-NEXT: Mod 0001 | `* Linker *`:
--- !COFF
header:
diff --git a/test/COFF/pdb-invalid-func-type.yaml b/test/COFF/pdb-invalid-func-type.yaml
index 686079e7d8e4..219dd424c718 100644
--- a/test/COFF/pdb-invalid-func-type.yaml
+++ b/test/COFF/pdb-invalid-func-type.yaml
@@ -7,7 +7,7 @@
# RUN: llvm-pdbutil dump -symbols %t.pdb | FileCheck %s
# CHECK: Mod 0000 | `{{.*}}pdb-invalid-func-type.yaml.tmp.obj`:
-# CHECK: 4 | S_GPROC32_ID [size = 44] `main`
+# CHECK: 4 | S_GPROC32 [size = 44] `main`
# CHECK: parent = 0, end = 80, addr = 0001:0000, code size = 3
# CHECK: 48 | S_FRAMEPROC [size = 32]
# CHECK: 80 | S_END [size = 4]
diff --git a/test/COFF/pdb-lib.s b/test/COFF/pdb-lib.s
index 74d987eac814..319d4bc0fb80 100644
--- a/test/COFF/pdb-lib.s
+++ b/test/COFF/pdb-lib.s
@@ -11,15 +11,15 @@
# CHECK: Modules
# CHECK-NEXT: ============================================================
-# CHECK-NEXT: Mod 0000 | Name: `{{.*pdb-lib.s.tmp[/\\]foo.obj}}`:
+# CHECK-NEXT: Mod 0000 | `{{.*pdb-lib.s.tmp[/\\]foo.obj}}`:
# CHECK-NEXT: Obj: `{{.*pdb-lib.s.tmp[/\\]foo.obj}}`:
# CHECK-NEXT: debug stream: 9, # files: 0, has ec info: false
# CHECK-NEXT: pdb file ni: 0 ``, src file ni: 0 ``
-# CHECK-NEXT: Mod 0001 | Name: `bar.obj`:
+# CHECK-NEXT: Mod 0001 | `bar.obj`:
# CHECK-NEXT: Obj: `{{.*pdb-lib.s.tmp[/\\]bar.lib}}`:
# CHECK-NEXT: debug stream: 10, # files: 0, has ec info: false
# CHECK-NEXT: pdb file ni: 0 ``, src file ni: 0 ``
-# CHECK-NEXT: Mod 0002 | Name: `* Linker *`:
+# CHECK-NEXT: Mod 0002 | `* Linker *`:
# CHECK-NEXT: Obj: ``:
# CHECK-NEXT: debug stream: 11, # files: 0, has ec info: false
# CHECK-NEXT: pdb file ni: 1 `{{.*foo.pdb}}`, src file ni: 0 ``
diff --git a/test/COFF/pdb-linker-module.test b/test/COFF/pdb-linker-module.test
index ce366b6d6482..1bb57298f96e 100644
--- a/test/COFF/pdb-linker-module.test
+++ b/test/COFF/pdb-linker-module.test
@@ -1,18 +1,24 @@
RUN: lld-link /debug /pdb:%t.pdb /nodefaultlib /entry:main %S/Inputs/pdb-diff.obj
-RUN: llvm-pdbutil dump -modules -symbols %t.pdb | FileCheck %s
+RUN: llvm-pdbutil dump -modules %t.pdb | FileCheck --check-prefix=MODS %s
+RUN: llvm-pdbutil dump -symbols %t.pdb | FileCheck --check-prefix=SYMS %s
-CHECK: Mod 0001 | `* Linker *`:
-CHECK-NEXT: 4 | S_OBJNAME [size = 20] sig=0, `* Linker *`
-CHECK-NEXT: 24 | S_COMPILE3 [size = 40]
-CHECK-NEXT: machine = intel 80386, Ver = LLVM Linker, language = link
-CHECK-NEXT: frontend = 0.0.0.0, backend = 0.0.0.0
-CHECK-NEXT: flags = none
-CHECK-NEXT: 64 | S_ENVBLOCK
-CHECK-NEXT: - cwd
-CHECK-NEXT: -
-CHECK-NEXT: - exe
-CHECK-NEXT: - {{.*}}lld-link
-CHECK-NEXT: - pdb
-CHECK-NEXT: - {{.*}}pdb-linker-module{{.*}}pdb
-CHECK-NEXT: - cmd
-CHECK-NEXT: - /debug /pdb:{{.*}}pdb-linker-module{{.*}}pdb /nodefaultlib /entry:main {{.*}}pdb-diff.obj
+MODS: Mod 0001 | `* Linker *`
+MODS-NEXT: Obj: ``:
+MODS-NEXT: debug stream: 10, # files: 0, has ec info: false
+MODS-NEXT: pdb file ni: 1 `{{.*}}pdb-linker-module.test.tmp.pdb`, src file ni: 0 ``
+
+SYMS: Mod 0001 | `* Linker *`
+SYMS-NEXT: 4 | S_OBJNAME [size = 20] sig=0, `* Linker *`
+SYMS-NEXT: 24 | S_COMPILE3 [size = 40]
+SYMS-NEXT: machine = intel 80386, Ver = LLVM Linker, language = link
+SYMS-NEXT: frontend = 0.0.0.0, backend = 14.10.25019.0
+SYMS-NEXT: flags = none
+SYMS-NEXT: 64 | S_ENVBLOCK
+SYMS-NEXT: - cwd
+SYMS-NEXT: -
+SYMS-NEXT: - exe
+SYMS-NEXT: - {{.*}}lld-link
+SYMS-NEXT: - pdb
+SYMS-NEXT: - {{.*}}pdb-linker-module{{.*}}pdb
+SYMS-NEXT: - cmd
+SYMS-NEXT: - /debug /pdb:{{.*}}pdb-linker-module{{.*}}pdb /nodefaultlib /entry:main {{.*}}pdb-diff.obj
diff --git a/test/COFF/pdb-none.test b/test/COFF/pdb-none.test
index c1becbad7a3b..4f5ba0ebb4df 100644
--- a/test/COFF/pdb-none.test
+++ b/test/COFF/pdb-none.test
@@ -1,12 +1,13 @@
# RUN: yaml2obj < %p/Inputs/pdb1.yaml > %t1.obj
# RUN: yaml2obj < %p/Inputs/pdb2.yaml > %t2.obj
+# RUN: rm -f %t.pdb %t.dll
# RUN: lld-link /debug /debugtype:pdata /pdb:%t.pdb /dll /out:%t.dll /entry:main /nodefaultlib \
# RUN: %t1.obj %t2.obj
# RUN: llvm-pdbutil pdb2yaml -pdb-stream %t.pdb | FileCheck %s
# CHECK: PdbStream:
-# CHECK-NEXT: Age: 0
+# CHECK-NEXT: Age: 1
# CHECK-NEXT: Guid:
# CHECK-NEXT: Signature:
# CHECK-NEXT: Features: [ VC140 ]
diff --git a/test/COFF/pdb-options.test b/test/COFF/pdb-options.test
index 1468c4f1cc65..2bd1d920ee48 100644
--- a/test/COFF/pdb-options.test
+++ b/test/COFF/pdb-options.test
@@ -18,4 +18,4 @@
# RUN: lld-link /DEBUG /entry:main /nodefaultlib %t1.obj %t2.obj
# RUN: ls %t1.pdb
# RUN: rm %t*
-# RUN: cd %T/..
+# RUN: cd %T/..
diff --git a/test/COFF/pdb-procid-remapping.test b/test/COFF/pdb-procid-remapping.test
new file mode 100644
index 000000000000..cb612400a650
--- /dev/null
+++ b/test/COFF/pdb-procid-remapping.test
@@ -0,0 +1,29 @@
+# RUN: yaml2obj < %p/Inputs/pdb1.yaml > %t1.obj
+# RUN: yaml2obj < %p/Inputs/pdb2.yaml > %t2.obj
+# RUN: lld-link /debug /pdb:%t.pdb /dll /out:%t.dll /entry:main /nodefaultlib \
+# RUN: %t1.obj %t2.obj
+
+# RUN: llvm-pdbutil dump -symbols %t.pdb | FileCheck %s
+
+CHECK: Symbols
+CHECK-NEXT: ============================================================
+CHECK-LABEL: Mod 0000 |
+CHECK: 92 | S_GPROC32 [size = 44] `main`
+CHECK-NEXT: parent = 0, end = 168, addr = 0002:0000, code size = 14
+CHECK-NEXT: type = `0x1004 (int (<no type>))`, debug start = 4, debug end = 9, flags = none
+CHECK-NEXT: 136 | S_FRAMEPROC [size = 32]
+CHECK-NEXT: size = 40, padding size = 0, offset to padding = 0
+CHECK-NEXT: bytes of callee saved registers = 0, exception handler addr = 0000:0000
+CHECK-NEXT: flags = has async eh | opt speed
+CHECK-NEXT: 168 | S_END [size = 4]
+CHECK-LABEL: Mod 0001 |
+CHECK: 92 | S_GPROC32 [size = 44] `foo`
+CHECK-NEXT: parent = 0, end = 168, addr = 0002:0016, code size = 6
+CHECK-NEXT: type = `0x1001 (int ())`, debug start = 0, debug end = 5, flags = none
+CHECK-NEXT: 136 | S_FRAMEPROC [size = 32]
+CHECK-NEXT: size = 0, padding size = 0, offset to padding = 0
+CHECK-NEXT: bytes of callee saved registers = 0, exception handler addr = 0000:0000
+CHECK-NEXT: flags = has async eh | opt speed
+CHECK-NEXT: 168 | S_END [size = 4]
+CHECK-LABEL: Mod 0002 |
+CHECK: 4 | S_OBJNAME [size = 20] sig=0, `* Linker *`
diff --git a/test/COFF/pdb-publics-import.test b/test/COFF/pdb-publics-import.test
new file mode 100644
index 000000000000..1c75e905ed46
--- /dev/null
+++ b/test/COFF/pdb-publics-import.test
@@ -0,0 +1,42 @@
+Make a DLL that exports a few functions, then make a DLL with PDBs that imports
+them. Check that the __imp_ pointer and the generated thunks appear in the
+publics stream.
+
+RUN: yaml2obj < %p/Inputs/export.yaml > %t1.obj
+RUN: lld-link /out:%t1.dll /dll %t1.obj /implib:%t1.lib \
+RUN: /export:exportfn1 /export:exportfn2
+RUN: yaml2obj < %p/Inputs/import.yaml > %t2.obj
+RUN: lld-link /out:%t2.exe /pdb:%t2.pdb /debug /entry:main %t2.obj %t1.lib
+RUN: llvm-pdbutil dump %t2.pdb -publics -section-contribs | FileCheck %s
+
+CHECK: Public Symbols
+CHECK-NEXT: ============================================================
+CHECK-NEXT: Records
+CHECK-NEXT: 112 | S_PUB32 [size = 20] `main`
+CHECK-NEXT: flags = function, addr = 0001:0000
+CHECK-NEXT: 64 | S_PUB32 [size = 24] `exportfn1`
+CHECK-NEXT: flags = function, addr = 0001:0016
+CHECK-NEXT: 88 | S_PUB32 [size = 24] `exportfn2`
+CHECK-NEXT: flags = function, addr = 0001:0032
+CHECK-NEXT: 32 | S_PUB32 [size = 32] `__imp_exportfn2`
+CHECK-NEXT: flags = none, addr = 0003:0072
+CHECK-NEXT: 0 | S_PUB32 [size = 32] `__imp_exportfn1`
+CHECK-NEXT: flags = none, addr = 0003:0064
+
+CHECK: Section Contributions
+CHECK-NEXT: ============================================================
+ main
+CHECK-NEXT: SC[.text] | mod = 0, 0001:0000, size = 8, data crc = 0, reloc crc = 0
+CHECK-NEXT: IMAGE_SCN_CNT_CODE | IMAGE_SCN_ALIGN_4BYTES | IMAGE_SCN_MEM_EXECUTE |
+CHECK-NEXT: IMAGE_SCN_MEM_READ
+ exportfn1 thunk
+CHECK-NEXT: SC[.text] | mod = 1, 0001:0016, size = 6, data crc = 0, reloc crc = 0
+CHECK-NEXT: IMAGE_SCN_CNT_CODE | IMAGE_SCN_MEM_EXECUTE | IMAGE_SCN_MEM_READ
+ exportfn2 thunk
+CHECK-NEXT: SC[.text] | mod = 1, 0001:0032, size = 6, data crc = 0, reloc crc = 0
+CHECK-NEXT: IMAGE_SCN_CNT_CODE | IMAGE_SCN_MEM_EXECUTE | IMAGE_SCN_MEM_READ
+ .rdata debug directory data chunks
+CHECK-NEXT: SC[.rdata] | mod = 1, 0002:0000, size = 28, data crc = 0, reloc crc = 0
+CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ
+CHECK-NEXT: SC[.rdata] | mod = 1, 0002:0028, size = {{.*}}, data crc = 0, reloc crc = 0
+CHECK-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ
diff --git a/test/COFF/pdb-safeseh.yaml b/test/COFF/pdb-safeseh.yaml
index 24215bd11dbe..27948e38d3d3 100644
--- a/test/COFF/pdb-safeseh.yaml
+++ b/test/COFF/pdb-safeseh.yaml
@@ -1,16 +1,17 @@
# RUN: yaml2obj %s -o %t.obj
# RUN: lld-link -debug -entry:main -out:%t.exe -pdb:%t.pdb %t.obj
-# RUN: llvm-pdbutil dump -symbols %t.pdb | FileCheck %s
+# RUN: llvm-pdbutil dump -globals %t.pdb | FileCheck %s
# There is an S_GDATA32 symbol record with .secrel32 and .secidx relocations in
# it in this debug info. This is similar to the relocations in the loadcfg.obj
# file in the MSVC CRT. We need to make sure that our relocation logic matches
# MSVC's for these absolute, linker-provided symbols.
-# CHECK: Mod 0000 |
-# CHECK-NEXT: 4 | S_GDATA32 [size = 40] `___safe_se_handler_table`
-# CHECK-NEXT: type = 0x0022 (unsigned long), addr = 0003:0000
-# CHECK-NEXT: Mod 0001 | `* Linker *`:
+# CHECK: Global Symbols
+# CHECK-NEXT: ============================================================
+# CHECK-NEXT: Records
+# CHECK-NEXT: 20 | S_GDATA32 [size = 40] `___safe_se_handler_table`
+# CHECK-NEXT: type = 0x0022 (unsigned long), addr = 0003:0000
--- !COFF
header:
diff --git a/test/COFF/pdb-same-name.test b/test/COFF/pdb-same-name.test
new file mode 100644
index 000000000000..76db69fabbd6
--- /dev/null
+++ b/test/COFF/pdb-same-name.test
@@ -0,0 +1,23 @@
+# RUN: rm -rf %t1 %t2
+# RUN: mkdir %t1 %t2
+# RUN: yaml2obj < %p/Inputs/pdb1.yaml > %t1/foo.obj
+# RUN: llvm-ar cru %t1/foo.lib %t1/foo.obj
+# RUN: yaml2obj < %p/Inputs/pdb2.yaml > %t2/foo.obj
+# RUN: llvm-ar cru %t2/foo.lib %t2/foo.obj
+
+# RUN: rm -f %t.dll %t.pdb
+# RUN: lld-link /debug /pdb:%t.pdb /dll /out:%t.dll /entry:main /nodefaultlib \
+# RUN: %t1/foo.lib %t2/foo.lib
+
+# RUN: llvm-pdbutil dump -modules %t.pdb | FileCheck -check-prefix RAW %s
+
+RAW: Modules
+RAW-NEXT: ============================================================
+RAW-NEXT: Mod 0000 | `foo.obj`:
+RAW-NEXT: Obj: `{{.*}}1\foo.lib`:
+RAW-NEXT: debug stream: 9, # files: 1, has ec info: false
+RAW-NEXT: pdb file ni: 0 ``, src file ni: 0 ``
+RAW-NEXT: Mod 0001 | `foo.obj`:
+RAW-NEXT: Obj: `{{.*}}2\foo.lib`:
+RAW-NEXT: debug stream: 10, # files: 1, has ec info: false
+RAW-NEXT: pdb file ni: 0 ``, src file ni: 0 ``
diff --git a/test/COFF/pdb-scopes.test b/test/COFF/pdb-scopes.test
index 7beb59766cc5..2649167e900f 100644
--- a/test/COFF/pdb-scopes.test
+++ b/test/COFF/pdb-scopes.test
@@ -34,12 +34,12 @@ RUN: lld-link %t-a.obj %t-b.obj -debug -entry:main -nodefaultlib -out:%t.exe -pd
RUN: llvm-pdbutil dump -symbols %t.pdb | FileCheck %s
CHECK-LABEL: Mod 0000 | `{{.*}}pdb-scopes.test.tmp-a.obj`:
-CHECK: 104 | S_GPROC32_ID [size = 44] `g`
+CHECK: 104 | S_GPROC32 [size = 44] `g`
CHECK: parent = 0, end = 196, addr = 0002:0000, code size = 5
CHECK: debug start = 4, debug end = 4, flags = none
CHECK: 180 | S_REGREL32 [size = 16] `x`
CHECK: 196 | S_END [size = 4]
-CHECK: 200 | S_GPROC32_ID [size = 44] `main`
+CHECK: 200 | S_GPROC32 [size = 44] `main`
CHECK: parent = 0, end = 384, addr = 0002:0016, code size = 58
CHECK: debug start = 8, debug end = 53, flags = none
CHECK: 276 | S_REGREL32 [size = 20] `argc`
@@ -56,7 +56,7 @@ CHECK: 380 | S_END [size = 4]
CHECK: 384 | S_END [size = 4]
CHECK-LABEL: Mod 0001 | `{{.*}}pdb-scopes.test.tmp-b.obj`:
-CHECK: 104 | S_GPROC32_ID [size = 44] `f`
+CHECK: 104 | S_GPROC32 [size = 44] `f`
CHECK: parent = 0, end = 284, addr = 0002:0080, code size = 62
CHECK: debug start = 8, debug end = 57, flags = none
CHECK: 180 | S_REGREL32 [size = 16] `x`
diff --git a/test/COFF/pdb-secrel-absolute.yaml b/test/COFF/pdb-secrel-absolute.yaml
index c514e54e99f1..330106b3bbed 100644
--- a/test/COFF/pdb-secrel-absolute.yaml
+++ b/test/COFF/pdb-secrel-absolute.yaml
@@ -1,16 +1,17 @@
# RUN: yaml2obj %s -o %t.obj
# RUN: lld-link -debug -entry:main -out:%t.exe -pdb:%t.pdb %t.obj
-# RUN: llvm-pdbutil dump -symbols %t.pdb | FileCheck %s
+# RUN: llvm-pdbutil dump -globals %t.pdb | FileCheck %s
# There is an S_GDATA32 symbol record with .secrel32 and .secidx relocations in
# it in this debug info. This is similar to the relocations in the loadcfg.obj
# file in the MSVC CRT. We need to make sure that our relocation logic matches
# MSVC's for these absolute, linker-provided symbols.
-# CHECK: Mod 0000 |
-# CHECK-NEXT: 4 | S_GDATA32 [size = 36] `__guard_fids_table`
-# CHECK-NEXT: type = 0x0022 (unsigned long), addr = 0003:0000
-# CHECK-NEXT: Mod 0001 | `* Linker *`:
+# CHECK: Global Symbols
+# CHECK-NEXT: ============================================================
+# CHECK-NEXT: Records
+# CHECK-NEXT: 20 | S_GDATA32 [size = 36] `__guard_fids_table`
+# CHECK-NEXT: type = 0x0022 (unsigned long), addr = 0003:0000
--- !COFF
header:
diff --git a/test/COFF/pdb-source-lines.test b/test/COFF/pdb-source-lines.test
index f9e0e5c7487f..389d91f20efb 100644
--- a/test/COFF/pdb-source-lines.test
+++ b/test/COFF/pdb-source-lines.test
@@ -19,10 +19,11 @@ $ cl -c -Z7 pdb_lines*.c
RUN: yaml2obj %S/Inputs/pdb_lines_1.yaml -o %t.pdb_lines_1.obj
RUN: yaml2obj %S/Inputs/pdb_lines_2.yaml -o %t.pdb_lines_2.obj
+RUN: rm -f %t.exe %t.pdb
RUN: lld-link -debug -entry:main -nodefaultlib -out:%t.exe -pdb:%t.pdb %t.pdb_lines_1.obj %t.pdb_lines_2.obj
RUN: llvm-pdbutil pdb2yaml -modules -module-files -subsections=lines,fc %t.pdb | FileCheck %s
-CHECK-LABEL: DbiStream:
+CHECK-LABEL: DbiStream:
CHECK-NEXT: VerHeader: V70
CHECK-NEXT: Age: 1
CHECK-NEXT: BuildNumber: 0
@@ -30,22 +31,22 @@ CHECK-NEXT: PdbDllVersion: 0
CHECK-NEXT: PdbDllRbld: 0
CHECK-NEXT: Flags: 0
CHECK-NEXT: MachineType: x86
-CHECK-NEXT: Modules:
+CHECK-NEXT: Modules:
CHECK-LABEL: - Module: {{.*}}pdb_lines_1.obj
CHECK-NEXT: ObjFile: {{.*}}pdb_lines_1.obj
-CHECK-NEXT: SourceFiles:
+CHECK-NEXT: SourceFiles:
CHECK-NEXT: - '{{.*}}pdb_lines_1.c'
CHECK-NEXT: - '{{.*}}foo.h'
-CHECK-NEXT: Subsections:
+CHECK-NEXT: Subsections:
CHECK-NEXT: - !Lines
CHECK-NEXT: CodeSize: 19
CHECK-NEXT: Flags: [ ]
CHECK-NEXT: RelocOffset: 0
CHECK-NEXT: RelocSegment: 2
-CHECK-NEXT: Blocks:
+CHECK-NEXT: Blocks:
CHECK-NEXT: - FileName: '{{.*}}pdb_lines_1.c'
-CHECK-NEXT: Lines:
+CHECK-NEXT: Lines:
CHECK-NEXT: - Offset: 0
CHECK-NEXT: LineStart: 2
CHECK-NEXT: IsStatement: true
@@ -62,9 +63,9 @@ CHECK-NEXT: - Offset: 14
CHECK-NEXT: LineStart: 5
CHECK-NEXT: IsStatement: true
CHECK-NEXT: EndDelta: 0
-CHECK-NEXT: Columns:
+CHECK-NEXT: Columns:
CHECK-NEXT: - !FileChecksums
-CHECK-NEXT: Checksums:
+CHECK-NEXT: Checksums:
CHECK-NEXT: - FileName: '{{.*}}pdb_lines_1.c'
CHECK-NEXT: Kind: MD5
CHECK-NEXT: Checksum: 4EB19DCD86C3BA2238A255C718572E7B
@@ -76,9 +77,9 @@ CHECK-NEXT: CodeSize: 14
CHECK-NEXT: Flags: [ ]
CHECK-NEXT: RelocOffset: 32
CHECK-NEXT: RelocSegment: 2
-CHECK-NEXT: Blocks:
+CHECK-NEXT: Blocks:
CHECK-NEXT: - FileName: '{{.*}}foo.h'
-CHECK-NEXT: Lines:
+CHECK-NEXT: Lines:
CHECK-NEXT: - Offset: 0
CHECK-NEXT: LineStart: 2
CHECK-NEXT: IsStatement: true
@@ -91,21 +92,21 @@ CHECK-NEXT: - Offset: 9
CHECK-NEXT: LineStart: 4
CHECK-NEXT: IsStatement: true
CHECK-NEXT: EndDelta: 0
-CHECK-NEXT: Columns:
+CHECK-NEXT: Columns:
CHECK-LABEL: - Module: {{.*}}pdb_lines_2.obj
CHECK-NEXT: ObjFile: {{.*}}pdb_lines_2.obj
-CHECK-NEXT: SourceFiles:
+CHECK-NEXT: SourceFiles:
CHECK-NEXT: - '{{.*}}pdb_lines_2.c'
-CHECK-NEXT: Subsections:
+CHECK-NEXT: Subsections:
CHECK-NEXT: - !Lines
CHECK-NEXT: CodeSize: 1
CHECK-NEXT: Flags: [ ]
CHECK-NEXT: RelocOffset: 48
CHECK-NEXT: RelocSegment: 2
-CHECK-NEXT: Blocks:
+CHECK-NEXT: Blocks:
CHECK-NEXT: - FileName: '{{.*}}pdb_lines_2.c'
-CHECK-NEXT: Lines:
+CHECK-NEXT: Lines:
CHECK-NEXT: - Offset: 0
CHECK-NEXT: LineStart: 1
CHECK-NEXT: IsStatement: true
@@ -114,9 +115,9 @@ CHECK-NEXT: - Offset: 0
CHECK-NEXT: LineStart: 2
CHECK-NEXT: IsStatement: true
CHECK-NEXT: EndDelta: 0
-CHECK-NEXT: Columns:
+CHECK-NEXT: Columns:
CHECK-NEXT: - !FileChecksums
-CHECK-NEXT: Checksums:
+CHECK-NEXT: Checksums:
CHECK-NEXT: - FileName: '{{.*}}pdb_lines_2.c'
CHECK-NEXT: Kind: MD5
CHECK-NEXT: Checksum: DF91CB3A2B8D917486574BB50CAC4CC7
diff --git a/test/COFF/pdb-symbol-types.yaml b/test/COFF/pdb-symbol-types.yaml
index 2ad6f5b07bf4..9dad72d3cc2f 100644
--- a/test/COFF/pdb-symbol-types.yaml
+++ b/test/COFF/pdb-symbol-types.yaml
@@ -1,6 +1,6 @@
# RUN: yaml2obj %s -o %t.obj
# RUN: lld-link %t.obj -nodefaultlib -entry:main -debug -out:%t.exe -pdb:%t.pdb
-# RUN: llvm-pdbutil dump -symbols %t.pdb | FileCheck %s
+# RUN: llvm-pdbutil dump -symbols -globals %t.pdb | FileCheck %s
# To regenerate the object file:
# $ cat symbol-types.c
@@ -13,6 +13,14 @@
# Note that the type of 'global' goes from 0x1005 in the object file to 0x1004
# in the PDB because the LF_FUNC_ID is moved to the id stream.
+# CHECK-LABEL: Global Symbols
+# CHECK-NEXT: ============================================================
+# CHECK-NEXT: Records
+# CHECK-NEXT: 48 | S_PROCREF [size = 20] `main`
+# CHECK-NEXT: module = 1, sum name = 0, offset = 116
+# CHECK-NEXT: 68 | S_GDATA32 [size = 28] `global_foo`
+# CHECK-NEXT: type = 0x1004 (Foo), addr = 0001:0000
+
# CHECK: Symbols
# CHECK: ============================================================
# CHECK-LABEL: Mod 0000 | `{{.*}}pdb-symbol-types.yaml.tmp.obj`:
@@ -21,7 +29,7 @@
# CHECK: machine = intel x86-x64, Ver = Microsoft (R) Optimizing Compiler, language = c
# CHECK: frontend = 19.0.24215.1, backend = 19.0.24215.1
# CHECK: flags = security checks | hot patchable
-# CHECK: 116 | S_GPROC32_ID [size = 44] `main`
+# CHECK: 116 | S_GPROC32 [size = 44] `main`
# CHECK: parent = 0, end = 192, addr = 0002:0000, code size = 7
# CHECK: debug start = 0, debug end = 6, flags = none
# CHECK: 160 | S_FRAMEPROC [size = 32]
@@ -29,13 +37,7 @@
# CHECK: bytes of callee saved registers = 0, exception handler addr = 0000:0000
# CHECK: flags = has async eh | opt speed
# CHECK: 192 | S_END [size = 4]
-# CHECK: 196 | S_GDATA32 [size = 28] `global_foo`
-# CHECK: type = 0x1004 (Foo), addr = 0001:0000
-# CHECK: 224 | S_UDT [size = 16] `UDT_Foo`
-# CHECK: original type = 0x1004
-# CHECK: 240 | S_UDT [size = 12] `Foo`
-# CHECK: original type = 0x1004
-# CHECK: 252 | S_BUILDINFO [size = 8] BuildId = `0x100A`
+# CHECK: 196 | S_BUILDINFO [size = 8] BuildId = `0x100A`
# CHECK-LABEL: Mod 0001 | `* Linker *`:
--- !COFF
diff --git a/test/COFF/pdb-thunk.yaml b/test/COFF/pdb-thunk.yaml
new file mode 100644
index 000000000000..6435a17e8f62
--- /dev/null
+++ b/test/COFF/pdb-thunk.yaml
@@ -0,0 +1,2747 @@
+# RUN: yaml2obj %s -o %t.obj
+# RUN: lld-link %t.obj -dll -debug -noentry -nodefaultlib -debug -out:%t.exe -pdb:%t.pdb
+# RUN: llvm-pdbutil dump -symbols %t.pdb | FileCheck %s
+
+# We used to skip vtable thunk symbol records, leading to symbol scope stack
+# imbalances (PR35014). Test that they survive the object file into the PDB.
+
+# This object generated from this C++ source:
+# // t.cpp
+# struct A {
+# virtual int f();
+# };
+# struct B {
+# virtual int f();
+# };
+# struct C : A, B {
+# __declspec(dllexport) C();
+# int f() override;
+# int c;
+# };
+# int A::f() { return 0; }
+# int B::f() { return 0; }
+# int C::f() { return c; }
+# C::C() : c(42) {}
+
+# Compile as:
+# $ cl -GR- -Z7 -c t.cpp
+
+# CHECK: S_THUNK32
+# CHECK: S_END
+
+--- !COFF
+header:
+ Machine: IMAGE_FILE_MACHINE_AMD64
+ Characteristics: [ ]
+sections:
+ - Name: .drectve
+ Characteristics: [ IMAGE_SCN_LNK_INFO, IMAGE_SCN_LNK_REMOVE ]
+ Alignment: 1
+ SectionData: 2020202F44454641554C544C49423A224C4942434D5422202F44454641554C544C49423A224F4C444E414D455322202F4558504F52543A3F3F304340405145414140585A20
+ - Name: '.debug$S'
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
+ Alignment: 1
+ Subsections:
+ - !Symbols
+ Records:
+ - Kind: S_OBJNAME
+ ObjNameSym:
+ Signature: 0
+ ObjectName: 'C:\src\llvm-project\build\t.obj'
+ - Kind: S_COMPILE3
+ Compile3Sym:
+ Flags: [ SecurityChecks, HotPatch ]
+ Machine: X64
+ FrontendMajor: 19
+ FrontendMinor: 11
+ FrontendBuild: 25508
+ FrontendQFE: 2
+ BackendMajor: 19
+ BackendMinor: 11
+ BackendBuild: 25508
+ BackendQFE: 2
+ Version: 'Microsoft (R) Optimizing Compiler'
+ - !Symbols
+ Records:
+ - Kind: S_GPROC32_ID
+ ProcSym:
+ CodeSize: 8
+ DbgStart: 5
+ DbgEnd: 7
+ FunctionType: 4172
+ Flags: [ ]
+ DisplayName: 'A::f'
+ - Kind: S_FRAMEPROC
+ FrameProcSym:
+ TotalFrameBytes: 0
+ PaddingFrameBytes: 0
+ OffsetToPadding: 0
+ BytesOfCalleeSavedRegisters: 0
+ OffsetOfExceptionHandler: 0
+ SectionIdOfExceptionHandler: 0
+ Flags: [ AsynchronousExceptionHandling, OptimizedForSpeed ]
+ - Kind: S_REGREL32
+ RegRelativeSym:
+ Offset: 8
+ Type: 4097
+ Register: RSP
+ VarName: this
+ - Kind: S_PROC_ID_END
+ ScopeEndSym:
+ - !Lines
+ CodeSize: 8
+ Flags: [ ]
+ RelocOffset: 0
+ RelocSegment: 0
+ Blocks:
+ - FileName: 'c:\src\llvm-project\build\t.cpp'
+ Lines:
+ - Offset: 0
+ LineStart: 12
+ IsStatement: true
+ EndDelta: 0
+ Columns:
+ - !Symbols
+ Records:
+ - Kind: S_GPROC32_ID
+ ProcSym:
+ CodeSize: 8
+ DbgStart: 5
+ DbgEnd: 7
+ FunctionType: 4173
+ Flags: [ ]
+ DisplayName: 'B::f'
+ - Kind: S_FRAMEPROC
+ FrameProcSym:
+ TotalFrameBytes: 0
+ PaddingFrameBytes: 0
+ OffsetToPadding: 0
+ BytesOfCalleeSavedRegisters: 0
+ OffsetOfExceptionHandler: 0
+ SectionIdOfExceptionHandler: 0
+ Flags: [ AsynchronousExceptionHandling, OptimizedForSpeed ]
+ - Kind: S_REGREL32
+ RegRelativeSym:
+ Offset: 8
+ Type: 4121
+ Register: RSP
+ VarName: this
+ - Kind: S_PROC_ID_END
+ ScopeEndSym:
+ - !Lines
+ CodeSize: 8
+ Flags: [ ]
+ RelocOffset: 0
+ RelocSegment: 0
+ Blocks:
+ - FileName: 'c:\src\llvm-project\build\t.cpp'
+ Lines:
+ - Offset: 0
+ LineStart: 13
+ IsStatement: true
+ EndDelta: 0
+ Columns:
+ - !Symbols
+ Records:
+ - Kind: S_GPROC32_ID
+ ProcSym:
+ CodeSize: 89
+ DbgStart: 9
+ DbgEnd: 84
+ FunctionType: 4175
+ Flags: [ ]
+ DisplayName: 'C::C'
+ - Kind: S_FRAMEPROC
+ FrameProcSym:
+ TotalFrameBytes: 40
+ PaddingFrameBytes: 0
+ OffsetToPadding: 0
+ BytesOfCalleeSavedRegisters: 0
+ OffsetOfExceptionHandler: 0
+ SectionIdOfExceptionHandler: 0
+ Flags: [ AsynchronousExceptionHandling, OptimizedForSpeed ]
+ - Kind: S_REGREL32
+ RegRelativeSym:
+ Offset: 48
+ Type: 4143
+ Register: RSP
+ VarName: this
+ - Kind: S_PROC_ID_END
+ ScopeEndSym:
+ - !Lines
+ CodeSize: 89
+ Flags: [ ]
+ RelocOffset: 0
+ RelocSegment: 0
+ Blocks:
+ - FileName: 'c:\src\llvm-project\build\t.cpp'
+ Lines:
+ - Offset: 0
+ LineStart: 15
+ IsStatement: true
+ EndDelta: 0
+ - Offset: 67
+ LineStart: 15
+ IsStatement: true
+ EndDelta: 0
+ Columns:
+ - !Symbols
+ Records:
+ - Kind: S_GPROC32_ID
+ ProcSym:
+ CodeSize: 14
+ DbgStart: 5
+ DbgEnd: 13
+ FunctionType: 4174
+ Flags: [ ]
+ DisplayName: 'C::f'
+ - Kind: S_FRAMEPROC
+ FrameProcSym:
+ TotalFrameBytes: 0
+ PaddingFrameBytes: 0
+ OffsetToPadding: 0
+ BytesOfCalleeSavedRegisters: 0
+ OffsetOfExceptionHandler: 0
+ SectionIdOfExceptionHandler: 0
+ Flags: [ AsynchronousExceptionHandling, OptimizedForSpeed ]
+ - Kind: S_REGREL32
+ RegRelativeSym:
+ Offset: 8
+ Type: 4143
+ Register: RSP
+ VarName: this
+ - Kind: S_PROC_ID_END
+ ScopeEndSym:
+ - !Lines
+ CodeSize: 14
+ Flags: [ ]
+ RelocOffset: 0
+ RelocSegment: 0
+ Blocks:
+ - FileName: 'c:\src\llvm-project\build\t.cpp'
+ Lines:
+ - Offset: 0
+ LineStart: 14
+ IsStatement: true
+ EndDelta: 0
+ Columns:
+ - !Symbols
+ Records:
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4117
+ UDTName: A
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4268
+ UDTName: '__vc_attributes::event_sourceAttribute'
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4260
+ UDTName: '__vc_attributes::event_sourceAttribute::optimize_e'
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4257
+ UDTName: '__vc_attributes::event_sourceAttribute::type_e'
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4253
+ UDTName: '__vc_attributes::helper_attributes::v1_alttypeAttribute'
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4247
+ UDTName: '__vc_attributes::helper_attributes::v1_alttypeAttribute::type_e'
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4243
+ UDTName: '__vc_attributes::helper_attributes::usageAttribute'
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4237
+ UDTName: '__vc_attributes::helper_attributes::usageAttribute::usage_e'
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4233
+ UDTName: '__vc_attributes::threadingAttribute'
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4225
+ UDTName: '__vc_attributes::threadingAttribute::threading_e'
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4221
+ UDTName: '__vc_attributes::aggregatableAttribute'
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4213
+ UDTName: '__vc_attributes::aggregatableAttribute::type_e'
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4209
+ UDTName: '__vc_attributes::event_receiverAttribute'
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4199
+ UDTName: '__vc_attributes::event_receiverAttribute::type_e'
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4195
+ UDTName: '__vc_attributes::moduleAttribute'
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4182
+ UDTName: '__vc_attributes::moduleAttribute::type_e'
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4160
+ UDTName: C
+ - Kind: S_UDT
+ UDTSym:
+ Type: 4140
+ UDTName: B
+ - !FileChecksums
+ Checksums:
+ - FileName: 'c:\src\llvm-project\build\t.cpp'
+ Kind: MD5
+ Checksum: 1E487A6B7D4DB0A502F8E5945CCB70D1
+ - !StringTable
+ Strings:
+ - 'c:\src\llvm-project\build\t.cpp'
+ - !Symbols
+ Records:
+ - Kind: S_BUILDINFO
+ BuildInfoSym:
+ BuildId: 4281
+ Relocations:
+ - VirtualAddress: 152
+ SymbolName: '?f@A@@UEAAHXZ'
+ Type: IMAGE_REL_AMD64_SECREL
+ - VirtualAddress: 156
+ SymbolName: '?f@A@@UEAAHXZ'
+ Type: IMAGE_REL_AMD64_SECTION
+ - VirtualAddress: 228
+ SymbolName: '?f@A@@UEAAHXZ'
+ Type: IMAGE_REL_AMD64_SECREL
+ - VirtualAddress: 232
+ SymbolName: '?f@A@@UEAAHXZ'
+ Type: IMAGE_REL_AMD64_SECTION
+ - VirtualAddress: 300
+ SymbolName: '?f@B@@UEAAHXZ'
+ Type: IMAGE_REL_AMD64_SECREL
+ - VirtualAddress: 304
+ SymbolName: '?f@B@@UEAAHXZ'
+ Type: IMAGE_REL_AMD64_SECTION
+ - VirtualAddress: 376
+ SymbolName: '?f@B@@UEAAHXZ'
+ Type: IMAGE_REL_AMD64_SECREL
+ - VirtualAddress: 380
+ SymbolName: '?f@B@@UEAAHXZ'
+ Type: IMAGE_REL_AMD64_SECTION
+ - VirtualAddress: 448
+ SymbolName: '??0C@@QEAA@XZ'
+ Type: IMAGE_REL_AMD64_SECREL
+ - VirtualAddress: 452
+ SymbolName: '??0C@@QEAA@XZ'
+ Type: IMAGE_REL_AMD64_SECTION
+ - VirtualAddress: 524
+ SymbolName: '??0C@@QEAA@XZ'
+ Type: IMAGE_REL_AMD64_SECREL
+ - VirtualAddress: 528
+ SymbolName: '??0C@@QEAA@XZ'
+ Type: IMAGE_REL_AMD64_SECTION
+ - VirtualAddress: 604
+ SymbolName: '?f@C@@UEAAHXZ'
+ Type: IMAGE_REL_AMD64_SECREL
+ - VirtualAddress: 608
+ SymbolName: '?f@C@@UEAAHXZ'
+ Type: IMAGE_REL_AMD64_SECTION
+ - VirtualAddress: 680
+ SymbolName: '?f@C@@UEAAHXZ'
+ Type: IMAGE_REL_AMD64_SECREL
+ - VirtualAddress: 684
+ SymbolName: '?f@C@@UEAAHXZ'
+ Type: IMAGE_REL_AMD64_SECTION
+ - Name: '.debug$T'
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
+ Alignment: 1
+ Types:
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 0
+ Options: [ None, ForwardReference, HasUniqueName ]
+ FieldList: 0
+ Name: A
+ UniqueName: '.?AUA@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 0
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4096
+ Attrs: 66572
+ - Kind: LF_VTSHAPE
+ VFTableShape:
+ Slots:
+ - Near16
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4098
+ Attrs: 65548
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ ]
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 116
+ ClassType: 4096
+ ThisType: 4097
+ CallConv: NearC
+ Options: [ None ]
+ ParameterCount: 0
+ ArgumentList: 4100
+ ThisPointerAdjustment: 0
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4096
+ Attrs: 65676
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ 4102 ]
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4096
+ ThisType: 4097
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 1
+ ArgumentList: 4103
+ ThisPointerAdjustment: 0
+ - Kind: LF_MODIFIER
+ Modifier:
+ ModifiedType: 4096
+ Modifiers: [ None, Const ]
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4105
+ Attrs: 65580
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ 4106 ]
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4096
+ ThisType: 4097
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 1
+ ArgumentList: 4107
+ ThisPointerAdjustment: 0
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4096
+ ThisType: 4097
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 0
+ ArgumentList: 4100
+ ThisPointerAdjustment: 0
+ - Kind: LF_METHODLIST
+ MethodOverloadList:
+ Methods:
+ - Type: 4104
+ Attrs: 259
+ VFTableOffset: -1
+ Name: ''
+ - Type: 4108
+ Attrs: 259
+ VFTableOffset: -1
+ Name: ''
+ - Type: 4109
+ Attrs: 259
+ VFTableOffset: -1
+ Name: ''
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4096
+ Attrs: 65580
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 4111
+ ClassType: 4096
+ ThisType: 4097
+ CallConv: NearC
+ Options: [ None ]
+ ParameterCount: 1
+ ArgumentList: 4103
+ ThisPointerAdjustment: 0
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 4111
+ ClassType: 4096
+ ThisType: 4097
+ CallConv: NearC
+ Options: [ None ]
+ ParameterCount: 1
+ ArgumentList: 4107
+ ThisPointerAdjustment: 0
+ - Kind: LF_METHODLIST
+ MethodOverloadList:
+ Methods:
+ - Type: 4112
+ Attrs: 259
+ VFTableOffset: -1
+ Name: ''
+ - Type: 4113
+ Attrs: 259
+ VFTableOffset: -1
+ Name: ''
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_VFUNCTAB
+ VFPtr:
+ Type: 4099
+ - Kind: LF_ONEMETHOD
+ OneMethod:
+ Type: 4101
+ Attrs: 19
+ VFTableOffset: 0
+ Name: f
+ - Kind: LF_METHOD
+ OverloadedMethod:
+ NumOverloads: 3
+ MethodList: 4110
+ Name: A
+ - Kind: LF_METHOD
+ OverloadedMethod:
+ NumOverloads: 2
+ MethodList: 4114
+ Name: 'operator='
+ - Kind: LF_VTSHAPE
+ VFTableShape:
+ Slots:
+ - Near16
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 7
+ Options: [ None, HasConstructorOrDestructor, HasOverloadedOperator, HasOverloadedAssignmentOperator, HasUniqueName ]
+ FieldList: 4115
+ Name: A
+ UniqueName: '.?AUA@@'
+ DerivationList: 0
+ VTableShape: 4116
+ Size: 8
+ - Kind: LF_STRING_ID
+ StringId:
+ Id: 0
+ String: 'c:\src\llvm-project\build\t.cpp'
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4117
+ SourceFile: 4118
+ LineNumber: 1
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 0
+ Options: [ None, ForwardReference, HasUniqueName ]
+ FieldList: 0
+ Name: B
+ UniqueName: '.?AUB@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 0
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4120
+ Attrs: 66572
+ - Kind: LF_VTSHAPE
+ VFTableShape:
+ Slots:
+ - Near16
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4122
+ Attrs: 65548
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 116
+ ClassType: 4120
+ ThisType: 4121
+ CallConv: NearC
+ Options: [ None ]
+ ParameterCount: 0
+ ArgumentList: 4100
+ ThisPointerAdjustment: 0
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4120
+ Attrs: 65676
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ 4125 ]
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4120
+ ThisType: 4121
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 1
+ ArgumentList: 4126
+ ThisPointerAdjustment: 0
+ - Kind: LF_MODIFIER
+ Modifier:
+ ModifiedType: 4120
+ Modifiers: [ None, Const ]
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4128
+ Attrs: 65580
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ 4129 ]
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4120
+ ThisType: 4121
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 1
+ ArgumentList: 4130
+ ThisPointerAdjustment: 0
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4120
+ ThisType: 4121
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 0
+ ArgumentList: 4100
+ ThisPointerAdjustment: 0
+ - Kind: LF_METHODLIST
+ MethodOverloadList:
+ Methods:
+ - Type: 4127
+ Attrs: 259
+ VFTableOffset: -1
+ Name: ''
+ - Type: 4131
+ Attrs: 259
+ VFTableOffset: -1
+ Name: ''
+ - Type: 4132
+ Attrs: 259
+ VFTableOffset: -1
+ Name: ''
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4120
+ Attrs: 65580
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 4134
+ ClassType: 4120
+ ThisType: 4121
+ CallConv: NearC
+ Options: [ None ]
+ ParameterCount: 1
+ ArgumentList: 4126
+ ThisPointerAdjustment: 0
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 4134
+ ClassType: 4120
+ ThisType: 4121
+ CallConv: NearC
+ Options: [ None ]
+ ParameterCount: 1
+ ArgumentList: 4130
+ ThisPointerAdjustment: 0
+ - Kind: LF_METHODLIST
+ MethodOverloadList:
+ Methods:
+ - Type: 4135
+ Attrs: 259
+ VFTableOffset: -1
+ Name: ''
+ - Type: 4136
+ Attrs: 259
+ VFTableOffset: -1
+ Name: ''
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_VFUNCTAB
+ VFPtr:
+ Type: 4123
+ - Kind: LF_ONEMETHOD
+ OneMethod:
+ Type: 4124
+ Attrs: 19
+ VFTableOffset: 0
+ Name: f
+ - Kind: LF_METHOD
+ OverloadedMethod:
+ NumOverloads: 3
+ MethodList: 4133
+ Name: B
+ - Kind: LF_METHOD
+ OverloadedMethod:
+ NumOverloads: 2
+ MethodList: 4137
+ Name: 'operator='
+ - Kind: LF_VTSHAPE
+ VFTableShape:
+ Slots:
+ - Near16
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 7
+ Options: [ None, HasConstructorOrDestructor, HasOverloadedOperator, HasOverloadedAssignmentOperator, HasUniqueName ]
+ FieldList: 4138
+ Name: B
+ UniqueName: '.?AUB@@'
+ DerivationList: 0
+ VTableShape: 4139
+ Size: 8
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4140
+ SourceFile: 4118
+ LineNumber: 4
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 0
+ Options: [ None, ForwardReference, HasUniqueName ]
+ FieldList: 0
+ Name: C
+ UniqueName: '.?AUC@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 0
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4142
+ Attrs: 66572
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4142
+ Attrs: 65676
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ 4144 ]
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4142
+ ThisType: 4143
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 1
+ ArgumentList: 4145
+ ThisPointerAdjustment: 0
+ - Kind: LF_MODIFIER
+ Modifier:
+ ModifiedType: 4142
+ Modifiers: [ None, Const ]
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4147
+ Attrs: 65580
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ 4148 ]
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4142
+ ThisType: 4143
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 1
+ ArgumentList: 4149
+ ThisPointerAdjustment: 0
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4142
+ ThisType: 4143
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 0
+ ArgumentList: 4100
+ ThisPointerAdjustment: 0
+ - Kind: LF_METHODLIST
+ MethodOverloadList:
+ Methods:
+ - Type: 4146
+ Attrs: 259
+ VFTableOffset: -1
+ Name: ''
+ - Type: 4150
+ Attrs: 259
+ VFTableOffset: -1
+ Name: ''
+ - Type: 4151
+ Attrs: 3
+ VFTableOffset: -1
+ Name: ''
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 116
+ ClassType: 4142
+ ThisType: 4143
+ CallConv: NearC
+ Options: [ None ]
+ ParameterCount: 0
+ ArgumentList: 4100
+ ThisPointerAdjustment: 0
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4142
+ Attrs: 65580
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 4154
+ ClassType: 4142
+ ThisType: 4143
+ CallConv: NearC
+ Options: [ None ]
+ ParameterCount: 1
+ ArgumentList: 4145
+ ThisPointerAdjustment: 0
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 4154
+ ClassType: 4142
+ ThisType: 4143
+ CallConv: NearC
+ Options: [ None ]
+ ParameterCount: 1
+ ArgumentList: 4149
+ ThisPointerAdjustment: 0
+ - Kind: LF_METHODLIST
+ MethodOverloadList:
+ Methods:
+ - Type: 4155
+ Attrs: 259
+ VFTableOffset: -1
+ Name: ''
+ - Type: 4156
+ Attrs: 259
+ VFTableOffset: -1
+ Name: ''
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_BCLASS
+ BaseClass:
+ Attrs: 3
+ Type: 4096
+ Offset: 0
+ - Kind: LF_BCLASS
+ BaseClass:
+ Attrs: 3
+ Type: 4120
+ Offset: 8
+ - Kind: LF_METHOD
+ OverloadedMethod:
+ NumOverloads: 3
+ MethodList: 4152
+ Name: C
+ - Kind: LF_ONEMETHOD
+ OneMethod:
+ Type: 4153
+ Attrs: 7
+ VFTableOffset: -1
+ Name: f
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 116
+ FieldOffset: 16
+ Name: c
+ - Kind: LF_METHOD
+ OverloadedMethod:
+ NumOverloads: 2
+ MethodList: 4157
+ Name: 'operator='
+ - Kind: LF_VTSHAPE
+ VFTableShape:
+ Slots:
+ - Near16
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 9
+ Options: [ None, HasConstructorOrDestructor, HasOverloadedOperator, HasOverloadedAssignmentOperator, HasUniqueName ]
+ FieldList: 4158
+ Name: C
+ UniqueName: '.?AUC@@'
+ DerivationList: 0
+ VTableShape: 4159
+ Size: 24
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4160
+ SourceFile: 4118
+ LineNumber: 7
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4142
+ Attrs: 65548
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4142
+ ThisType: 4143
+ CallConv: NearC
+ Options: [ None ]
+ ParameterCount: 0
+ ArgumentList: 4100
+ ThisPointerAdjustment: 0
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4096
+ Attrs: 65548
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4096
+ ThisType: 4097
+ CallConv: NearC
+ Options: [ None ]
+ ParameterCount: 0
+ ArgumentList: 4100
+ ThisPointerAdjustment: 0
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4120
+ Attrs: 65548
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4120
+ ThisType: 4121
+ CallConv: NearC
+ Options: [ None ]
+ ParameterCount: 0
+ ArgumentList: 4100
+ ThisPointerAdjustment: 0
+ - Kind: LF_PROCEDURE
+ Procedure:
+ ReturnType: 3
+ CallConv: NearC
+ Options: [ None ]
+ ParameterCount: 0
+ ArgumentList: 4100
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4168
+ Attrs: 66572
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4169
+ Attrs: 65548
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4170
+ Attrs: 65548
+ - Kind: LF_MFUNC_ID
+ MemberFuncId:
+ ClassType: 4096
+ FunctionType: 4101
+ Name: f
+ - Kind: LF_MFUNC_ID
+ MemberFuncId:
+ ClassType: 4120
+ FunctionType: 4124
+ Name: f
+ - Kind: LF_MFUNC_ID
+ MemberFuncId:
+ ClassType: 4142
+ FunctionType: 4153
+ Name: f
+ - Kind: LF_MFUNC_ID
+ MemberFuncId:
+ ClassType: 4142
+ FunctionType: 4151
+ Name: '{ctor}'
+ - Kind: LF_MFUNC_ID
+ MemberFuncId:
+ ClassType: 4096
+ FunctionType: 4109
+ Name: '{ctor}'
+ - Kind: LF_MFUNC_ID
+ MemberFuncId:
+ ClassType: 4120
+ FunctionType: 4132
+ Name: '{ctor}'
+ - Kind: LF_MFUNC_ID
+ MemberFuncId:
+ ClassType: 4142
+ FunctionType: 4153
+ Name: f
+ - Kind: LF_ARRAY
+ Array:
+ ElementType: 4169
+ IndexType: 35
+ Size: 8
+ Name: ''
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 0
+ Options: [ None, ForwardReference, HasUniqueName ]
+ FieldList: 0
+ Name: '__vc_attributes::moduleAttribute'
+ UniqueName: '.?AUmoduleAttribute@__vc_attributes@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 0
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 1
+ Name: dll
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 2
+ Name: exe
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 3
+ Name: service
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 4
+ Name: unspecified
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 2
+ Name: EXE
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 3
+ Name: SERVICE
+ - Kind: LF_ENUM
+ Enum:
+ NumEnumerators: 6
+ Options: [ None, Nested, HasUniqueName ]
+ FieldList: 4181
+ Name: '__vc_attributes::moduleAttribute::type_e'
+ UniqueName: '.?AW4type_e@moduleAttribute@__vc_attributes@@'
+ UnderlyingType: 116
+ - Kind: LF_STRING_ID
+ StringId:
+ Id: 0
+ String: 'c:\src\llvm-project\build\predefined c++ attributes (compiler internal)'
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4182
+ SourceFile: 4183
+ LineNumber: 482
+ - Kind: LF_MODIFIER
+ Modifier:
+ ModifiedType: 112
+ Modifiers: [ None, Const ]
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4185
+ Attrs: 65548
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ 4182, 4186, 4186, 4186, 116, 48, 4186, 116,
+ 4186, 4186, 116, 48, 48, 4186, 4186 ]
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4180
+ Attrs: 66572
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4180
+ ThisType: 4188
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 15
+ ArgumentList: 4187
+ ThisPointerAdjustment: 0
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ 4182 ]
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4180
+ ThisType: 4188
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 1
+ ArgumentList: 4190
+ ThisPointerAdjustment: 0
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4180
+ ThisType: 4188
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 0
+ ArgumentList: 4100
+ ThisPointerAdjustment: 0
+ - Kind: LF_METHODLIST
+ MethodOverloadList:
+ Methods:
+ - Type: 4189
+ Attrs: 3
+ VFTableOffset: -1
+ Name: ''
+ - Type: 4191
+ Attrs: 3
+ VFTableOffset: -1
+ Name: ''
+ - Type: 4192
+ Attrs: 3
+ VFTableOffset: -1
+ Name: ''
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_NESTTYPE
+ NestedType:
+ Type: 4182
+ Name: type_e
+ - Kind: LF_METHOD
+ OverloadedMethod:
+ NumOverloads: 3
+ MethodList: 4193
+ Name: moduleAttribute
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 4182
+ FieldOffset: 0
+ Name: type
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 4186
+ FieldOffset: 8
+ Name: name
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 4186
+ FieldOffset: 16
+ Name: version
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 4186
+ FieldOffset: 24
+ Name: uuid
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 116
+ FieldOffset: 32
+ Name: lcid
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 48
+ FieldOffset: 36
+ Name: control
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 4186
+ FieldOffset: 40
+ Name: helpstring
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 116
+ FieldOffset: 48
+ Name: helpstringcontext
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 4186
+ FieldOffset: 56
+ Name: helpstringdll
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 4186
+ FieldOffset: 64
+ Name: helpfile
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 116
+ FieldOffset: 72
+ Name: helpcontext
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 48
+ FieldOffset: 76
+ Name: hidden
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 48
+ FieldOffset: 77
+ Name: restricted
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 4186
+ FieldOffset: 80
+ Name: custom
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 4186
+ FieldOffset: 88
+ Name: resource_name
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 19
+ Options: [ None, HasConstructorOrDestructor, ContainsNestedClass, HasUniqueName ]
+ FieldList: 4194
+ Name: '__vc_attributes::moduleAttribute'
+ UniqueName: '.?AUmoduleAttribute@__vc_attributes@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 96
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4195
+ SourceFile: 4183
+ LineNumber: 481
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 0
+ Options: [ None, ForwardReference, HasUniqueName ]
+ FieldList: 0
+ Name: '__vc_attributes::event_receiverAttribute'
+ UniqueName: '.?AUevent_receiverAttribute@__vc_attributes@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 0
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 0
+ Name: native
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 1
+ Name: com
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 2
+ Name: managed
+ - Kind: LF_ENUM
+ Enum:
+ NumEnumerators: 3
+ Options: [ None, Nested, HasUniqueName ]
+ FieldList: 4198
+ Name: '__vc_attributes::event_receiverAttribute::type_e'
+ UniqueName: '.?AW4type_e@event_receiverAttribute@__vc_attributes@@'
+ UnderlyingType: 116
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4199
+ SourceFile: 4183
+ LineNumber: 136
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ 4199, 48 ]
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4197
+ Attrs: 66572
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4197
+ ThisType: 4202
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 2
+ ArgumentList: 4201
+ ThisPointerAdjustment: 0
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ 4199 ]
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4197
+ ThisType: 4202
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 1
+ ArgumentList: 4204
+ ThisPointerAdjustment: 0
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4197
+ ThisType: 4202
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 0
+ ArgumentList: 4100
+ ThisPointerAdjustment: 0
+ - Kind: LF_METHODLIST
+ MethodOverloadList:
+ Methods:
+ - Type: 4203
+ Attrs: 3
+ VFTableOffset: -1
+ Name: ''
+ - Type: 4205
+ Attrs: 3
+ VFTableOffset: -1
+ Name: ''
+ - Type: 4206
+ Attrs: 3
+ VFTableOffset: -1
+ Name: ''
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_NESTTYPE
+ NestedType:
+ Type: 4199
+ Name: type_e
+ - Kind: LF_METHOD
+ OverloadedMethod:
+ NumOverloads: 3
+ MethodList: 4207
+ Name: event_receiverAttribute
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 4199
+ FieldOffset: 0
+ Name: type
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 48
+ FieldOffset: 4
+ Name: layout_dependent
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 6
+ Options: [ None, HasConstructorOrDestructor, ContainsNestedClass, HasUniqueName ]
+ FieldList: 4208
+ Name: '__vc_attributes::event_receiverAttribute'
+ UniqueName: '.?AUevent_receiverAttribute@__vc_attributes@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 8
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4209
+ SourceFile: 4183
+ LineNumber: 135
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 0
+ Options: [ None, ForwardReference, HasUniqueName ]
+ FieldList: 0
+ Name: '__vc_attributes::aggregatableAttribute'
+ UniqueName: '.?AUaggregatableAttribute@__vc_attributes@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 0
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 0
+ Name: never
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 1
+ Name: allowed
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 2
+ Name: always
+ - Kind: LF_ENUM
+ Enum:
+ NumEnumerators: 3
+ Options: [ None, Nested, HasUniqueName ]
+ FieldList: 4212
+ Name: '__vc_attributes::aggregatableAttribute::type_e'
+ UniqueName: '.?AW4type_e@aggregatableAttribute@__vc_attributes@@'
+ UnderlyingType: 116
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4213
+ SourceFile: 4183
+ LineNumber: 545
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ 4213 ]
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4211
+ Attrs: 66572
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4211
+ ThisType: 4216
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 1
+ ArgumentList: 4215
+ ThisPointerAdjustment: 0
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4211
+ ThisType: 4216
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 0
+ ArgumentList: 4100
+ ThisPointerAdjustment: 0
+ - Kind: LF_METHODLIST
+ MethodOverloadList:
+ Methods:
+ - Type: 4217
+ Attrs: 3
+ VFTableOffset: -1
+ Name: ''
+ - Type: 4218
+ Attrs: 3
+ VFTableOffset: -1
+ Name: ''
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_NESTTYPE
+ NestedType:
+ Type: 4213
+ Name: type_e
+ - Kind: LF_METHOD
+ OverloadedMethod:
+ NumOverloads: 2
+ MethodList: 4219
+ Name: aggregatableAttribute
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 4213
+ FieldOffset: 0
+ Name: type
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 4
+ Options: [ None, HasConstructorOrDestructor, ContainsNestedClass, HasUniqueName ]
+ FieldList: 4220
+ Name: '__vc_attributes::aggregatableAttribute'
+ UniqueName: '.?AUaggregatableAttribute@__vc_attributes@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 4
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4221
+ SourceFile: 4183
+ LineNumber: 544
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 0
+ Options: [ None, ForwardReference, HasUniqueName ]
+ FieldList: 0
+ Name: '__vc_attributes::threadingAttribute'
+ UniqueName: '.?AUthreadingAttribute@__vc_attributes@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 0
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 1
+ Name: apartment
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 2
+ Name: single
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 3
+ Name: free
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 4
+ Name: neutral
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 5
+ Name: both
+ - Kind: LF_ENUM
+ Enum:
+ NumEnumerators: 5
+ Options: [ None, Nested, HasUniqueName ]
+ FieldList: 4224
+ Name: '__vc_attributes::threadingAttribute::threading_e'
+ UniqueName: '.?AW4threading_e@threadingAttribute@__vc_attributes@@'
+ UnderlyingType: 116
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4225
+ SourceFile: 4183
+ LineNumber: 423
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ 4225 ]
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4223
+ Attrs: 66572
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4223
+ ThisType: 4228
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 1
+ ArgumentList: 4227
+ ThisPointerAdjustment: 0
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4223
+ ThisType: 4228
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 0
+ ArgumentList: 4100
+ ThisPointerAdjustment: 0
+ - Kind: LF_METHODLIST
+ MethodOverloadList:
+ Methods:
+ - Type: 4229
+ Attrs: 3
+ VFTableOffset: -1
+ Name: ''
+ - Type: 4230
+ Attrs: 3
+ VFTableOffset: -1
+ Name: ''
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_NESTTYPE
+ NestedType:
+ Type: 4225
+ Name: threading_e
+ - Kind: LF_METHOD
+ OverloadedMethod:
+ NumOverloads: 2
+ MethodList: 4231
+ Name: threadingAttribute
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 4225
+ FieldOffset: 0
+ Name: value
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 4
+ Options: [ None, HasConstructorOrDestructor, ContainsNestedClass, HasUniqueName ]
+ FieldList: 4232
+ Name: '__vc_attributes::threadingAttribute'
+ UniqueName: '.?AUthreadingAttribute@__vc_attributes@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 4
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4233
+ SourceFile: 4183
+ LineNumber: 422
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 0
+ Options: [ None, ForwardReference, HasUniqueName ]
+ FieldList: 0
+ Name: '__vc_attributes::helper_attributes::usageAttribute'
+ UniqueName: '.?AUusageAttribute@helper_attributes@__vc_attributes@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 0
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 0
+ Name: eAnyUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 1
+ Name: eCoClassUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 2
+ Name: eCOMInterfaceUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 6
+ Name: eInterfaceUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 8
+ Name: eMemberUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 16
+ Name: eMethodUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 32
+ Name: eInterfaceMethodUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 64
+ Name: eInterfaceMemberUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 128
+ Name: eCoClassMemberUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 256
+ Name: eCoClassMethodUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 768
+ Name: eGlobalMethodUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 1024
+ Name: eGlobalDataUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 2048
+ Name: eClassUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 4096
+ Name: eInterfaceParameterUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 12288
+ Name: eMethodParameterUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 16384
+ Name: eIDLModuleUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 32768
+ Name: eAnonymousUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 65536
+ Name: eTypedefUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 131072
+ Name: eUnionUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 262144
+ Name: eEnumUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 524288
+ Name: eDefineTagUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 1048576
+ Name: eStructUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 2097152
+ Name: eLocalUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 4194304
+ Name: ePropertyUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 8388608
+ Name: eEventUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 16777216
+ Name: eTemplateUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 16777216
+ Name: eModuleUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 33554432
+ Name: eIllegalUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 67108864
+ Name: eAsynchronousUsage
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 4161535
+ Name: eAnyIDLUsage
+ - Kind: LF_ENUM
+ Enum:
+ NumEnumerators: 30
+ Options: [ None, Nested, HasUniqueName ]
+ FieldList: 4236
+ Name: '__vc_attributes::helper_attributes::usageAttribute::usage_e'
+ UniqueName: '.?AW4usage_e@usageAttribute@helper_attributes@__vc_attributes@@'
+ UnderlyingType: 116
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4237
+ SourceFile: 4183
+ LineNumber: 51
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ 117 ]
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4235
+ Attrs: 66572
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4235
+ ThisType: 4240
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 1
+ ArgumentList: 4239
+ ThisPointerAdjustment: 0
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_NESTTYPE
+ NestedType:
+ Type: 4237
+ Name: usage_e
+ - Kind: LF_ONEMETHOD
+ OneMethod:
+ Type: 4241
+ Attrs: 3
+ VFTableOffset: -1
+ Name: usageAttribute
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 117
+ FieldOffset: 0
+ Name: value
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 3
+ Options: [ None, HasConstructorOrDestructor, ContainsNestedClass, HasUniqueName ]
+ FieldList: 4242
+ Name: '__vc_attributes::helper_attributes::usageAttribute'
+ UniqueName: '.?AUusageAttribute@helper_attributes@__vc_attributes@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 4
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4243
+ SourceFile: 4183
+ LineNumber: 49
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 0
+ Options: [ None, ForwardReference, HasUniqueName ]
+ FieldList: 0
+ Name: '__vc_attributes::helper_attributes::v1_alttypeAttribute'
+ UniqueName: '.?AUv1_alttypeAttribute@helper_attributes@__vc_attributes@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 0
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 0
+ Name: eBoolean
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 1
+ Name: eInteger
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 2
+ Name: eFloat
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 3
+ Name: eDouble
+ - Kind: LF_ENUM
+ Enum:
+ NumEnumerators: 4
+ Options: [ None, Nested, HasUniqueName ]
+ FieldList: 4246
+ Name: '__vc_attributes::helper_attributes::v1_alttypeAttribute::type_e'
+ UniqueName: '.?AW4type_e@v1_alttypeAttribute@helper_attributes@__vc_attributes@@'
+ UnderlyingType: 116
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4247
+ SourceFile: 4183
+ LineNumber: 38
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ 4247 ]
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4245
+ Attrs: 66572
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4245
+ ThisType: 4250
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 1
+ ArgumentList: 4249
+ ThisPointerAdjustment: 0
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_NESTTYPE
+ NestedType:
+ Type: 4247
+ Name: type_e
+ - Kind: LF_ONEMETHOD
+ OneMethod:
+ Type: 4251
+ Attrs: 3
+ VFTableOffset: -1
+ Name: v1_alttypeAttribute
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 4247
+ FieldOffset: 0
+ Name: type
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 3
+ Options: [ None, HasConstructorOrDestructor, ContainsNestedClass, HasUniqueName ]
+ FieldList: 4252
+ Name: '__vc_attributes::helper_attributes::v1_alttypeAttribute'
+ UniqueName: '.?AUv1_alttypeAttribute@helper_attributes@__vc_attributes@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 4
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4253
+ SourceFile: 4183
+ LineNumber: 37
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 0
+ Options: [ None, ForwardReference, HasUniqueName ]
+ FieldList: 0
+ Name: '__vc_attributes::event_sourceAttribute'
+ UniqueName: '.?AUevent_sourceAttribute@__vc_attributes@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 0
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 0
+ Name: native
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 1
+ Name: com
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 2
+ Name: managed
+ - Kind: LF_ENUM
+ Enum:
+ NumEnumerators: 3
+ Options: [ None, Nested, HasUniqueName ]
+ FieldList: 4256
+ Name: '__vc_attributes::event_sourceAttribute::type_e'
+ UniqueName: '.?AW4type_e@event_sourceAttribute@__vc_attributes@@'
+ UnderlyingType: 116
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4257
+ SourceFile: 4183
+ LineNumber: 1142
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 0
+ Name: speed
+ - Kind: LF_ENUMERATE
+ Enumerator:
+ Attrs: 3
+ Value: 1
+ Name: size
+ - Kind: LF_ENUM
+ Enum:
+ NumEnumerators: 2
+ Options: [ None, Nested, HasUniqueName ]
+ FieldList: 4259
+ Name: '__vc_attributes::event_sourceAttribute::optimize_e'
+ UniqueName: '.?AW4optimize_e@event_sourceAttribute@__vc_attributes@@'
+ UnderlyingType: 116
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4260
+ SourceFile: 4183
+ LineNumber: 1145
+ - Kind: LF_ARGLIST
+ ArgList:
+ ArgIndices: [ 4257 ]
+ - Kind: LF_POINTER
+ Pointer:
+ ReferentType: 4255
+ Attrs: 66572
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4255
+ ThisType: 4263
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 1
+ ArgumentList: 4262
+ ThisPointerAdjustment: 0
+ - Kind: LF_MFUNCTION
+ MemberFunction:
+ ReturnType: 3
+ ClassType: 4255
+ ThisType: 4263
+ CallConv: NearC
+ Options: [ None, Constructor ]
+ ParameterCount: 0
+ ArgumentList: 4100
+ ThisPointerAdjustment: 0
+ - Kind: LF_METHODLIST
+ MethodOverloadList:
+ Methods:
+ - Type: 4264
+ Attrs: 3
+ VFTableOffset: -1
+ Name: ''
+ - Type: 4265
+ Attrs: 3
+ VFTableOffset: -1
+ Name: ''
+ - Kind: LF_FIELDLIST
+ FieldList:
+ - Kind: LF_NESTTYPE
+ NestedType:
+ Type: 4257
+ Name: type_e
+ - Kind: LF_NESTTYPE
+ NestedType:
+ Type: 4260
+ Name: optimize_e
+ - Kind: LF_METHOD
+ OverloadedMethod:
+ NumOverloads: 2
+ MethodList: 4266
+ Name: event_sourceAttribute
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 4257
+ FieldOffset: 0
+ Name: type
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 4260
+ FieldOffset: 4
+ Name: optimize
+ - Kind: LF_MEMBER
+ DataMember:
+ Attrs: 3
+ Type: 48
+ FieldOffset: 8
+ Name: decorate
+ - Kind: LF_STRUCTURE
+ Class:
+ MemberCount: 7
+ Options: [ None, HasConstructorOrDestructor, ContainsNestedClass, HasUniqueName ]
+ FieldList: 4267
+ Name: '__vc_attributes::event_sourceAttribute'
+ UniqueName: '.?AUevent_sourceAttribute@__vc_attributes@@'
+ DerivationList: 0
+ VTableShape: 0
+ Size: 12
+ - Kind: LF_UDT_SRC_LINE
+ UdtSourceLine:
+ UDT: 4268
+ SourceFile: 4183
+ LineNumber: 1141
+ - Kind: LF_VFTABLE
+ VFTable:
+ CompleteClass: 4117
+ OverriddenVFTable: 0
+ VFPtrOffset: 0
+ MethodNames:
+ - '??_7A@@6B@'
+ - '?f@A@@UEAAHXZ'
+ - Kind: LF_VFTABLE
+ VFTable:
+ CompleteClass: 4140
+ OverriddenVFTable: 0
+ VFPtrOffset: 0
+ MethodNames:
+ - '??_7B@@6B@'
+ - '?f@B@@UEAAHXZ'
+ - Kind: LF_VFTABLE
+ VFTable:
+ CompleteClass: 4160
+ OverriddenVFTable: 4270
+ VFPtrOffset: 0
+ MethodNames:
+ - '??_7C@@6BA@@@'
+ - '?f@C@@UEAAHXZ'
+ - Kind: LF_VFTABLE
+ VFTable:
+ CompleteClass: 4160
+ OverriddenVFTable: 4271
+ VFPtrOffset: 8
+ MethodNames:
+ - '??_7C@@6BB@@@'
+ - '?f@C@@W7EAAHXZ'
+ - Kind: LF_STRING_ID
+ StringId:
+ Id: 0
+ String: 'C:\src\llvm-project\build'
+ - Kind: LF_STRING_ID
+ StringId:
+ Id: 0
+ String: 'C:\PROGRA~2\MICROS~1\2017\PROFES~1\VC\Tools\MSVC\14.11.25503\bin\HostX64\x64\cl.exe'
+ - Kind: LF_STRING_ID
+ StringId:
+ Id: 0
+ String: '-GR- -Z7 -c -MT -IC:\PROGRA~2\MICROS~1\2017\PROFES~1\VC\Tools\MSVC\14.11.25503\ATLMFC\include -IC:\PROGRA~2\MICROS~1\2017\PROFES~1\VC\Tools\MSVC\14.11.25503\include -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.16299.0\ucrt -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.162'
+ - Kind: LF_SUBSTR_LIST
+ StringList:
+ StringIndices: [ 4276 ]
+ - Kind: LF_STRING_ID
+ StringId:
+ Id: 4277
+ String: '99.0\shared -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.16299.0\um -IC:\PROGRA~2\WI3CF2~1\10\include\10.0.16299.0\winrt -TP -X'
+ - Kind: LF_STRING_ID
+ StringId:
+ Id: 0
+ String: t.cpp
+ - Kind: LF_STRING_ID
+ StringId:
+ Id: 0
+ String: 'C:\src\llvm-project\build\vc140.pdb'
+ - Kind: LF_BUILDINFO
+ BuildInfo:
+ ArgIndices: [ 4274, 4275, 4279, 4280, 4278 ]
+ - Name: '.text$mn'
+ Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+ Alignment: 16
+ SectionData: 48894C240833C0C3CCCCCCCCCCCCCCCC48894C240833C0C3CCCCCCCCCCCCCCCC48894C24084883EC28488B4C2430E800000000488B4424304883C008488BC8E800000000488B442430488D0D00000000488908488B442430488D0D0000000048894808488B442430C740102A000000488B4424304883C428C3CCCCCCCCCCCCCC48894C2408488B4424088B4010C3
+ Relocations:
+ - VirtualAddress: 47
+ SymbolName: '??0A@@QEAA@XZ'
+ Type: IMAGE_REL_AMD64_REL32
+ - VirtualAddress: 64
+ SymbolName: '??0B@@QEAA@XZ'
+ Type: IMAGE_REL_AMD64_REL32
+ - VirtualAddress: 76
+ SymbolName: '??_7C@@6BA@@@'
+ Type: IMAGE_REL_AMD64_REL32
+ - VirtualAddress: 91
+ SymbolName: '??_7C@@6BB@@@'
+ Type: IMAGE_REL_AMD64_REL32
+ - Name: '.text$mn'
+ Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+ Alignment: 16
+ SectionData: 48894C2408488B442408488D0D00000000488908488B442408C3
+ Relocations:
+ - VirtualAddress: 13
+ SymbolName: '??_7A@@6B@'
+ Type: IMAGE_REL_AMD64_REL32
+ - Name: '.debug$S'
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
+ Alignment: 1
+ Subsections:
+ - !Symbols
+ Records:
+ - Kind: S_GPROC32_ID
+ ProcSym:
+ CodeSize: 26
+ DbgStart: 5
+ DbgEnd: 25
+ FunctionType: 4176
+ Flags: [ ]
+ DisplayName: 'A::A'
+ - Kind: S_FRAMEPROC
+ FrameProcSym:
+ TotalFrameBytes: 0
+ PaddingFrameBytes: 0
+ OffsetToPadding: 0
+ BytesOfCalleeSavedRegisters: 0
+ OffsetOfExceptionHandler: 0
+ SectionIdOfExceptionHandler: 0
+ Flags: [ MarkedInline, AsynchronousExceptionHandling, OptimizedForSpeed ]
+ - Kind: S_REGREL32
+ RegRelativeSym:
+ Offset: 8
+ Type: 4097
+ Register: RSP
+ VarName: this
+ - Kind: S_PROC_ID_END
+ ScopeEndSym:
+ Relocations:
+ - VirtualAddress: 44
+ SymbolName: '??0A@@QEAA@XZ'
+ Type: IMAGE_REL_AMD64_SECREL
+ - VirtualAddress: 48
+ SymbolName: '??0A@@QEAA@XZ'
+ Type: IMAGE_REL_AMD64_SECTION
+ - Name: '.text$mn'
+ Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+ Alignment: 16
+ SectionData: 48894C2408488B442408488D0D00000000488908488B442408C3
+ Relocations:
+ - VirtualAddress: 13
+ SymbolName: '??_7B@@6B@'
+ Type: IMAGE_REL_AMD64_REL32
+ - Name: '.debug$S'
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
+ Alignment: 1
+ Subsections:
+ - !Symbols
+ Records:
+ - Kind: S_GPROC32_ID
+ ProcSym:
+ CodeSize: 26
+ DbgStart: 5
+ DbgEnd: 25
+ FunctionType: 4177
+ Flags: [ ]
+ DisplayName: 'B::B'
+ - Kind: S_FRAMEPROC
+ FrameProcSym:
+ TotalFrameBytes: 0
+ PaddingFrameBytes: 0
+ OffsetToPadding: 0
+ BytesOfCalleeSavedRegisters: 0
+ OffsetOfExceptionHandler: 0
+ SectionIdOfExceptionHandler: 0
+ Flags: [ MarkedInline, AsynchronousExceptionHandling, OptimizedForSpeed ]
+ - Kind: S_REGREL32
+ RegRelativeSym:
+ Offset: 8
+ Type: 4121
+ Register: RSP
+ VarName: this
+ - Kind: S_PROC_ID_END
+ ScopeEndSym:
+ Relocations:
+ - VirtualAddress: 44
+ SymbolName: '??0B@@QEAA@XZ'
+ Type: IMAGE_REL_AMD64_SECREL
+ - VirtualAddress: 48
+ SymbolName: '??0B@@QEAA@XZ'
+ Type: IMAGE_REL_AMD64_SECTION
+ - Name: '.text$mn'
+ Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+ Alignment: 4
+ SectionData: 4883E908E900000000
+ Relocations:
+ - VirtualAddress: 5
+ SymbolName: '?f@C@@UEAAHXZ'
+ Type: IMAGE_REL_AMD64_REL32
+ - Name: '.debug$S'
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
+ Alignment: 1
+ Subsections:
+ - !Symbols
+ Records:
+ - Kind: S_THUNK32
+ Thunk32Sym:
+ Parent: 0
+ End: 0
+ Next: 0
+ Off: 0
+ Seg: 0
+ Len: 9
+ Ordinal: Pcode
+ - Kind: S_FRAMEPROC
+ FrameProcSym:
+ TotalFrameBytes: 0
+ PaddingFrameBytes: 0
+ OffsetToPadding: 0
+ BytesOfCalleeSavedRegisters: 0
+ OffsetOfExceptionHandler: 0
+ SectionIdOfExceptionHandler: 0
+ Flags: [ MarkedInline, Naked, AsynchronousExceptionHandling ]
+ - Kind: S_PROC_ID_END
+ ScopeEndSym:
+ Relocations:
+ - VirtualAddress: 28
+ SymbolName: '?f@C@@W7EAAHXZ'
+ Type: IMAGE_REL_AMD64_SECREL
+ - VirtualAddress: 32
+ SymbolName: '?f@C@@W7EAAHXZ'
+ Type: IMAGE_REL_AMD64_SECTION
+ - Name: .xdata
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
+ Alignment: 4
+ SectionData: '0109010009420000'
+ - Name: .pdata
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
+ Alignment: 4
+ SectionData: '000000005900000000000000'
+ Relocations:
+ - VirtualAddress: 0
+ SymbolName: '$LN3'
+ Type: IMAGE_REL_AMD64_ADDR32NB
+ - VirtualAddress: 4
+ SymbolName: '$LN3'
+ Type: IMAGE_REL_AMD64_ADDR32NB
+ - VirtualAddress: 8
+ SymbolName: '$unwind$??0C@@QEAA@XZ'
+ Type: IMAGE_REL_AMD64_ADDR32NB
+ - Name: .rdata
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_READ ]
+ Alignment: 8
+ SectionData: '0000000000000000'
+ Relocations:
+ - VirtualAddress: 0
+ SymbolName: '?f@A@@UEAAHXZ'
+ Type: IMAGE_REL_AMD64_ADDR64
+ - Name: .rdata
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_READ ]
+ Alignment: 8
+ SectionData: '0000000000000000'
+ Relocations:
+ - VirtualAddress: 0
+ SymbolName: '?f@B@@UEAAHXZ'
+ Type: IMAGE_REL_AMD64_ADDR64
+ - Name: .rdata
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_READ ]
+ Alignment: 8
+ SectionData: '0000000000000000'
+ Relocations:
+ - VirtualAddress: 0
+ SymbolName: '?f@C@@UEAAHXZ'
+ Type: IMAGE_REL_AMD64_ADDR64
+ - Name: .rdata
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_READ ]
+ Alignment: 8
+ SectionData: '0000000000000000'
+ Relocations:
+ - VirtualAddress: 0
+ SymbolName: '?f@C@@W7EAAHXZ'
+ Type: IMAGE_REL_AMD64_ADDR64
+ - Name: '.debug$S'
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
+ Alignment: 1
+ Subsections:
+ - !Symbols
+ Records:
+ - Kind: S_GDATA32
+ DataSym:
+ Type: 4179
+ DisplayName: 'A::`vftable'''
+ Relocations:
+ - VirtualAddress: 20
+ SymbolName: '??_7A@@6B@'
+ Type: IMAGE_REL_AMD64_SECREL
+ - VirtualAddress: 24
+ SymbolName: '??_7A@@6B@'
+ Type: IMAGE_REL_AMD64_SECTION
+ - Name: '.debug$S'
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
+ Alignment: 1
+ Subsections:
+ - !Symbols
+ Records:
+ - Kind: S_GDATA32
+ DataSym:
+ Type: 4179
+ DisplayName: 'B::`vftable'''
+ Relocations:
+ - VirtualAddress: 20
+ SymbolName: '??_7B@@6B@'
+ Type: IMAGE_REL_AMD64_SECREL
+ - VirtualAddress: 24
+ SymbolName: '??_7B@@6B@'
+ Type: IMAGE_REL_AMD64_SECTION
+ - Name: '.debug$S'
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
+ Alignment: 1
+ Subsections:
+ - !Symbols
+ Records:
+ - Kind: S_GDATA32
+ DataSym:
+ Type: 4179
+ DisplayName: 'C::`vftable'''
+ Relocations:
+ - VirtualAddress: 20
+ SymbolName: '??_7C@@6BA@@@'
+ Type: IMAGE_REL_AMD64_SECREL
+ - VirtualAddress: 24
+ SymbolName: '??_7C@@6BA@@@'
+ Type: IMAGE_REL_AMD64_SECTION
+ - Name: '.debug$S'
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
+ Alignment: 1
+ Subsections:
+ - !Symbols
+ Records:
+ - Kind: S_GDATA32
+ DataSym:
+ Type: 4179
+ DisplayName: 'C::`vftable'''
+ Relocations:
+ - VirtualAddress: 20
+ SymbolName: '??_7C@@6BB@@@'
+ Type: IMAGE_REL_AMD64_SECREL
+ - VirtualAddress: 24
+ SymbolName: '??_7C@@6BB@@@'
+ Type: IMAGE_REL_AMD64_SECTION
+symbols:
+ - Name: '@comp.id'
+ Value: 17130404
+ SectionNumber: -1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ - Name: '@feat.00'
+ Value: 2147484048
+ SectionNumber: -1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ - Name: .drectve
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 69
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 876125206
+ Number: 0
+ - Name: '.debug$S'
+ Value: 0
+ SectionNumber: 2
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 1668
+ NumberOfRelocations: 16
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 0
+ - Name: '.debug$T'
+ Value: 0
+ SectionNumber: 3
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 8276
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 0
+ - Name: '.text$mn'
+ Value: 0
+ SectionNumber: 4
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 142
+ NumberOfRelocations: 4
+ NumberOfLinenumbers: 0
+ CheckSum: 1906691115
+ Number: 0
+ - Name: '.text$mn'
+ Value: 0
+ SectionNumber: 5
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 26
+ NumberOfRelocations: 1
+ NumberOfLinenumbers: 0
+ CheckSum: 2299407997
+ Number: 0
+ Selection: IMAGE_COMDAT_SELECT_ANY
+ - Name: '.debug$S'
+ Value: 0
+ SectionNumber: 6
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 112
+ NumberOfRelocations: 2
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 5
+ Selection: IMAGE_COMDAT_SELECT_ASSOCIATIVE
+ - Name: '.text$mn'
+ Value: 0
+ SectionNumber: 7
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 26
+ NumberOfRelocations: 1
+ NumberOfLinenumbers: 0
+ CheckSum: 2299407997
+ Number: 0
+ Selection: IMAGE_COMDAT_SELECT_ANY
+ - Name: '.debug$S'
+ Value: 0
+ SectionNumber: 8
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 112
+ NumberOfRelocations: 2
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 7
+ Selection: IMAGE_COMDAT_SELECT_ASSOCIATIVE
+ - Name: '.text$mn'
+ Value: 0
+ SectionNumber: 9
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 9
+ NumberOfRelocations: 1
+ NumberOfLinenumbers: 0
+ CheckSum: 3880904481
+ Number: 0
+ Selection: IMAGE_COMDAT_SELECT_ANY
+ - Name: '.debug$S'
+ Value: 0
+ SectionNumber: 10
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 100
+ NumberOfRelocations: 2
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 9
+ Selection: IMAGE_COMDAT_SELECT_ASSOCIATIVE
+ - Name: '?f@A@@UEAAHXZ'
+ Value: 0
+ SectionNumber: 4
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: '??0A@@QEAA@XZ'
+ Value: 0
+ SectionNumber: 5
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: '?f@B@@UEAAHXZ'
+ Value: 16
+ SectionNumber: 4
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: '??0B@@QEAA@XZ'
+ Value: 0
+ SectionNumber: 7
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: '??0C@@QEAA@XZ'
+ Value: 32
+ SectionNumber: 4
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: '?f@C@@UEAAHXZ'
+ Value: 128
+ SectionNumber: 4
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: '?f@C@@W7EAAHXZ'
+ Value: 0
+ SectionNumber: 9
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: '$LN3'
+ Value: 32
+ SectionNumber: 4
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_LABEL
+ - Name: .xdata
+ Value: 0
+ SectionNumber: 11
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 8
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 2625142988
+ Number: 0
+ - Name: '$unwind$??0C@@QEAA@XZ'
+ Value: 0
+ SectionNumber: 11
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ - Name: .pdata
+ Value: 0
+ SectionNumber: 12
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 12
+ NumberOfRelocations: 3
+ NumberOfLinenumbers: 0
+ CheckSum: 1248454893
+ Number: 0
+ - Name: '$pdata$??0C@@QEAA@XZ'
+ Value: 0
+ SectionNumber: 12
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ - Name: .rdata
+ Value: 0
+ SectionNumber: 13
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 8
+ NumberOfRelocations: 1
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 0
+ Selection: IMAGE_COMDAT_SELECT_ANY
+ - Name: '??_7A@@6B@'
+ Value: 0
+ SectionNumber: 13
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: .rdata
+ Value: 0
+ SectionNumber: 14
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 8
+ NumberOfRelocations: 1
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 0
+ Selection: IMAGE_COMDAT_SELECT_ANY
+ - Name: '??_7B@@6B@'
+ Value: 0
+ SectionNumber: 14
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: .rdata
+ Value: 0
+ SectionNumber: 15
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 8
+ NumberOfRelocations: 1
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 0
+ Selection: IMAGE_COMDAT_SELECT_ANY
+ - Name: '??_7C@@6BA@@@'
+ Value: 0
+ SectionNumber: 15
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: .rdata
+ Value: 0
+ SectionNumber: 16
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 8
+ NumberOfRelocations: 1
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 0
+ Selection: IMAGE_COMDAT_SELECT_ANY
+ - Name: '??_7C@@6BB@@@'
+ Value: 0
+ SectionNumber: 16
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: '.debug$S'
+ Value: 0
+ SectionNumber: 17
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 40
+ NumberOfRelocations: 2
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 13
+ Selection: IMAGE_COMDAT_SELECT_ASSOCIATIVE
+ - Name: '.debug$S'
+ Value: 0
+ SectionNumber: 18
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 40
+ NumberOfRelocations: 2
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 14
+ Selection: IMAGE_COMDAT_SELECT_ASSOCIATIVE
+ - Name: '.debug$S'
+ Value: 0
+ SectionNumber: 19
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 40
+ NumberOfRelocations: 2
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 15
+ Selection: IMAGE_COMDAT_SELECT_ASSOCIATIVE
+ - Name: '.debug$S'
+ Value: 0
+ SectionNumber: 20
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 40
+ NumberOfRelocations: 2
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 16
+ Selection: IMAGE_COMDAT_SELECT_ASSOCIATIVE
+...
+
diff --git a/test/COFF/pdb-type-server-simple.test b/test/COFF/pdb-type-server-simple.test
index c0de4e390914..898c5d4aa130 100644
--- a/test/COFF/pdb-type-server-simple.test
+++ b/test/COFF/pdb-type-server-simple.test
@@ -21,7 +21,7 @@ RUN: yaml2obj %S/Inputs/pdb-type-server-simple-a.yaml -o a.obj
RUN: yaml2obj %S/Inputs/pdb-type-server-simple-b.yaml -o b.obj
RUN: llvm-pdbutil yaml2pdb %S/Inputs/pdb-type-server-simple-ts.yaml -pdb ts.pdb
RUN: lld-link a.obj b.obj -entry:main -debug -out:t.exe -pdb:t.pdb -nodefaultlib
-RUN: llvm-pdbutil dump -symbols -types -ids %t/t.pdb | FileCheck %s
+RUN: llvm-pdbutil dump -symbols -types -ids -globals %t/t.pdb | FileCheck %s
CHECK-LABEL: Types (TPI Stream)
@@ -59,23 +59,29 @@ CHECK: {{.*}}: `a.c`
CHECK: [[B_BUILD:[^ ]*]] | LF_BUILDINFO [size = 28]
CHECK: {{.*}}: `b.c`
+CHECK-LABEL: Global Symbols
+CHECK: ============================================================
+CHECK-NEXT: Records
+CHECK-NEXT: 36 | S_PROCREF [size = 20] `main`
+CHECK-NEXT: module = 1, sum name = 0, offset = 104
+CHECK-NEXT: 56 | S_PROCREF [size = 16] `g`
+CHECK-NEXT: module = 2, sum name = 0, offset = 104
+
CHECK-LABEL: Symbols
CHECK: ============================================================
CHECK-LABEL: Mod 0000 | `{{.*}}a.obj`:
CHECK: 4 | S_OBJNAME [size = 40] sig=0, `C:\src\llvm-project\build\a.obj`
-CHECK: 104 | S_GPROC32_ID [size = 44] `main`
+CHECK: 104 | S_GPROC32 [size = 44] `main`
CHECK: parent = 0, end = 196, addr = 0002:0000, code size = 27
CHECK: type = {{.*}}, debug start = 4, debug end = 22, flags = none
-CHECK: 200 | S_UDT [size = 12] `Foo`
-CHECK: original type = [[FOO_COMPLETE]]
-CHECK: 212 | S_BUILDINFO [size = 8] BuildId = `[[A_BUILD]]`
+CHECK: 200 | S_BUILDINFO [size = 8] BuildId = `[[A_BUILD]]`
CHECK-LABEL: Mod 0001 | `{{.*}}b.obj`:
CHECK: 4 | S_OBJNAME [size = 40] sig=0, `C:\src\llvm-project\build\b.obj`
CHECK: 44 | S_COMPILE3 [size = 60]
CHECK: machine = intel x86-x64, Ver = Microsoft (R) Optimizing Compiler, language = c
CHECK: frontend = 19.0.24215.1, backend = 19.0.24215.1
CHECK: flags = security checks | hot patchable
-CHECK: 104 | S_GPROC32_ID [size = 44] `g`
+CHECK: 104 | S_GPROC32 [size = 44] `g`
CHECK: parent = 0, end = 196, addr = 0002:0032, code size = 13
CHECK: type = {{.*}}, debug start = 5, debug end = 12, flags = none
CHECK: 148 | S_FRAMEPROC [size = 32]
@@ -83,9 +89,7 @@ CHECK: size = 0, padding size = 0, offset to padding = 0
CHECK: bytes of callee saved registers = 0, exception handler addr = 0000:0000
CHECK: flags = has async eh | opt speed
CHECK: 180 | S_REGREL32 [size = 16] `p`
-CHECK: type = [[FOO_PTR]] (Foo*), register = rsp, offset = 8
+CHECK: type = [[FOO_PTR]] (Foo*), register = RSP, offset = 8
CHECK: 196 | S_END [size = 4]
-CHECK: 200 | S_UDT [size = 12] `Foo`
-CHECK: original type = [[FOO_COMPLETE]]
-CHECK: 212 | S_BUILDINFO [size = 8] BuildId = `[[B_BUILD]]`
+CHECK: 200 | S_BUILDINFO [size = 8] BuildId = `[[B_BUILD]]`
CHECK-LABEL: Mod 0002 | `* Linker *`:
diff --git a/test/COFF/pdb.test b/test/COFF/pdb.test
index a4cd4f7c35b3..dad6de25db58 100644
--- a/test/COFF/pdb.test
+++ b/test/COFF/pdb.test
@@ -1,13 +1,15 @@
# RUN: yaml2obj < %p/Inputs/pdb1.yaml > %t1.obj
# RUN: yaml2obj < %p/Inputs/pdb2.yaml > %t2.obj
+# RUN: rm -f %t.dll %t.pdb
# RUN: lld-link /debug /pdb:%t.pdb /dll /out:%t.dll /entry:main /nodefaultlib \
# RUN: %t1.obj %t2.obj
# RUN: llvm-pdbutil pdb2yaml -stream-metadata -stream-directory -pdb-stream \
# RUN: -dbi-stream -ipi-stream -tpi-stream %t.pdb | FileCheck %s
-# RUN: llvm-pdbutil dump -modules -section-map -section-contribs \
-# RUN: -types -ids %t.pdb | FileCheck -check-prefix RAW %s
+# RUN: llvm-pdbutil dump -modules -section-map -section-contribs -section-headers \
+# RUN: -publics -public-extras -types -ids -type-extras -id-extras %t.pdb \
+# RUN: | FileCheck -check-prefix RAW %s
# CHECK: MSF:
# CHECK-NEXT: SuperBlock:
@@ -117,86 +119,170 @@
RAW: Modules
RAW-NEXT: ============================================================
-RAW-NEXT: Mod 0000 | Name: `{{.*}}pdb.test.tmp1.obj`:
+RAW-NEXT: Mod 0000 | `{{.*}}pdb.test.tmp1.obj`:
RAW-NEXT: Obj: `{{.*}}pdb.test.tmp1.obj`:
RAW-NEXT: debug stream: 9, # files: 1, has ec info: false
RAW-NEXT: pdb file ni: 0 ``, src file ni: 0 ``
-RAW-NEXT: Mod 0001 | Name: `{{.*}}pdb.test.tmp2.obj`:
+RAW-NEXT: Mod 0001 | `{{.*}}pdb.test.tmp2.obj`:
RAW-NEXT: Obj: `{{.*}}pdb.test.tmp2.obj`:
RAW-NEXT: debug stream: 10, # files: 1, has ec info: false
RAW-NEXT: pdb file ni: 0 ``, src file ni: 0 ``
-RAW-NEXT: Mod 0002 | Name: `* Linker *`:
+RAW-NEXT: Mod 0002 | `* Linker *`:
RAW-NEXT: Obj: ``:
RAW-NEXT: debug stream: 11, # files: 0, has ec info: false
RAW-NEXT: pdb file ni: 1 `{{.*pdb.test.tmp.pdb}}`, src file ni: 0 ``
RAW: Types (TPI Stream)
RAW-NEXT: ============================================================
RAW-NEXT: Showing 5 records
-RAW-NEXT: 0x1000 | LF_ARGLIST [size = 8]
-RAW-NEXT: 0x1001 | LF_PROCEDURE [size = 16]
+RAW-NEXT: 0x1000 | LF_ARGLIST [size = 8, hash = 0xEC0]
+RAW-NEXT: 0x1001 | LF_PROCEDURE [size = 16, hash = 0x7BC]
RAW-NEXT: return type = 0x0074 (int), # args = 0, param list = 0x1000
RAW-NEXT: calling conv = cdecl, options = None
-RAW-NEXT: 0x1002 | LF_POINTER [size = 12]
+RAW-NEXT: 0x1002 | LF_POINTER [size = 12, hash = 0x884]
RAW-NEXT: referent = 0x1001, mode = pointer, opts = None, kind = ptr64
-RAW-NEXT: 0x1003 | LF_ARGLIST [size = 12]
+RAW-NEXT: 0x1003 | LF_ARGLIST [size = 12, hash = 0x936]
RAW-NEXT: <no type>: ``
-RAW-NEXT: 0x1004 | LF_PROCEDURE [size = 16]
+RAW-NEXT: 0x1004 | LF_PROCEDURE [size = 16, hash = 0x852]
RAW-NEXT: return type = 0x0074 (int), # args = 0, param list = 0x1003
RAW-NEXT: calling conv = cdecl, options = None
RAW: Types (IPI Stream)
RAW-NEXT: ============================================================
RAW-NEXT: Showing 12 records
-RAW-NEXT: 0x1000 | LF_FUNC_ID [size = 20]
+RAW-NEXT: 0x1000 | LF_FUNC_ID [size = 20, hash = 0x330]
RAW-NEXT: name = main, type = 0x1004, parent scope = <no type>
-RAW-NEXT: 0x1001 | LF_FUNC_ID [size = 16]
+RAW-NEXT: 0x1001 | LF_FUNC_ID [size = 16, hash = 0x120]
RAW-NEXT: name = foo, type = 0x1001, parent scope = <no type>
-RAW-NEXT: 0x1002 | LF_STRING_ID [size = 16] ID: <no type>, String: D:\b
-RAW-NEXT: 0x1003 | LF_STRING_ID [size = 36] ID: <no type>, String: C:\vs14\VC\BIN\amd64\cl.exe
-RAW-NEXT: 0x1004 | LF_STRING_ID [size = 260] ID: <no type>, String: -Z7 -c -MT -IC:\vs14\VC\INCLUDE -IC:\vs14\VC\ATLMFC\INCLUDE -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.10150.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\shared"
-RAW-NEXT: 0x1005 | LF_SUBSTR_LIST [size = 12]
+RAW-NEXT: 0x1002 | LF_STRING_ID [size = 16, hash = 0x757] ID: <no type>, String: D:\b
+RAW-NEXT: 0x1003 | LF_STRING_ID [size = 36, hash = 0xC3A] ID: <no type>, String: C:\vs14\VC\BIN\amd64\cl.exe
+RAW-NEXT: 0x1004 | LF_STRING_ID [size = 260, hash = 0x433] ID: <no type>, String: -Z7 -c -MT -IC:\vs14\VC\INCLUDE -IC:\vs14\VC\ATLMFC\INCLUDE -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.10150.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\shared"
+RAW-NEXT: 0x1005 | LF_SUBSTR_LIST [size = 12, hash = 0x759]
RAW-NEXT: 0x1004: `-Z7 -c -MT -IC:\vs14\VC\INCLUDE -IC:\vs14\VC\ATLMFC\INCLUDE -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.10150.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\shared"`
-RAW-NEXT: 0x1006 | LF_STRING_ID [size = 132] ID: 0x1005, String: -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" -TC -X
-RAW-NEXT: 0x1007 | LF_STRING_ID [size = 24] ID: <no type>, String: ret42-main.c
-RAW-NEXT: 0x1008 | LF_STRING_ID [size = 24] ID: <no type>, String: D:\b\vc140.pdb
-RAW-NEXT: 0x1009 | LF_BUILDINFO [size = 28]
+RAW-NEXT: 0x1006 | LF_STRING_ID [size = 132, hash = 0xF57] ID: 0x1005, String: -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" -TC -X
+RAW-NEXT: 0x1007 | LF_STRING_ID [size = 24, hash = 0x2D1] ID: <no type>, String: ret42-main.c
+RAW-NEXT: 0x1008 | LF_STRING_ID [size = 24, hash = 0xB8B] ID: <no type>, String: D:\b\vc140.pdb
+RAW-NEXT: 0x1009 | LF_BUILDINFO [size = 28, hash = 0xA8C]
RAW-NEXT: 0x1002: `D:\b`
RAW-NEXT: 0x1003: `C:\vs14\VC\BIN\amd64\cl.exe`
RAW-NEXT: 0x1007: `ret42-main.c`
RAW-NEXT: 0x1008: `D:\b\vc140.pdb`
RAW-NEXT: 0x1006: ` -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" -TC -X`
-RAW-NEXT: 0x100A | LF_STRING_ID [size = 20] ID: <no type>, String: ret42-sub.c
-RAW-NEXT: 0x100B | LF_BUILDINFO [size = 28]
+RAW-NEXT: 0x100A | LF_STRING_ID [size = 20, hash = 0x39C] ID: <no type>, String: ret42-sub.c
+RAW-NEXT: 0x100B | LF_BUILDINFO [size = 28, hash = 0xAD7]
RAW-NEXT: 0x1002: `D:\b`
RAW-NEXT: 0x1003: `C:\vs14\VC\BIN\amd64\cl.exe`
RAW-NEXT: 0x100A: `ret42-sub.c`
RAW-NEXT: 0x1008: `D:\b\vc140.pdb`
RAW-NEXT: 0x1006: ` -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" -TC -X`
+RAW: Public Symbols
+RAW-NEXT: ============================================================
+RAW-NEXT: Publics Header
+RAW-NEXT: sym hash = 556, thunk table addr = 0000:0000
+RAW-NEXT: GSI Header
+RAW-NEXT: sig = 0xFFFFFFFF, hdr = 0xF12F091A, hr size = 16, num buckets = 524
+RAW-NEXT: Records
+RAW-NEXT: 20 | S_PUB32 [size = 20] `main`
+RAW-NEXT: flags = function, addr = 0002:0000
+RAW-NEXT: 0 | S_PUB32 [size = 20] `foo`
+RAW-NEXT: flags = function, addr = 0002:0016
+RAW-NOT: S_PUB32
+RAW-NEXT: Hash Entries
+RAW-NEXT: off = 21, refcnt = 1
+RAW-NEXT: off = 1, refcnt = 1
+RAW-NEXT: Hash Buckets
+RAW-NEXT: 0x00000000
+RAW-NEXT: 0x0000000c
+RAW-NEXT: Address Map
+RAW-NEXT: off = 20
+RAW-NEXT: off = 0
+RAW: Section Headers
+RAW-NEXT: ============================================================
+RAW: SECTION HEADER #1
+RAW-NEXT: .pdata name
+RAW-NEXT: virtual size
+RAW-NEXT: 1000 virtual address
+RAW-NEXT: 200 size of raw data
+RAW-NEXT: 400 file pointer to raw data
+RAW-NEXT: 0 file pointer to relocation table
+RAW-NEXT: 0 file pointer to line numbers
+RAW-NEXT: 0 number of relocations
+RAW-NEXT: 0 number of line numbers
+RAW-NEXT: 40000040 flags
+RAW-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
+RAW-NEXT: IMAGE_SCN_MEM_READ
+RAW: SECTION HEADER #2
+RAW-NEXT: .text name
+RAW-NEXT: virtual size
+RAW-NEXT: 2000 virtual address
+RAW-NEXT: 200 size of raw data
+RAW-NEXT: 600 file pointer to raw data
+RAW-NEXT: 0 file pointer to relocation table
+RAW-NEXT: 0 file pointer to line numbers
+RAW-NEXT: 0 number of relocations
+RAW-NEXT: 0 number of line numbers
+RAW-NEXT: 60000020 flags
+RAW-NEXT: IMAGE_SCN_CNT_CODE
+RAW-NEXT: IMAGE_SCN_MEM_EXECUTE
+RAW-NEXT: IMAGE_SCN_MEM_READ
+RAW: SECTION HEADER #3
+RAW-NEXT: .xdata name
+RAW-NEXT: virtual size
+RAW-NEXT: 3000 virtual address
+RAW-NEXT: 200 size of raw data
+RAW-NEXT: 800 file pointer to raw data
+RAW-NEXT: 0 file pointer to relocation table
+RAW-NEXT: 0 file pointer to line numbers
+RAW-NEXT: 0 number of relocations
+RAW-NEXT: 0 number of line numbers
+RAW-NEXT: 40000040 flags
+RAW-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
+RAW-NEXT: IMAGE_SCN_MEM_READ
+RAW: SECTION HEADER #4
+RAW-NEXT: .rdata name
+RAW-NEXT: virtual size
+RAW-NEXT: 4000 virtual address
+RAW-NEXT: 200 size of raw data
+RAW-NEXT: A00 file pointer to raw data
+RAW-NEXT: 0 file pointer to relocation table
+RAW-NEXT: 0 file pointer to line numbers
+RAW-NEXT: 0 number of relocations
+RAW-NEXT: 0 number of line numbers
+RAW-NEXT: 40000040 flags
+RAW-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
+RAW-NEXT: IMAGE_SCN_MEM_READ
+RAW: Original Section Headers
+RAW-NEXT: ============================================================
+RAW-NEXT: PDB does not contain the requested image section header type
RAW: Section Contributions
RAW-NEXT: ============================================================
-RAW-NEXT: SC | mod = 0, 65535:1288, size = 14, data crc = 0, reloc crc = 0
-RAW-NEXT: IMAGE_SCN_CNT_CODE | IMAGE_SCN_ALIGN_16BYTES | IMAGE_SCN_MEM_EXECUTE |
-RAW-NEXT: IMAGE_SCN_MEM_READ
-RAW-NEXT: SC | mod = 0, 65535:1312, size = 8, data crc = 0, reloc crc = 0
-RAW-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_ALIGN_4BYTES | IMAGE_SCN_MEM_READ
-RAW-NEXT: SC | mod = 0, 65535:1320, size = 12, data crc = 0, reloc crc = 0
-RAW-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_ALIGN_4BYTES | IMAGE_SCN_MEM_READ
-RAW-NEXT: SC | mod = 1, 65535:1144, size = 6, data crc = 0, reloc crc = 0
-RAW-NEXT: IMAGE_SCN_CNT_CODE | IMAGE_SCN_ALIGN_16BYTES | IMAGE_SCN_MEM_EXECUTE |
-RAW-NEXT: IMAGE_SCN_MEM_READ
+RAW-NEXT: SC[.pdata] | mod = 0, 0001:0000, size = 12, data crc = 361370162, reloc crc = 0
+RAW-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_ALIGN_4BYTES | IMAGE_SCN_MEM_READ
+RAW-NEXT: SC[.text] | mod = 0, 0002:0000, size = 14, data crc = 1682752513, reloc crc = 0
+RAW-NEXT: IMAGE_SCN_CNT_CODE | IMAGE_SCN_ALIGN_16BYTES | IMAGE_SCN_MEM_EXECUTE |
+RAW-NEXT: IMAGE_SCN_MEM_READ
+RAW-NEXT: SC[.text] | mod = 1, 0002:0016, size = 6, data crc = 2139436471, reloc crc = 0
+RAW-NEXT: IMAGE_SCN_CNT_CODE | IMAGE_SCN_ALIGN_16BYTES | IMAGE_SCN_MEM_EXECUTE |
+RAW-NEXT: IMAGE_SCN_MEM_READ
+RAW-NEXT: SC[.xdata] | mod = 0, 0003:0000, size = 8, data crc = 264583633, reloc crc = 0
+RAW-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_ALIGN_4BYTES | IMAGE_SCN_MEM_READ
+RAW-NEXT: SC[???] | mod = 2, 0004:0000, size = {{[0-9]+}}, data crc = 0, reloc crc = 0
+RAW-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ
+RAW-NEXT: SC[???] | mod = 2, 0004:0028, size = {{[0-9]+}}, data crc = 0, reloc crc = 0
+RAW-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ
+RAW-NOT: SC[
RAW: Section Map
RAW-NEXT: ============================================================
-RAW-NEXT: Section 0000 | ovl = 0, group = 0, frame = 0, name = 1
+RAW-NEXT: Section 0000 | ovl = 0, group = 0, frame = 1, name = 65535
RAW-NEXT: class = 65535, offset = 0, size =
RAW-NEXT: flags = read | 32 bit addr | selector
-RAW-NEXT: Section 0001 | ovl = 1, group = 0, frame = 0, name = 2
+RAW-NEXT: Section 0001 | ovl = 0, group = 0, frame = 2, name = 65535
RAW-NEXT: class = 65535, offset = 0, size =
RAW-NEXT: flags = read | execute | 32 bit addr | selector
-RAW-NEXT: Section 0002 | ovl = 2, group = 0, frame = 0, name = 3
+RAW-NEXT: Section 0002 | ovl = 0, group = 0, frame = 3, name = 65535
RAW-NEXT: class = 65535, offset = 0, size =
RAW-NEXT: flags = read | 32 bit addr | selector
-RAW-NEXT: Section 0003 | ovl = 3, group = 0, frame = 0, name = 4
+RAW-NEXT: Section 0003 | ovl = 0, group = 0, frame = 4, name = 65535
RAW-NEXT: class = 65535, offset = 0, size =
RAW-NEXT: flags = read | 32 bit addr | selector
-RAW-NEXT: Section 0004 | ovl = 4, group = 0, frame = 0, name = 5
+RAW-NEXT: Section 0004 | ovl = 0, group = 0, frame = 5, name = 65535
RAW-NEXT: class = 65535, offset = 0, size =
RAW-NEXT: flags = 32 bit addr | absolute addr
diff --git a/test/COFF/reloc-arm.test b/test/COFF/reloc-arm.test
index 1f3de619c44b..872e6d53c8aa 100644
--- a/test/COFF/reloc-arm.test
+++ b/test/COFF/reloc-arm.test
@@ -28,28 +28,28 @@ sections:
Relocations:
- VirtualAddress: 0
SymbolName: foo
- Type: 1 # IMAGE_REL_ARM_ADDR32
+ Type: IMAGE_REL_ARM_ADDR32
- VirtualAddress: 16
SymbolName: foo
- Type: 2 # IMAGE_REL_ARM_ADDR32NB
+ Type: IMAGE_REL_ARM_ADDR32NB
- VirtualAddress: 32
SymbolName: foo
- Type: 17 # IMAGE_REL_ARM_MOV32T
+ Type: IMAGE_REL_ARM_MOV32T
- VirtualAddress: 48
SymbolName: foo
- Type: 20 # IMAGE_REL_ARM_BRANCH24T
+ Type: IMAGE_REL_ARM_BRANCH24T
- VirtualAddress: 64
SymbolName: foo
- Type: 18 # IMAGE_REL_ARM_BRANCH20T
+ Type: IMAGE_REL_ARM_BRANCH20T
- VirtualAddress: 80
SymbolName: foo
- Type: 21 # IMAGE_REL_ARM_BLX23T
+ Type: IMAGE_REL_ARM_BLX23T
- VirtualAddress: 96
SymbolName: bar
- Type: 20 # IMAGE_REL_ARM_BRANCH24T
+ Type: IMAGE_REL_ARM_BRANCH24T
- VirtualAddress: 112
SymbolName: bar
- Type: 15 # IMAGE_REL_ARM_SECREL
+ Type: IMAGE_REL_ARM_SECREL
symbols:
- Name: .aaa
Value: 0
diff --git a/test/COFF/reloc-discarded-dwarf.s b/test/COFF/reloc-discarded-dwarf.s
index d779d2f5b8fc..14dc5948b32a 100644
--- a/test/COFF/reloc-discarded-dwarf.s
+++ b/test/COFF/reloc-discarded-dwarf.s
@@ -13,3 +13,5 @@ f:
.section .debug_info,"dr"
.quad f
+ .section .eh_frame,"dr"
+ .quad f
diff --git a/test/COFF/reloc-discarded-early.s b/test/COFF/reloc-discarded-early.s
new file mode 100644
index 000000000000..6d1043dbfa74
--- /dev/null
+++ b/test/COFF/reloc-discarded-early.s
@@ -0,0 +1,8 @@
+# RUN: llvm-mc -triple=x86_64-windows-msvc -filetype=obj -o %t.obj %s
+# RUN: lld-link -entry:__ImageBase -subsystem:console -debug %t.obj
+
+.section .debug_info,"dr"
+.quad .Ldrectve
+
+.section .drectve
+.Ldrectve:
diff --git a/test/COFF/reloc-discarded-early2.s b/test/COFF/reloc-discarded-early2.s
new file mode 100644
index 000000000000..18e200008721
--- /dev/null
+++ b/test/COFF/reloc-discarded-early2.s
@@ -0,0 +1,9 @@
+# RUN: llvm-mc -triple=x86_64-windows-msvc -filetype=obj -o %t.obj %s
+# RUN: not lld-link -entry:__ImageBase -subsystem:console %t.obj 2>&1 | FileCheck %s
+
+.text
+# CHECK: error: relocation against symbol in discarded section: .drectve
+.quad .Ldrectve
+
+.section .drectve
+.Ldrectve:
diff --git a/test/COFF/reloc-discarded.s b/test/COFF/reloc-discarded.s
index 94eaba998330..0be4e110b4db 100644
--- a/test/COFF/reloc-discarded.s
+++ b/test/COFF/reloc-discarded.s
@@ -18,7 +18,6 @@ main_global:
.section .CRT$XCU,"dr",associative,main_global
.p2align 3
- .globl assoc_global
assoc_global:
.quad main_global
diff --git a/test/COFF/responsefile.test b/test/COFF/responsefile.test
index fd4d221c20dc..742962423cc5 100644
--- a/test/COFF/responsefile.test
+++ b/test/COFF/responsefile.test
@@ -3,5 +3,23 @@
# RUN: echo /out:%t.exe /entry:main %t.obj > %t.rsp
# RUN: lld-link @%t.rsp /heap:0x3000
# RUN: llvm-readobj -file-headers %t.exe | FileCheck %s
-
CHECK: SizeOfHeapReserve: 12288
+
+# RUN: not lld-link --rsp-quoting=foobar @%t.rsp 2>&1 | \
+# RUN: FileCheck --check-prefix=INVRSP %s
+INVRSP: invalid response file quoting: foobar
+
+# RUN: echo "blah\foo" > %t.rsp
+# RUN: not lld-link @%t.rsp 2>&1 | \
+# RUN: FileCheck --check-prefix=DEFRSP %s
+DEFRSP: error: could not open blah\foo
+
+# RUN: echo "blah\foo" > %t.rsp
+# RUN: not lld-link --rsp-quoting=windows @%t.rsp 2>&1 | \
+# RUN: FileCheck --check-prefix=WINRSP %s
+WINRSP: error: could not open blah\foo
+
+# RUN: echo "blah\foo" > %t.rsp
+# RUN: not lld-link --rsp-quoting=posix @%t.rsp 2>&1 | \
+# RUN: FileCheck --check-prefix=POSRSP %s
+POSRSP: error: could not open blahfoo
diff --git a/test/COFF/rsds.test b/test/COFF/rsds.test
index 82b0f220b6c1..176597786848 100644
--- a/test/COFF/rsds.test
+++ b/test/COFF/rsds.test
@@ -1,11 +1,20 @@
# RUN: yaml2obj %s > %t.obj
+# RUN: rm -f %t.dll %t.pdb
# RUN: lld-link /debug /dll /out:%t.dll /entry:DllMain %t.obj
-# RUN: llvm-readobj -coff-debug-directory %t.dll | FileCheck %s
+# RUN: llvm-readobj -coff-debug-directory %t.dll > %t.1.txt
+# RUN: lld-link /debug /dll /out:%t.dll /entry:DllMain %t.obj
+# RUN: llvm-readobj -coff-debug-directory %t.dll > %t.2.txt
+# RUN: cat %t.1.txt %t.2.txt | FileCheck %s
+# RUN: rm -f %t.dll %t.pdb
+# RUN: lld-link /debug /pdb:%t.pdb /dll /out:%t.dll /entry:DllMain %t.obj
+# RUN: llvm-readobj -coff-debug-directory %t.dll > %t.3.txt
# RUN: lld-link /debug /pdb:%t.pdb /dll /out:%t.dll /entry:DllMain %t.obj
-# RUN: llvm-readobj -coff-debug-directory %t.dll | FileCheck %s
+# RUN: llvm-readobj -coff-debug-directory %t.dll > %t.4.txt
+# RUN: cat %t.3.txt %t.4.txt | FileCheck %s
+# CHECK: File: [[FILE:.*]].dll
# CHECK: DebugDirectory [
# CHECK: DebugEntry {
# CHECK: Characteristics: 0x0
@@ -13,17 +22,36 @@
# CHECK: MajorVersion: 0x0
# CHECK: MinorVersion: 0x0
# CHECK: Type: CodeView (0x2)
-# CHECK: SizeOfData:
-# CHECK: AddressOfRawData:
-# CHECK: PointerToRawData:
+# CHECK: SizeOfData: 0x{{[^0]}}
+# CHECK: AddressOfRawData: 0x{{[^0]}}
+# CHECK: PointerToRawData: 0x{{[^0]}}
# CHECK: PDBInfo {
# CHECK: PDBSignature: 0x53445352
-# CHECK: PDBGUID:
+# CHECK: PDBGUID: [[GUID:\(([A-Za-z0-9]{2} ?){16}\)]]
# CHECK: PDBAge: 1
# CHECK: PDBFileName: {{.*}}.pdb
# CHECK: }
# CHECK: }
# CHECK: ]
+# CHECK: File: [[FILE]].dll
+# CHECK: DebugDirectory [
+# CHECK: DebugEntry {
+# CHECK: Characteristics: 0x0
+# CHECK: TimeDateStamp: 1970-01-01 00:00:00 (0x0)
+# CHECK: MajorVersion: 0x0
+# CHECK: MinorVersion: 0x0
+# CHECK: Type: CodeView (0x2)
+# CHECK: SizeOfData: 0x{{[^0]}}
+# CHECK: AddressOfRawData: 0x{{[^0]}}
+# CHECK: PointerToRawData: 0x{{[^0]}}
+# CHECK: PDBInfo {
+# CHECK: PDBSignature: 0x53445352
+# CHECK: PDBGUID: [[GUID]]
+# CHECK: PDBAge: 2
+# CHECK: PDBFileName: {{.*}}.pdb
+# CHECK: }
+# CHECK: }
+# CHECK: ]
--- !COFF
header:
diff --git a/test/COFF/safeseh-md.s b/test/COFF/safeseh-md.s
new file mode 100644
index 000000000000..ae731b5211df
--- /dev/null
+++ b/test/COFF/safeseh-md.s
@@ -0,0 +1,34 @@
+# RUN: llvm-mc -triple i686-windows-msvc %s -filetype=obj -o %t.obj
+# RUN: lld-link %t.obj %S/Inputs/except_handler3.lib -safeseh -out:%t.exe -opt:noref -entry:main
+# RUN: llvm-readobj -coff-load-config %t.exe | FileCheck %s
+
+# CHECK: SEHTable [
+# CHECK-NEXT: 0x
+# CHECK-NEXT: ]
+
+ .def @feat.00;
+ .scl 3;
+ .type 0;
+ .endef
+ .globl @feat.00
+@feat.00 = 1
+
+ .def _main;
+ .scl 2;
+ .type 32;
+ .endef
+ .section .text,"xr",one_only,_main
+ .globl _main
+_main:
+ movl $42, %eax
+ ret
+
+.safeseh __except_handler3
+
+ .section .rdata,"dr"
+.globl __load_config_used
+__load_config_used:
+ .long 72
+ .fill 60, 1, 0
+ .long ___safe_se_handler_table
+ .long ___safe_se_handler_count
diff --git a/test/COFF/safeseh.s b/test/COFF/safeseh.s
index 83c15afbf938..35f54c590d13 100644
--- a/test/COFF/safeseh.s
+++ b/test/COFF/safeseh.s
@@ -1,9 +1,15 @@
# RUN: llvm-mc -triple i686-windows-msvc %s -filetype=obj -o %t.obj
# RUN: lld-link %t.obj -safeseh -out:%t.exe -opt:noref -entry:main
-# RUN: llvm-readobj -coff-load-config %t.exe | FileCheck %s --check-prefix=CHECK-NOGC
+# RUN: llvm-readobj -coff-basereloc -coff-load-config -file-headers %t.exe | FileCheck %s --check-prefix=CHECK-NOGC
# RUN: lld-link %t.obj -safeseh -out:%t.exe -opt:ref -entry:main
-# RUN: llvm-readobj -coff-load-config %t.exe | FileCheck %s --check-prefix=CHECK-GC
+# RUN: llvm-readobj -coff-basereloc -coff-load-config -file-headers %t.exe | FileCheck %s --check-prefix=CHECK-GC
+# __safe_se_handler_table needs to be relocated against ImageBase.
+# check that the relocation is present.
+# CHECK-NOGC-NOT: IMAGE_DLL_CHARACTERISTICS_NO_SEH
+# CHECK-NOGC: BaseReloc [
+# CHECK-NOGC: Entry {
+# CHECK-NOGC: Type: HIGHLOW
# CHECK-NOGC: LoadConfig [
# CHECK-NOGC: Size: 0x48
# CHECK-NOGC: SEHandlerTable: 0x401048
@@ -13,6 +19,11 @@
# CHECK-NOGC-NEXT: 0x402006
# CHECK-NOGC-NEXT: ]
+# Without the SEH table, the address is absolute, so check that we do
+# not have a relocation for it.
+# CHECK-GC-NOT: IMAGE_DLL_CHARACTERISTICS_NO_SEH
+# CHECK-GC: BaseReloc [
+# CHECK-GC-NEXT: ]
# CHECK-GC: LoadConfig [
# CHECK-GC: Size: 0x48
# CHECK-GC: SEHandlerTable: 0x0
diff --git a/test/COFF/section-size.s b/test/COFF/section-size.s
new file mode 100644
index 000000000000..28f3f4acbc9d
--- /dev/null
+++ b/test/COFF/section-size.s
@@ -0,0 +1,14 @@
+# REQUIRES: x86
+# RUN: llvm-mc -filetype=obj -triple=x86_64-windows-msvc %s -o %tmain.obj
+# RUN: echo '.lcomm s, 0x80000000' | llvm-mc -filetype=obj -triple=x86_64-windows-msvc -o %t1.obj
+# RUN: cp %t1.obj %t2.obj
+# RUN: echo '.lcomm s, 0xffffffff' | llvm-mc -filetype=obj -triple=x86_64-windows-msvc -o %t3.obj
+
+# Run: lld-link -entry:main %tmain.obj %t3.obj -out:%t.exe
+
+# RUN: not lld-link -entry:main %tmain.obj %t1.obj %t2.obj -out:%t.exe 2>&1 | FileCheck %s
+# CHECK: error: section larger than 4 GiB: .bss
+
+.globl main
+main:
+ retq
diff --git a/test/COFF/seh-comdat.test b/test/COFF/seh-comdat.test
new file mode 100644
index 000000000000..d9133289ed06
--- /dev/null
+++ b/test/COFF/seh-comdat.test
@@ -0,0 +1,66 @@
+# RUN: yaml2obj < %s > %t1.obj
+# RUN: yaml2obj < %s > %t2.obj
+# RUN: lld-link /out:%t.exe /subsystem:console /entry:main %t1.obj %t2.obj
+# RUN: llvm-objdump -s %t.exe | FileCheck %s
+
+# CHECK: Contents of section .rdata:
+# CHECK: 1000 00200000
+
+--- !COFF
+header:
+ Machine: IMAGE_FILE_MACHINE_I386
+ Characteristics: [ ]
+sections:
+ - Name: .text
+ Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ, IMAGE_SCN_LNK_COMDAT ]
+ Alignment: 1
+ SectionData: 0000000000000000
+ - Name: .sxdata
+ Characteristics: [ IMAGE_SCN_LNK_INFO ]
+ Alignment: 4
+ SectionData: 02000000
+symbols:
+ - Name: '@comp.id'
+ Value: 14766605
+ SectionNumber: 65535
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ - Name: '@feat.00'
+ Value: 2147484049
+ SectionNumber: 65535
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ - Name: .text
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 4
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 0
+ Selection: IMAGE_COMDAT_SELECT_ANY
+ - Name: .sxdata
+ Value: 0
+ SectionNumber: 2
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_STATIC
+ SectionDefinition:
+ Length: 8
+ NumberOfRelocations: 0
+ NumberOfLinenumbers: 0
+ CheckSum: 0
+ Number: 0
+ - Name: _main
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+...
diff --git a/test/COFF/strtab-size.s b/test/COFF/strtab-size.s
new file mode 100644
index 000000000000..6b29049f548c
--- /dev/null
+++ b/test/COFF/strtab-size.s
@@ -0,0 +1,216 @@
+# REQUIRES: x86
+
+# Test that the strtab size is included in the allocation even if the
+# strtab itself is empty. To achieve this, we need a number of symbols N
+# where alignTo(N*18, 512) < alignTo(N*18 + 4, 512), where the first
+# positive N fulfilling that is 199.
+
+# RUN: llvm-mc -triple=x86_64-windows-msvc %s -filetype=obj -o %t.obj
+# RUN: lld-link -out:%t.exe -entry:main %t.obj -debug:dwarf
+
+# If the size of the strtab isn't allocated for, llvm-readobj would
+# output SymbolCount: 0 (and dumpbin.exe would error out with "invalid file
+# or disk full, cannot seek to 0x1602").
+
+# RUN: llvm-readobj -file-headers %t.exe | FileCheck %s
+# CHECK: SymbolCount: 199
+
+.global main
+.text
+main:
+sym0:
+sym1:
+sym2:
+sym3:
+sym4:
+sym5:
+sym6:
+sym7:
+sym8:
+sym9:
+sym10:
+sym11:
+sym12:
+sym13:
+sym14:
+sym15:
+sym16:
+sym17:
+sym18:
+sym19:
+sym20:
+sym21:
+sym22:
+sym23:
+sym24:
+sym25:
+sym26:
+sym27:
+sym28:
+sym29:
+sym30:
+sym31:
+sym32:
+sym33:
+sym34:
+sym35:
+sym36:
+sym37:
+sym38:
+sym39:
+sym40:
+sym41:
+sym42:
+sym43:
+sym44:
+sym45:
+sym46:
+sym47:
+sym48:
+sym49:
+sym50:
+sym51:
+sym52:
+sym53:
+sym54:
+sym55:
+sym56:
+sym57:
+sym58:
+sym59:
+sym60:
+sym61:
+sym62:
+sym63:
+sym64:
+sym65:
+sym66:
+sym67:
+sym68:
+sym69:
+sym70:
+sym71:
+sym72:
+sym73:
+sym74:
+sym75:
+sym76:
+sym77:
+sym78:
+sym79:
+sym80:
+sym81:
+sym82:
+sym83:
+sym84:
+sym85:
+sym86:
+sym87:
+sym88:
+sym89:
+sym90:
+sym91:
+sym92:
+sym93:
+sym94:
+sym95:
+sym96:
+sym97:
+sym98:
+sym99:
+sym100:
+sym101:
+sym102:
+sym103:
+sym104:
+sym105:
+sym106:
+sym107:
+sym108:
+sym109:
+sym110:
+sym111:
+sym112:
+sym113:
+sym114:
+sym115:
+sym116:
+sym117:
+sym118:
+sym119:
+sym120:
+sym121:
+sym122:
+sym123:
+sym124:
+sym125:
+sym126:
+sym127:
+sym128:
+sym129:
+sym130:
+sym131:
+sym132:
+sym133:
+sym134:
+sym135:
+sym136:
+sym137:
+sym138:
+sym139:
+sym140:
+sym141:
+sym142:
+sym143:
+sym144:
+sym145:
+sym146:
+sym147:
+sym148:
+sym149:
+sym150:
+sym151:
+sym152:
+sym153:
+sym154:
+sym155:
+sym156:
+sym157:
+sym158:
+sym159:
+sym160:
+sym161:
+sym162:
+sym163:
+sym164:
+sym165:
+sym166:
+sym167:
+sym168:
+sym169:
+sym170:
+sym171:
+sym172:
+sym173:
+sym174:
+sym175:
+sym176:
+sym177:
+sym178:
+sym179:
+sym180:
+sym181:
+sym182:
+sym183:
+sym184:
+sym185:
+sym186:
+sym187:
+sym188:
+sym189:
+sym190:
+sym191:
+sym192:
+sym193:
+sym194:
+ ret
diff --git a/test/COFF/subsystem-drectve.test b/test/COFF/subsystem-drectve.test
new file mode 100644
index 000000000000..fa567bc7a9af
--- /dev/null
+++ b/test/COFF/subsystem-drectve.test
@@ -0,0 +1,21 @@
+# RUN: yaml2obj < %s > %t.obj
+# RUN: lld-link /dll /noentry /out:%t.dll %t.obj
+# RUN: llvm-readobj -file-headers %t.dll | FileCheck %s
+
+# CHECK: MajorOperatingSystemVersion: 42
+# CHECK: MinorOperatingSystemVersion: 43
+# CHECK: MajorSubsystemVersion: 42
+# CHECK: MinorSubsystemVersion: 43
+# CHECK: Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI
+
+--- !COFF
+header:
+ Machine: IMAGE_FILE_MACHINE_I386
+ Characteristics: []
+sections:
+ - Name: .drectve
+ Characteristics: [ IMAGE_SCN_LNK_INFO, IMAGE_SCN_LNK_REMOVE ]
+ Alignment: 1
+ SectionData: 2f73756273797374656d3a636f6e736f6c652c34322e343300 # /subsystem:console,42.43
+symbols:
+...
diff --git a/test/COFF/symtab.test b/test/COFF/symtab.test
index ffaca285d6f0..4e46e3383a4a 100644
--- a/test/COFF/symtab.test
+++ b/test/COFF/symtab.test
@@ -1,10 +1,10 @@
# RUN: yaml2obj < %s > %t.obj
-# RUN: lld-link /debug /out:%t.exe /entry:main %t.obj %p/Inputs/std64.lib
+# RUN: lld-link /debug:dwarf /out:%t.exe /entry:main %t.obj %p/Inputs/std64.lib
# RUN: llvm-readobj -symbols %t.exe | FileCheck %s
-# RUN: lld-link /debug /opt:noref /out:%t.exe /entry:main %t.obj %p/Inputs/std64.lib
+# RUN: lld-link /debug:dwarf /opt:noref /out:%t.exe /entry:main %t.obj %p/Inputs/std64.lib
# RUN: llvm-readobj -symbols %t.exe | FileCheck %s
-# RUN: lld-link /debug /nosymtab /out:%t.exe /entry:main %t.obj %p/Inputs/std64.lib
+# RUN: lld-link /debug /out:%t.exe /entry:main %t.obj %p/Inputs/std64.lib
# RUN: llvm-readobj -symbols %t.exe | FileCheck -check-prefix=NO %s
# CHECK: Symbols [
diff --git a/test/COFF/thinlto.ll b/test/COFF/thinlto.ll
index f01d0d802289..77ba9b91de70 100644
--- a/test/COFF/thinlto.ll
+++ b/test/COFF/thinlto.ll
@@ -4,7 +4,7 @@
; RUN: opt -thinlto-bc -o %T/thinlto/main.obj %s
; RUN: opt -thinlto-bc -o %T/thinlto/foo.obj %S/Inputs/lto-dep.ll
; RUN: lld-link /lldsavetemps /out:%T/thinlto/main.exe /entry:main /subsystem:console %T/thinlto/main.obj %T/thinlto/foo.obj
-; RUN: llvm-nm %T/thinlto/main.exe.lto.obj | FileCheck %s
+; RUN: llvm-nm %T/thinlto/main.exe1.lto.obj | FileCheck %s
; CHECK-NOT: U foo
diff --git a/test/COFF/wholearchive.s b/test/COFF/wholearchive.s
new file mode 100644
index 000000000000..da9976382b0d
--- /dev/null
+++ b/test/COFF/wholearchive.s
@@ -0,0 +1,19 @@
+# REQEUIRES: x86
+
+# RUN: yaml2obj < %p/Inputs/export.yaml > %t.archive.obj
+# RUN: llvm-ar rcs %t.archive.lib %t.archive.obj
+# RUN: llvm-mc -triple=x86_64-windows-msvc %s -filetype=obj -o %t.main.obj
+
+# RUN: lld-link -dll -out:%t.dll -entry:main %t.main.obj -wholearchive:%t.archive.lib -implib:%t.lib
+# RUN: llvm-readobj %t.lib | FileCheck %s -check-prefix CHECK-IMPLIB
+
+# RUN: lld-link -dll -out:%t.dll -entry:main %t.main.obj -wholearchive %t.archive.lib -implib:%t.lib
+# RUN: llvm-readobj %t.lib | FileCheck %s -check-prefix CHECK-IMPLIB
+
+# CHECK-IMPLIB: Symbol: __imp_exportfn3
+# CHECK-IMPLIB: Symbol: exportfn3
+
+.global main
+.text
+main:
+ ret
diff --git a/test/COFF/wx.s b/test/COFF/wx.s
new file mode 100644
index 000000000000..3a470edc261c
--- /dev/null
+++ b/test/COFF/wx.s
@@ -0,0 +1,17 @@
+# REQUIRES: x86
+
+# RUN: llvm-mc -triple=x86_64-windows-msvc -filetype=obj -o %t.obj %s
+# RUN: not lld-link /out:%t.exe /entry:main -notarealoption /WX %t.obj 2>&1 | \
+# RUN: FileCheck -check-prefix=ERROR %s
+# RUN: not lld-link /out:%t.exe /entry:main -notarealoption /WX:NO /WX %t.obj 2>&1 | \
+# RUN: FileCheck -check-prefix=ERROR %s
+# RUN: lld-link /out:%t.exe /entry:main -notarealoption /WX /WX:NO %t.obj 2>&1 | \
+# RUN: FileCheck -check-prefix=WARNING %s
+
+# ERROR: error: ignoring unknown argument: -notarealoption
+# WARNING: warning: ignoring unknown argument: -notarealoption
+
+.text
+.global main
+main:
+ ret