Home | History | Annotate | Download | only in llvm-readobj
      1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      2 ; The following two object files were generated using the following command:
      3 ;   D:\> cl /Z7 /c source.c
      4 ; with the following contents of D:\source.c:
      5 ;   void z(void);
      6 ;
      7 ;   void x(void) {
      8 ;     z();
      9 ;   }
     10 ;
     11 ;   void y(void) {
     12 ;     z();
     13 ;   }
     14 ;
     15 ;   void f(void) {
     16 ;     x();
     17 ;     y();
     18 ;     z();
     19 ;   }
     20 ; using 32-/64-bit versions of CL v17.00.61030 and v18.00.21005.1 respectively.
     21 RUN: llvm-readobj -s -codeview -section-symbols %p/Inputs/multifunction-linetables.obj.coff-2012-i368 \
     22 RUN:   | FileCheck %s -check-prefix MFUN32
     23 RUN: llvm-readobj -s -codeview -section-symbols %p/Inputs/multifunction-linetables.obj.coff-2013-i368 \
     24 RUN:   | FileCheck %s -check-prefix MFUN32
     25 RUN: llvm-readobj -s -codeview -section-symbols %p/Inputs/multifunction-linetables.obj.coff-2012-x86_64 \
     26 RUN:   | FileCheck %s -check-prefix MFUN64
     27 RUN: llvm-readobj -s -codeview -section-symbols %p/Inputs/multifunction-linetables.obj.coff-2013-x86_64 \
     28 RUN:   | FileCheck %s -check-prefix MFUN64
     29 
     30 MFUN32:      CodeViewDebugInfo [
     31 MFUN32-NEXT:   Magic: 0x4
     32 MFUN32-NEXT:   Subsection [
     33 MFUN32-NEXT:     Type: 0xF1
     34 MFUN32-NEXT:     PayloadSize: 0x52
     35 MFUN32:        ]
     36 MFUN32-NEXT:   Subsection [
     37 MFUN32-NEXT:     Type: 0xF5
     38 MFUN32-NEXT:     PayloadSize: 0x24
     39 MFUN32:        ]
     40 MFUN32-NEXT:   Subsection [
     41 MFUN32-NEXT:     Type: 0xF1
     42 MFUN32-NEXT:     PayloadSize: 0x4B
     43 MFUN32:          ProcStart {
     44 MFUN32-NEXT:       DisplayName: x
     45 MFUN32-NEXT:       Section: _x
     46 MFUN32-NEXT:       CodeSize: 0xA
     47 MFUN32-NEXT:     }
     48 MFUN32-NEXT:     ProcEnd
     49 MFUN32:        ]
     50 MFUN32-NEXT:   Subsection [
     51 MFUN32-NEXT:     Type: 0xF2
     52 MFUN32-NEXT:     PayloadSize: 0x30
     53 MFUN32:          LinkageName: _x
     54 MFUN32-NEXT:   ]
     55 MFUN32-NEXT:   Subsection [
     56 MFUN32-NEXT:     Type: 0xF5
     57 MFUN32-NEXT:     PayloadSize: 0x24
     58 MFUN32:        ]
     59 MFUN32-NEXT:   Subsection [
     60 MFUN32-NEXT:     Type: 0xF1
     61 MFUN32-NEXT:     PayloadSize: 0x4B
     62 MFUN32:          ProcStart {
     63 MFUN32-NEXT:       DisplayName: y
     64 MFUN32-NEXT:       Section: _y
     65 MFUN32-NEXT:       CodeSize: 0xA
     66 MFUN32-NEXT:     }
     67 MFUN32-NEXT:     ProcEnd
     68 MFUN32:        ]
     69 MFUN32-NEXT:   Subsection [
     70 MFUN32-NEXT:     Type: 0xF2
     71 MFUN32-NEXT:     PayloadSize: 0x30
     72 MFUN32:          LinkageName: _y
     73 MFUN32-NEXT:   ]
     74 MFUN32-NEXT:   Subsection [
     75 MFUN32-NEXT:     Type: 0xF5
     76 MFUN32-NEXT:     PayloadSize: 0x24
     77 MFUN32:        ]
     78 MFUN32-NEXT:   Subsection [
     79 MFUN32-NEXT:     Type: 0xF1
     80 MFUN32-NEXT:     PayloadSize: 0x4B
     81 MFUN32:          ProcStart {
     82 MFUN32-NEXT:       DisplayName: f
     83 MFUN32-NEXT:       Section: _f
     84 MFUN32-NEXT:       CodeSize: 0x14
     85 MFUN32-NEXT:     }
     86 MFUN32-NEXT:     ProcEnd
     87 MFUN32:        ]
     88 MFUN32-NEXT:   Subsection [
     89 MFUN32-NEXT:     Type: 0xF2
     90 MFUN32-NEXT:     PayloadSize: 0x40
     91 MFUN32:          LinkageName: _f
     92 MFUN32-NEXT:   ]
     93 MFUN32-NEXT:   Subsection [
     94 MFUN32-NEXT:     Type: 0xF4
     95 MFUN32-NEXT:     PayloadSize: 0x18
     96 MFUN32:        ]
     97 MFUN32-NEXT:   Subsection [
     98 MFUN32-NEXT:     Type: 0xF3
     99 MFUN32-NEXT:     PayloadSize: 0x46
    100 MFUN32:        ]
    101 MFUN32-NEXT:   Subsection [
    102 MFUN32-NEXT:     Type: 0xF1
    103 MFUN32-NEXT:     PayloadSize: 0x8
    104 MFUN32:        ]
    105 MFUN32-NEXT:   FunctionLineTable [
    106 MFUN32-NEXT:     LinkageName: _x
    107 MFUN32-NEXT:     Flags: 0x0
    108 MFUN32-NEXT:     CodeSize: 0xA
    109 MFUN32-NEXT:     FilenameSegment [
    110 MFUN32-NEXT:       Filename: d:\source.c
    111 MFUN32-NEXT:       +0x0: 3
    112 MFUN32-NEXT:       +0x3: 4
    113 MFUN32-NEXT:       +0x8: 5
    114 MFUN32-NEXT:     ]
    115 MFUN32-NEXT:   ]
    116 MFUN32-NEXT:   FunctionLineTable [
    117 MFUN32-NEXT:     LinkageName: _y
    118 MFUN32-NEXT:     Flags: 0x0
    119 MFUN32-NEXT:     CodeSize: 0xA
    120 MFUN32-NEXT:     FilenameSegment [
    121 MFUN32-NEXT:       Filename: d:\source.c
    122 MFUN32-NEXT:       +0x0: 7
    123 MFUN32-NEXT:       +0x3: 8
    124 MFUN32-NEXT:       +0x8: 9
    125 MFUN32-NEXT:     ]
    126 MFUN32-NEXT:   ]
    127 MFUN32-NEXT:   FunctionLineTable [
    128 MFUN32-NEXT:     LinkageName: _f
    129 MFUN32-NEXT:     Flags: 0x0
    130 MFUN32-NEXT:     CodeSize: 0x14
    131 MFUN32-NEXT:     FilenameSegment [
    132 MFUN32-NEXT:       Filename: d:\source.c
    133 MFUN32-NEXT:       +0x0: 11
    134 MFUN32-NEXT:       +0x3: 12
    135 MFUN32-NEXT:       +0x8: 13
    136 MFUN32-NEXT:       +0xD: 14
    137 MFUN32-NEXT:       +0x12: 15
    138 MFUN32-NEXT:     ]
    139 MFUN32-NEXT:   ]
    140 MFUN32-NEXT: ]
    141 
    142 MFUN64:      CodeViewDebugInfo [
    143 MFUN64-NEXT:   Magic: 0x4
    144 MFUN64-NEXT:   Subsection [
    145 MFUN64-NEXT:     Type: 0xF1
    146 MFUN64-NEXT:     PayloadSize: 0x52
    147 MFUN64:        ]
    148 MFUN64-NEXT:   Subsection [
    149 MFUN64-NEXT:     Type: 0xF1
    150 MFUN64-NEXT:     PayloadSize: 0x4B
    151 MFUN64:          ProcStart {
    152 MFUN64-NEXT:       DisplayName: x
    153 MFUN64-NEXT:       Section: x
    154 MFUN64-NEXT:       CodeSize: 0xE
    155 MFUN64-NEXT:     }
    156 MFUN64-NEXT:     ProcEnd
    157 MFUN64:        ]
    158 MFUN64-NEXT:   Subsection [
    159 MFUN64-NEXT:     Type: 0xF2
    160 MFUN64-NEXT:     PayloadSize: 0x30
    161 MFUN64:          LinkageName: x
    162 MFUN64-NEXT:   ]
    163 MFUN64-NEXT:   Subsection [
    164 MFUN64-NEXT:     Type: 0xF1
    165 MFUN64-NEXT:     PayloadSize: 0x4B
    166 MFUN64:          ProcStart {
    167 MFUN64-NEXT:       DisplayName: y
    168 MFUN64-NEXT:       Section: y
    169 MFUN64-NEXT:       CodeSize: 0xE
    170 MFUN64-NEXT:     }
    171 MFUN64-NEXT:     ProcEnd
    172 MFUN64:        ]
    173 MFUN64-NEXT:   Subsection [
    174 MFUN64-NEXT:     Type: 0xF2
    175 MFUN64-NEXT:     PayloadSize: 0x30
    176 MFUN64:          LinkageName: y
    177 MFUN64-NEXT:   ]
    178 MFUN64-NEXT:   Subsection [
    179 MFUN64-NEXT:     Type: 0xF1
    180 MFUN64-NEXT:     PayloadSize: 0x4B
    181 MFUN64:          ProcStart {
    182 MFUN64-NEXT:       DisplayName: f
    183 MFUN64-NEXT:       Section: f
    184 MFUN64-NEXT:       CodeSize: 0x18
    185 MFUN64-NEXT:     }
    186 MFUN64-NEXT:     ProcEnd
    187 MFUN64:        ]
    188 MFUN64-NEXT:   Subsection [
    189 MFUN64-NEXT:     Type: 0xF2
    190 MFUN64-NEXT:     PayloadSize: 0x40
    191 MFUN64:          LinkageName: f
    192 MFUN64-NEXT:   ]
    193 MFUN64-NEXT:   Subsection [
    194 MFUN64-NEXT:     Type: 0xF4
    195 MFUN64-NEXT:     PayloadSize: 0x18
    196 MFUN64:        ]
    197 MFUN64-NEXT:   Subsection [
    198 MFUN64-NEXT:     Type: 0xF3
    199 MFUN64-NEXT:     PayloadSize: 0xD
    200 MFUN64:        ]
    201 MFUN64-NEXT:   Subsection [
    202 MFUN64-NEXT:     Type: 0xF1
    203 MFUN64-NEXT:     PayloadSize: 0x8
    204 MFUN64:        ]
    205 MFUN64-NEXT:   FunctionLineTable [
    206 MFUN64-NEXT:     LinkageName: x
    207 MFUN64-NEXT:     Flags: 0x0
    208 MFUN64-NEXT:     CodeSize: 0xE
    209 MFUN64-NEXT:     FilenameSegment [
    210 MFUN64-NEXT:       Filename: d:\source.c
    211 MFUN64-NEXT:       +0x0: 3
    212 MFUN64-NEXT:       +0x4: 4
    213 MFUN64-NEXT:       +0x9: 5
    214 MFUN64-NEXT:     ]
    215 MFUN64-NEXT:   ]
    216 MFUN64-NEXT:   FunctionLineTable [
    217 MFUN64-NEXT:     LinkageName: y
    218 MFUN64-NEXT:     Flags: 0x0
    219 MFUN64-NEXT:     CodeSize: 0xE
    220 MFUN64-NEXT:     FilenameSegment [
    221 MFUN64-NEXT:       Filename: d:\source.c
    222 MFUN64-NEXT:       +0x0: 7
    223 MFUN64-NEXT:       +0x4: 8
    224 MFUN64-NEXT:       +0x9: 9
    225 MFUN64-NEXT:     ]
    226 MFUN64-NEXT:   ]
    227 MFUN64-NEXT:   FunctionLineTable [
    228 MFUN64-NEXT:     LinkageName: f
    229 MFUN64-NEXT:     Flags: 0x0
    230 MFUN64-NEXT:     CodeSize: 0x18
    231 MFUN64-NEXT:     FilenameSegment [
    232 MFUN64-NEXT:       Filename: d:\source.c
    233 MFUN64-NEXT:       +0x0: 11
    234 MFUN64-NEXT:       +0x4: 12
    235 MFUN64-NEXT:       +0x9: 13
    236 MFUN64-NEXT:       +0xE: 14
    237 MFUN64-NEXT:       +0x13: 15
    238 MFUN64-NEXT:     ]
    239 MFUN64-NEXT:   ]
    240 MFUN64-NEXT: ]
    241 
    242 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    243 ; The following two object files were generated using the following command:
    244 ;   D:\> cl /Z7 /c input.c
    245 ; with the following contents of D:\input.c:
    246 ;   void g(void);
    247 ;
    248 ;   void f(void) {
    249 ;   #line 1 "one.c"
    250 ;     g();
    251 ;   #line 2 "two.c"
    252 ;     g();
    253 ;   #line 7 "one.c"
    254 ;     g();
    255 ;   }
    256 ; using 32-/64-bit versions of CL v17.00.61030 and v18.00.21005.1 respectively.
    257 RUN: llvm-readobj -s -codeview -section-symbols %p/Inputs/multifile-linetables.obj.coff-2012-i368 \
    258 RUN:   | FileCheck %s -check-prefix MFILE32
    259 RUN: llvm-readobj -s -codeview -section-symbols %p/Inputs/multifile-linetables.obj.coff-2013-i368 \
    260 RUN:   | FileCheck %s -check-prefix MFILE32
    261 RUN: llvm-readobj -s -codeview -section-symbols %p/Inputs/multifile-linetables.obj.coff-2012-x86_64 \
    262 RUN:   | FileCheck %s -check-prefix MFILE64
    263 RUN: llvm-readobj -s -codeview -section-symbols %p/Inputs/multifile-linetables.obj.coff-2013-x86_64 \
    264 RUN:   | FileCheck %s -check-prefix MFILE64
    265 
    266 MFILE32:      CodeViewDebugInfo [
    267 MFILE32-NEXT:   Magic: 0x4
    268 MFILE32-NEXT:   Subsection [
    269 MFILE32-NEXT:     Type: 0xF1
    270 MFILE32-NEXT:     PayloadSize: 0x51
    271 MFILE32:        ]
    272 MFILE32-NEXT:   Subsection [
    273 MFILE32-NEXT:     Type: 0xF5
    274 MFILE32-NEXT:     PayloadSize: 0x24
    275 MFILE32:        ]
    276 MFILE32-NEXT:   Subsection [
    277 MFILE32-NEXT:     Type: 0xF1
    278 MFILE32-NEXT:     PayloadSize: 0x4B
    279 MFILE32:          ProcStart {
    280 MFILE32-NEXT:       DisplayName: f
    281 MFILE32-NEXT:       Section: _f
    282 MFILE32-NEXT:       CodeSize: 0x14
    283 MFILE32-NEXT:     }
    284 MFILE32-NEXT:     ProcEnd
    285 MFILE32:        ]
    286 MFILE32-NEXT:   Subsection [
    287 MFILE32-NEXT:     Type: 0xF2
    288 MFILE32-NEXT:     PayloadSize: 0x64
    289 MFILE32:          LinkageName: _f
    290 MFILE32-NEXT:   ]
    291 MFILE32-NEXT:   Subsection [
    292 MFILE32-NEXT:     Type: 0xF4
    293 MFILE32-NEXT:     PayloadSize: 0x28
    294 MFILE32:        ]
    295 MFILE32-NEXT:   Subsection [
    296 MFILE32-NEXT:     Type: 0xF3
    297 MFILE32-NEXT:     PayloadSize: 0x57
    298 MFILE32:        ]
    299 MFILE32-NEXT:   Subsection [
    300 MFILE32-NEXT:     Type: 0xF1
    301 MFILE32-NEXT:     PayloadSize: 0x8
    302 MFILE32:        ]
    303 MFILE32-NEXT:   FunctionLineTable [
    304 MFILE32-NEXT:     LinkageName: _f
    305 MFILE32-NEXT:     Flags: 0x0
    306 MFILE32-NEXT:     CodeSize: 0x14
    307 MFILE32-NEXT:     FilenameSegment [
    308 MFILE32-NEXT:       Filename: d:\input.c
    309 MFILE32-NEXT:       +0x0: 3
    310 MFILE32-NEXT:     ]
    311 MFILE32-NEXT:     FilenameSegment [
    312 MFILE32-NEXT:       Filename: d:\one.c
    313 MFILE32-NEXT:       +0x3: 1
    314 MFILE32-NEXT:     ]
    315 MFILE32-NEXT:     FilenameSegment [
    316 MFILE32-NEXT:       Filename: d:\two.c
    317 MFILE32-NEXT:       +0x8: 2
    318 MFILE32-NEXT:     ]
    319 MFILE32-NEXT:     FilenameSegment [
    320 MFILE32-NEXT:       Filename: d:\one.c
    321 MFILE32-NEXT:       +0xD: 7
    322 MFILE32-NEXT:       +0x12: 8
    323 MFILE32-NEXT:     ]
    324 MFILE32-NEXT:   ]
    325 MFILE32-NEXT: ]
    326 
    327 MFILE64:      CodeViewDebugInfo [
    328 MFILE64-NEXT:   Magic: 0x4
    329 MFILE64-NEXT:   Subsection [
    330 MFILE64-NEXT:     Type: 0xF1
    331 MFILE64-NEXT:     PayloadSize: 0x51
    332 MFILE64:        ]
    333 MFILE64-NEXT:   Subsection [
    334 MFILE64-NEXT:     Type: 0xF1
    335 MFILE64-NEXT:     PayloadSize: 0x4B
    336 MFILE64:          ProcStart {
    337 MFILE64-NEXT:       DisplayName: f
    338 MFILE64-NEXT:       Section: f
    339 MFILE64-NEXT:       CodeSize: 0x18
    340 MFILE64-NEXT:     }
    341 MFILE64-NEXT:     ProcEnd
    342 MFILE64:        ]
    343 MFILE64-NEXT:   Subsection [
    344 MFILE64-NEXT:     Type: 0xF2
    345 MFILE64-NEXT:     PayloadSize: 0x64
    346 MFILE64:          LinkageName: f
    347 MFILE64-NEXT:   ]
    348 MFILE64-NEXT:   Subsection [
    349 MFILE64-NEXT:     Type: 0xF4
    350 MFILE64-NEXT:     PayloadSize: 0x28
    351 MFILE64:        ]
    352 MFILE64-NEXT:   Subsection [
    353 MFILE64-NEXT:     Type: 0xF3
    354 MFILE64-NEXT:     PayloadSize: 0x1E
    355 MFILE64:        ]
    356 MFILE64-NEXT:   Subsection [
    357 MFILE64-NEXT:     Type: 0xF1
    358 MFILE64-NEXT:     PayloadSize: 0x8
    359 MFILE64:        ]
    360 MFILE64-NEXT:   FunctionLineTable [
    361 MFILE64-NEXT:     LinkageName: f
    362 MFILE64-NEXT:     Flags: 0x0
    363 MFILE64-NEXT:     CodeSize: 0x18
    364 MFILE64-NEXT:     FilenameSegment [
    365 MFILE64-NEXT:       Filename: d:\input.c
    366 MFILE64-NEXT:       +0x0: 3
    367 MFILE64-NEXT:     ]
    368 MFILE64-NEXT:     FilenameSegment [
    369 MFILE64-NEXT:       Filename: d:\one.c
    370 MFILE64-NEXT:       +0x4: 1
    371 MFILE64-NEXT:     ]
    372 MFILE64-NEXT:     FilenameSegment [
    373 MFILE64-NEXT:       Filename: d:\two.c
    374 MFILE64-NEXT:       +0x9: 2
    375 MFILE64-NEXT:     ]
    376 MFILE64-NEXT:     FilenameSegment [
    377 MFILE64-NEXT:       Filename: d:\one.c
    378 MFILE64-NEXT:       +0xE: 7
    379 MFILE64-NEXT:       +0x13: 8
    380 MFILE64-NEXT:     ]
    381 MFILE64-NEXT:   ]
    382 MFILE64-NEXT: ]
    383 
    384 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    385 ; The following object files were generated using the following command:
    386 ;   C:\src> cl /Z7 /Gy /c test.cc
    387 ; with the following contents of C:\src\test.cc:
    388 ;   int f()
    389 ;   {
    390 ;     return 0;
    391 ;   }
    392 ;
    393 ;   int g()
    394 ;   {
    395 ;     return 0;
    396 ;   }
    397 ; using 32-version of CL v17.00.61030 and v18.00.21005.1 respectively.
    398 RUN: llvm-readobj -s -codeview -section-symbols %p/Inputs/comdat-function-linetables.obj.coff-2012-i386 \
    399 RUN:   | FileCheck %s -check-prefix MCOMDAT
    400 RUN: llvm-readobj -s -codeview -section-symbols %p/Inputs/comdat-function-linetables.obj.coff-2013-i386 \
    401 RUN:   | FileCheck %s -check-prefix MCOMDAT
    402 
    403 MCOMDAT:      ProcStart {
    404 MCOMDAT-NEXT:   DisplayName: f
    405 MCOMDAT-NEXT:   Section: ?f@@YAHXZ
    406 MCOMDAT-NEXT:   CodeSize: 0x7
    407 MCOMDAT-NEXT: }
    408 MCOMDAT:      FunctionLineTable [
    409 MCOMDAT-NEXT:   LinkageName: ?f@@YAHXZ
    410 MCOMDAT-NEXT:   Flags: 0x0
    411 MCOMDAT-NEXT:   CodeSize: 0x7
    412 MCOMDAT-NEXT:   FilenameSegment [
    413 MCOMDAT-NEXT:     Filename: c:\src\test.cc
    414 MCOMDAT-NEXT:     +0x0: 2
    415 MCOMDAT-NEXT:     +0x3: 3
    416 MCOMDAT-NEXT:     +0x5: 4
    417 MCOMDAT-NEXT:   ]
    418 MCOMDAT-NEXT: ]
    419 MCOMDAT:      ProcStart {
    420 MCOMDAT-NEXT:   DisplayName: g
    421 MCOMDAT-NEXT:   Section: ?g@@YAHXZ
    422 MCOMDAT-NEXT:   CodeSize: 0x7
    423 MCOMDAT-NEXT: }
    424 MCOMDAT:      FunctionLineTable [
    425 MCOMDAT-NEXT:   LinkageName: ?g@@YAHXZ
    426 MCOMDAT-NEXT:   Flags: 0x0
    427 MCOMDAT-NEXT:   CodeSize: 0x7
    428 MCOMDAT-NEXT:   FilenameSegment [
    429 MCOMDAT-NEXT:     Filename: c:\src\test.cc
    430 MCOMDAT-NEXT:     +0x0: 7
    431 MCOMDAT-NEXT:     +0x3: 8
    432 MCOMDAT-NEXT:     +0x5: 9
    433 MCOMDAT-NEXT:   ]
    434 MCOMDAT-NEXT: ]
    435