1 # RUN: yaml2obj %s -o %t.obj
2 # RUN: lld-link -safeseh:no -debug -entry:main -out:%t.exe -pdb:%t.pdb %t.obj
3 # RUN: llvm-pdbutil dump -globals %t.pdb | FileCheck %s
5 # There is an S_GDATA32 symbol record with .secrel32 and .secidx relocations in
6 # it in this debug info. This is similar to the relocations in the loadcfg.obj
7 # file in the MSVC CRT. We need to make sure that our relocation logic matches
8 # MSVC's for these absolute, linker-provided symbols.
10 # CHECK: Global Symbols
11 # CHECK-NEXT: ============================================================
13 # CHECK-NEXT: 20 | S_GDATA32 [size = 40] `___safe_se_handler_table`
14 # CHECK-NEXT: type = 0x0022 (unsigned long), addr = 0003:0000
18 Machine: IMAGE_FILE_MACHINE_I386
22 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
30 DisplayName: ___safe_se_handler_table
35 SymbolName: ___safe_se_handler_table
36 Type: IMAGE_REL_I386_SECREL
38 SymbolName: ___safe_se_handler_table
39 Type: IMAGE_REL_I386_SECTION
41 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
43 SectionData: 488D0500000000C3
46 SymbolName: ___safe_se_handler_table
47 Type: IMAGE_REL_I386_REL32
52 SimpleType: IMAGE_SYM_TYPE_NULL
53 ComplexType: IMAGE_SYM_DTYPE_NULL
54 StorageClass: IMAGE_SYM_CLASS_STATIC
57 NumberOfRelocations: 6
58 NumberOfLinenumbers: 0
64 SimpleType: IMAGE_SYM_TYPE_NULL
65 ComplexType: IMAGE_SYM_DTYPE_NULL
66 StorageClass: IMAGE_SYM_CLASS_STATIC
69 NumberOfRelocations: 1
70 NumberOfLinenumbers: 0
76 SimpleType: IMAGE_SYM_TYPE_NULL
77 ComplexType: IMAGE_SYM_DTYPE_FUNCTION
78 StorageClass: IMAGE_SYM_CLASS_EXTERNAL
79 - Name: ___safe_se_handler_table
82 SimpleType: IMAGE_SYM_TYPE_NULL
83 ComplexType: IMAGE_SYM_DTYPE_NULL
84 StorageClass: IMAGE_SYM_CLASS_EXTERNAL