195 lines · plain
1## This test checks that thread local storage variables2## are preserved.3 4# RUN: yaml2obj %s -o %t.o5# RUN: echo '---' > %t2.map6# RUN: echo "triple: 'x86_64-apple-darwin'" >> %t2.map7# RUN: echo 'objects:' >> %t2.map8# RUN: echo " - filename: '%t.o'" >> %t2.map9# RUN: echo ' symbols:' >> %t2.map10# RUN: echo ' - { sym: __Z3foov, objAddr: 0x0, binAddr: 0x10000, size: 0x10 }' >> %t2.map11# RUN: echo '...' >> %t2.map12# RUN: dsymutil -y %t2.map --keep-function-for-static -f -o - | llvm-dwarfdump -a - | FileCheck %s13# RUN: dsymutil --linker parallel -y %t2.map --keep-function-for-static -f -o - | llvm-dwarfdump -a - | FileCheck %s14 15# CHECK: file format Mach-O 64-bit x86-6416# CHECK: .debug_info contents:17# CHECK: Compile Unit:18# CHECK: DW_TAG_compile_unit19# CHECK: DW_AT_name{{.*}}"CU1"20# CHECK: DW_TAG_subprogram21# CHECK: DW_AT_name{{.*}}"foo"22# CHECK: DW_TAG_variable23# CHECK: DW_AT_name{{.*}}"var1"24# CHECK: DW_AT_location (DW_OP_const8u 0x{{.*}}, DW_OP_GNU_push_tls_address)25# CHECK: DW_AT_name{{.*}}"var2"26# CHECK: DW_AT_location (DW_OP_const8u 0x{{.*}}, DW_OP_form_tls_address)27 28--- !mach-o29FileHeader:30 magic: 0xFEEDFACF31 cputype: 0x0100000732 cpusubtype: 0x0000000333 filetype: 0x0000000134 ncmds: 235 sizeofcmds: 37636 flags: 0x0000200037 reserved: 0x0000000038LoadCommands:39 - cmd: LC_SEGMENT_6440 cmdsize: 23241 segname: ''42 vmaddr: 0x0043 vmsize: 0x30044 fileoff: 0x30045 filesize: 0x30046 maxprot: 747 initprot: 748 nsects: 249 flags: 050 Sections:51 - sectname: __debug_abbrev52 segname: __DWARF53 addr: 0x000000000000000F54 size: 0x2755 offset: 0x0000038056 align: 057 reloff: 0x0000000058 nreloc: 059 flags: 0x0200000060 reserved1: 0x0000000061 reserved2: 0x0000000062 reserved3: 0x0000000063 - sectname: __debug_info64 segname: __DWARF65 addr: 0x00000000000010066 size: 0x5467 offset: 0x0000041068 align: 069 reloff: 0x0000060070 nreloc: 271 flags: 0x0200000072 reserved1: 0x0000000073 reserved2: 0x0000000074 reserved3: 0x0000000075 relocations:76 - address: 0x3277 symbolnum: 178 pcrel: true79 length: 380 extern: true81 type: 082 scattered: false83 value: 084 - address: 0x4785 symbolnum: 186 pcrel: true87 length: 388 extern: true89 type: 090 scattered: false91 value: 092 - cmd: LC_SYMTAB93 cmdsize: 2494 symoff: 0x70095 nsyms: 296 stroff: 0x72097 strsize: 1098LinkEditData:99 NameList:100 - n_strx: 1101 n_type: 0x0F102 n_sect: 1103 n_desc: 0104 n_value: 0105 - n_strx: 1106 n_type: 0x0F107 n_sect: 1108 n_desc: 0109 n_value: 0110 StringTable:111 - ''112 - '__Z3foov'113 - ''114DWARF:115 debug_abbrev:116 - Table:117 - Tag: DW_TAG_compile_unit118 Children: DW_CHILDREN_yes119 Attributes:120 - Attribute: DW_AT_producer121 Form: DW_FORM_string122 - Attribute: DW_AT_language123 Form: DW_FORM_data2124 - Attribute: DW_AT_name125 Form: DW_FORM_string126 - Tag: DW_TAG_subprogram127 Children: DW_CHILDREN_yes128 Attributes:129 - Attribute: DW_AT_name130 Form: DW_FORM_string131 - Attribute: DW_AT_type132 Form: DW_FORM_ref4133 - Tag: DW_TAG_variable134 Children: DW_CHILDREN_no135 Attributes:136 - Attribute: DW_AT_name137 Form: DW_FORM_string138 - Attribute: DW_AT_type139 Form: DW_FORM_ref4140 - Attribute: DW_AT_location141 Form: DW_FORM_exprloc142 - Tag: DW_TAG_base_type143 Children: DW_CHILDREN_no144 Attributes:145 - Attribute: DW_AT_name146 Form: DW_FORM_string147 debug_info:148 - Version: 4149 Entries:150 - AbbrCode: 1151 Values:152 - CStr: by_hand153 - Value: 0x04154 - CStr: CU1155 - AbbrCode: 4156 Values:157 - CStr: int158 - AbbrCode: 2159 Values:160 - CStr: foo161 - Value: 0x1a162 - AbbrCode: 3163 Values:164 - CStr: var1165 - Value: 0x0000001a166 - BlockData:167 - 0x0e168 - 0x00169 - 0x00170 - 0x01171 - 0x00172 - 0x00173 - 0x00174 - 0x00175 - 0x00176 - 0xe0177 - AbbrCode: 3178 Values:179 - CStr: var2180 - Value: 0x0000001a181 - BlockData:182 - 0x0e183 - 0x00184 - 0x00185 - 0x01186 - 0x00187 - 0x00188 - 0x00189 - 0x00190 - 0x00191 - 0x9b192 - AbbrCode: 0193 - AbbrCode: 0194...195