86 lines · yaml
1# RUN: yaml2obj %s -o %t.obj2# RUN: lld-link -debug -entry:main -out:%t.exe -pdb:%t.pdb %t.obj3# RUN: llvm-pdbutil dump -globals %t.pdb | FileCheck %s4 5# There is an S_GDATA32 symbol record with .secrel32 and .secidx relocations in6# it in this debug info. This is similar to the relocations in the loadcfg.obj7# file in the MSVC CRT. We need to make sure that our relocation logic matches8# MSVC's for these absolute, linker-provided symbols.9 10# CHECK: Global Symbols11# CHECK-NEXT: ============================================================12# CHECK-NEXT: Records13# CHECK-NEXT: 20 | S_GDATA32 [size = 36] `__guard_fids_table`14# CHECK-NEXT: type = 0x0022 (unsigned long), addr = 0003:000015 16--- !COFF17header:18 Machine: IMAGE_FILE_MACHINE_AMD6419 Characteristics: [ ]20sections:21 - Name: '.debug$S'22 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]23 Alignment: 124 Subsections:25 - !Symbols26 Records:27 - Kind: S_GDATA3228 DataSym:29 Type: 3430 DisplayName: __guard_fids_table31 - !StringTable32 Strings:33 Relocations:34 - VirtualAddress: 2035 SymbolName: __guard_fids_table36 Type: IMAGE_REL_AMD64_SECREL37 - VirtualAddress: 2438 SymbolName: __guard_fids_table39 Type: IMAGE_REL_AMD64_SECTION40 - Name: '.text$mn'41 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]42 Alignment: 1643 SectionData: 488D0500000000C344 Relocations:45 - VirtualAddress: 346 SymbolName: __guard_fids_table47 Type: IMAGE_REL_AMD64_REL3248symbols:49 - Name: '.debug$S'50 Value: 051 SectionNumber: 152 SimpleType: IMAGE_SYM_TYPE_NULL53 ComplexType: IMAGE_SYM_DTYPE_NULL54 StorageClass: IMAGE_SYM_CLASS_STATIC55 SectionDefinition:56 Length: 37257 NumberOfRelocations: 658 NumberOfLinenumbers: 059 CheckSum: 060 Number: 061 - Name: '.text$mn'62 Value: 063 SectionNumber: 264 SimpleType: IMAGE_SYM_TYPE_NULL65 ComplexType: IMAGE_SYM_DTYPE_NULL66 StorageClass: IMAGE_SYM_CLASS_STATIC67 SectionDefinition:68 Length: 869 NumberOfRelocations: 170 NumberOfLinenumbers: 071 CheckSum: 109217813172 Number: 073 - Name: main74 Value: 075 SectionNumber: 276 SimpleType: IMAGE_SYM_TYPE_NULL77 ComplexType: IMAGE_SYM_DTYPE_FUNCTION78 StorageClass: IMAGE_SYM_CLASS_EXTERNAL79 - Name: __guard_fids_table80 Value: 081 SectionNumber: 082 SimpleType: IMAGE_SYM_TYPE_NULL83 ComplexType: IMAGE_SYM_DTYPE_NULL84 StorageClass: IMAGE_SYM_CLASS_EXTERNAL85...86