brintos

brintos / llvm-project-archived public Read only

0
0
Text · 20.5 KiB · 6dd221e Raw
690 lines · yaml
1# Tests that the symbol table properly merges the two entries for2# global_constant, even when the debug symbol comes last.3# RUN: mkdir -p %t4# RUN: yaml2obj %s -o %t/a.out5# RUN: %lldb %t/a.out -o "target modules dump symtab a.out" | FileCheck %s6# CHECK: global_constant7# CHECK-NOT: global_constant8--- !mach-o9FileHeader:10  magic:           0xFEEDFACF11  cputype:         0x0100000712  cpusubtype:      0x8000000313  filetype:        0x0000000214  ncmds:           2015  sizeofcmds:      199216  flags:           0x0020008517  reserved:        0x0000000018LoadCommands:19  - cmd:             LC_SEGMENT_6420    cmdsize:         7221    segname:         __PAGEZERO22    vmaddr:          023    vmsize:          429496729624    fileoff:         025    filesize:        026    maxprot:         027    initprot:        028    nsects:          029    flags:           030  - cmd:             LC_SEGMENT_6431    cmdsize:         55232    segname:         __TEXT33    vmaddr:          429496729634    vmsize:          409635    fileoff:         036    filesize:        409637    maxprot:         538    initprot:        539    nsects:          640    flags:           041    Sections:42      - sectname:        __text43        segname:         __TEXT44        addr:            0x0000000100000DE045        size:            38346        offset:          0x00000DE047        align:           448        reloff:          0x0000000049        nreloc:          050        flags:           0x8000040051        reserved1:       0x0000000052        reserved2:       0x0000000053        reserved3:       0x0000000054      - sectname:        __stubs55        segname:         __TEXT56        addr:            0x0000000100000F6057        size:            1858        offset:          0x00000F6059        align:           160        reloff:          0x0000000061        nreloc:          062        flags:           0x8000040863        reserved1:       0x0000000064        reserved2:       0x0000000665        reserved3:       0x0000000066      - sectname:        __stub_helper67        segname:         __TEXT68        addr:            0x0000000100000F7469        size:            4670        offset:          0x00000F7471        align:           272        reloff:          0x0000000073        nreloc:          074        flags:           0x8000040075        reserved1:       0x0000000076        reserved2:       0x0000000077        reserved3:       0x0000000078      - sectname:        __swift5_typeref79        segname:         __TEXT80        addr:            0x0000000100000FA281        size:            782        offset:          0x00000FA283        align:           184        reloff:          0x0000000085        nreloc:          086        flags:           0x0000000087        reserved1:       0x0000000088        reserved2:       0x0000000089        reserved3:       0x0000000090      - sectname:        __const91        segname:         __TEXT92        addr:            0x0000000100000FAA93        size:            294        offset:          0x00000FAA95        align:           196        reloff:          0x0000000097        nreloc:          098        flags:           0x0000000099        reserved1:       0x00000000100        reserved2:       0x00000000101        reserved3:       0x00000000102      - sectname:        __unwind_info103        segname:         __TEXT104        addr:            0x0000000100000FAC105        size:            80106        offset:          0x00000FAC107        align:           2108        reloff:          0x00000000109        nreloc:          0110        flags:           0x00000000111        reserved1:       0x00000000112        reserved2:       0x00000000113        reserved3:       0x00000000114  - cmd:             LC_SEGMENT_64115    cmdsize:         232116    segname:         __DATA_CONST117    vmaddr:          4294971392118    vmsize:          4096119    fileoff:         4096120    filesize:        4096121    maxprot:         3122    initprot:        3123    nsects:          2124    flags:           16125    Sections:126      - sectname:        __got127        segname:         __DATA_CONST128        addr:            0x0000000100001000129        size:            8130        offset:          0x00001000131        align:           3132        reloff:          0x00000000133        nreloc:          0134        flags:           0x00000006135        reserved1:       0x00000003136        reserved2:       0x00000000137        reserved3:       0x00000000138      - sectname:        __objc_imageinfo139        segname:         __DATA_CONST140        addr:            0x0000000100001008141        size:            8142        offset:          0x00001008143        align:           2144        reloff:          0x00000000145        nreloc:          0146        flags:           0x00000000147        reserved1:       0x00000000148        reserved2:       0x00000000149        reserved3:       0x00000000150  - cmd:             LC_SEGMENT_64151    cmdsize:         312152    segname:         __DATA153    vmaddr:          4294975488154    vmsize:          4096155    fileoff:         8192156    filesize:        4096157    maxprot:         3158    initprot:        3159    nsects:          3160    flags:           0161    Sections:162      - sectname:        __la_symbol_ptr163        segname:         __DATA164        addr:            0x0000000100002000165        size:            24166        offset:          0x00002000167        align:           3168        reloff:          0x00000000169        nreloc:          0170        flags:           0x00000007171        reserved1:       0x00000004172        reserved2:       0x00000000173        reserved3:       0x00000000174      - sectname:        __data175        segname:         __DATA176        addr:            0x0000000100002018177        size:            16178        offset:          0x00002018179        align:           3180        reloff:          0x00000000181        nreloc:          0182        flags:           0x00000000183        reserved1:       0x00000000184        reserved2:       0x00000000185        reserved3:       0x00000000186      - sectname:        __common187        segname:         __DATA188        addr:            0x0000000100002028189        size:            16190        offset:          0x00000000191        align:           3192        reloff:          0x00000000193        nreloc:          0194        flags:           0x00000001195        reserved1:       0x00000000196        reserved2:       0x00000000197        reserved3:       0x00000000198  - cmd:             LC_SEGMENT_64199    cmdsize:         72200    segname:         __LINKEDIT201    vmaddr:          4294979584202    vmsize:          4096203    fileoff:         12288204    filesize:        1924205    maxprot:         1206    initprot:        1207    nsects:          0208    flags:           0209  - cmd:             LC_DYLD_INFO_ONLY210    cmdsize:         48211    rebase_off:      12288212    rebase_size:     8213    bind_off:        12296214    bind_size:       24215    weak_bind_off:   0216    weak_bind_size:  0217    lazy_bind_off:   12320218    lazy_bind_size:  96219    export_off:      12416220    export_size:     48221  - cmd:             LC_SYMTAB222    cmdsize:         24223    symoff:          12472224    nsyms:           41225    stroff:          13156226    strsize:         1056227  - cmd:             LC_DYSYMTAB228    cmdsize:         80229    ilocalsym:       0230    nlocalsym:       35231    iextdefsym:      35232    nextdefsym:      2233    iundefsym:       37234    nundefsym:       4235    tocoff:          0236    ntoc:            0237    modtaboff:       0238    nmodtab:         0239    extrefsymoff:    0240    nextrefsyms:     0241    indirectsymoff:  13128242    nindirectsyms:   7243    extreloff:       0244    nextrel:         0245    locreloff:       0246    nlocrel:         0247  - cmd:             LC_LOAD_DYLINKER248    cmdsize:         32249    name:            12250    Content:         '/usr/lib/dyld'251    ZeroPadBytes:    7252  - cmd:             LC_UUID253    cmdsize:         24254    uuid:            A89F9D23-8190-3946-A70B-B8E833E68640255  - cmd:             LC_BUILD_VERSION256    cmdsize:         32257    platform:        1258    minos:           659200259    sdk:             659200260    ntools:          1261    Tools:262      - tool:            3263        version:         36176384264  - cmd:             LC_SOURCE_VERSION265    cmdsize:         16266    version:         0267  - cmd:             LC_MAIN268    cmdsize:         24269    entryoff:        3552270    stacksize:       0271  - cmd:             LC_LOAD_DYLIB272    cmdsize:         56273    dylib:274      name:            24275      timestamp:       2276      current_version: 14942208277      compatibility_version: 65536278    Content:         '/usr/lib/libobjc.A.dylib'279    ZeroPadBytes:    8280  - cmd:             LC_LOAD_DYLIB281    cmdsize:         56282    dylib:283      name:            24284      timestamp:       2285      current_version: 83951616286      compatibility_version: 65536287    Content:         '/usr/lib/libSystem.B.dylib'288    ZeroPadBytes:    6289  - cmd:             LC_LOAD_DYLIB290    cmdsize:         64291    dylib:292      name:            24293      timestamp:       2294      current_version: 0295      compatibility_version: 65536296    Content:         '/usr/lib/swift/libswiftCore.dylib'297    ZeroPadBytes:    7298  - cmd:             LC_RPATH299    cmdsize:         136300    path:            12301    Content:         '/Volumes/Jonas/internal-stable/build/Ninja-RelWithDebInfoAssert+stdlib-RelWithDebInfo/swift-macosx-x86_64/lib/swift/macosx'302    ZeroPadBytes:    2303  - cmd:             LC_RPATH304    cmdsize:         128305    path:            12306    Content:         '/Applications/XcodeY.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift'307    ZeroPadBytes:    2308  - cmd:             LC_FUNCTION_STARTS309    cmdsize:         16310    dataoff:         12464311    datasize:        8312  - cmd:             LC_DATA_IN_CODE313    cmdsize:         16314    dataoff:         12472315    datasize:        0316LinkEditData:317  RebaseOpcodes:318    - Opcode:          REBASE_OPCODE_SET_TYPE_IMM319      Imm:             1320    - Opcode:          REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB321      Imm:             3322      ExtraData:323        - 0x0000000000000000324    - Opcode:          REBASE_OPCODE_DO_REBASE_IMM_TIMES325      Imm:             3326    - Opcode:          REBASE_OPCODE_DONE327      Imm:             0328  BindOpcodes:329    - Opcode:          BIND_OPCODE_SET_DYLIB_ORDINAL_IMM330      Imm:             2331      Symbol:          ''332    - Opcode:          BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM333      Imm:             0334      Symbol:          dyld_stub_binder335    - Opcode:          BIND_OPCODE_SET_TYPE_IMM336      Imm:             1337      Symbol:          ''338    - Opcode:          BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB339      Imm:             2340      ULEBExtraData:341        - 0x0000000000000000342      Symbol:          ''343    - Opcode:          BIND_OPCODE_DO_BIND344      Imm:             0345      Symbol:          ''346    - Opcode:          BIND_OPCODE_DONE347      Imm:             0348      Symbol:          ''349  LazyBindOpcodes:350    - Opcode:          BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB351      Imm:             3352      ULEBExtraData:353        - 0x0000000000000000354      Symbol:          ''355    - Opcode:          BIND_OPCODE_SET_DYLIB_ORDINAL_IMM356      Imm:             3357      Symbol:          ''358    - Opcode:          BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM359      Imm:             0360      Symbol:          _swift_beginAccess361    - Opcode:          BIND_OPCODE_DO_BIND362      Imm:             0363      Symbol:          ''364    - Opcode:          BIND_OPCODE_DONE365      Imm:             0366      Symbol:          ''367    - Opcode:          BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB368      Imm:             3369      ULEBExtraData:370        - 0x0000000000000008371      Symbol:          ''372    - Opcode:          BIND_OPCODE_SET_DYLIB_ORDINAL_IMM373      Imm:             3374      Symbol:          ''375    - Opcode:          BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM376      Imm:             0377      Symbol:          _swift_endAccess378    - Opcode:          BIND_OPCODE_DO_BIND379      Imm:             0380      Symbol:          ''381    - Opcode:          BIND_OPCODE_DONE382      Imm:             0383      Symbol:          ''384    - Opcode:          BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB385      Imm:             3386      ULEBExtraData:387        - 0x0000000000000010388      Symbol:          ''389    - Opcode:          BIND_OPCODE_SET_DYLIB_ORDINAL_IMM390      Imm:             3391      Symbol:          ''392    - Opcode:          BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM393      Imm:             0394      Symbol:          _swift_getTypeByMangledNameInContext395    - Opcode:          BIND_OPCODE_DO_BIND396      Imm:             0397      Symbol:          ''398    - Opcode:          BIND_OPCODE_DONE399      Imm:             0400      Symbol:          ''401    - Opcode:          BIND_OPCODE_DONE402      Imm:             0403      Symbol:          ''404    - Opcode:          BIND_OPCODE_DONE405      Imm:             0406      Symbol:          ''407    - Opcode:          BIND_OPCODE_DONE408      Imm:             0409      Symbol:          ''410    - Opcode:          BIND_OPCODE_DONE411      Imm:             0412      Symbol:          ''413    - Opcode:          BIND_OPCODE_DONE414      Imm:             0415      Symbol:          ''416  ExportTrie:417    TerminalSize:    0418    NodeOffset:      0419    Name:            ''420    Flags:           0x0000000000000000421    Address:         0x0000000000000000422    Other:           0x0000000000000000423    ImportName:      ''424    Children:425      - TerminalSize:    0426        NodeOffset:      5427        Name:            _428        Flags:           0x0000000000000000429        Address:         0x0000000000000000430        Other:           0x0000000000000000431        ImportName:      ''432        Children:433          - TerminalSize:    2434            NodeOffset:      33435            Name:            _mh_execute_header436            Flags:           0x0000000000000000437            Address:         0x0000000000000000438            Other:           0x0000000000000000439            ImportName:      ''440          - TerminalSize:    3441            NodeOffset:      37442            Name:            main443            Flags:           0x0000000000000000444            Address:         0x0000000000000DE0445            Other:           0x0000000000000000446            ImportName:      ''447  NameList:448    - n_strx:          118449      n_type:          0x1E450      n_sect:          1451      n_desc:          0452      n_value:         4294970976453    - n_strx:          133454      n_type:          0x1E455      n_sect:          1456      n_desc:          0457      n_value:         4294971008458    - n_strx:          151459      n_type:          0x1E460      n_sect:          1461      n_desc:          128462      n_value:         4294971104463    - n_strx:          199464      n_type:          0x1E465      n_sect:          4466      n_desc:          128467      n_value:         4294971298468    - n_strx:          216469      n_type:          0x1E470      n_sect:          5471      n_desc:          128472      n_value:         4294971306473    - n_strx:          244474      n_type:          0x0E475      n_sect:          10476      n_desc:          0477      n_value:         4294975512478    - n_strx:          259479      n_type:          0x1E480      n_sect:          10481      n_desc:          128482      n_value:         4294975520483    - n_strx:          271484      n_type:          0x1E485      n_sect:          11486      n_desc:          0487      n_value:         4294975528488    - n_strx:          298489      n_type:          0x1E490      n_sect:          11491      n_desc:          0492      n_value:         4294975536493    - n_strx:          325494      n_type:          0x32495      n_sect:          0496      n_desc:          0497      n_value:         1570141141498    - n_strx:          540499      n_type:          0x64500      n_sect:          0501      n_desc:          0502      n_value:         0503    - n_strx:          633504      n_type:          0x64505      n_sect:          0506      n_desc:          0507      n_value:         0508    - n_strx:          644509      n_type:          0x66510      n_sect:          3511      n_desc:          1512      n_value:         1570141203513    - n_strx:          1514      n_type:          0x2E515      n_sect:          1516      n_desc:          0517      n_value:         4294970848518    - n_strx:          852519      n_type:          0x24520      n_sect:          1521      n_desc:          0522      n_value:         4294970848523    - n_strx:          1524      n_type:          0x24525      n_sect:          0526      n_desc:          0527      n_value:         128528    - n_strx:          1529      n_type:          0x4E530      n_sect:          1531      n_desc:          0532      n_value:         128533    - n_strx:          1534      n_type:          0x2E535      n_sect:          1536      n_desc:          0537      n_value:         4294970976538    - n_strx:          858539      n_type:          0x24540      n_sect:          1541      n_desc:          0542      n_value:         4294970976543    - n_strx:          1544      n_type:          0x24545      n_sect:          0546      n_desc:          0547      n_value:         32548    - n_strx:          1549      n_type:          0x4E550      n_sect:          1551      n_desc:          0552      n_value:         32553    - n_strx:          1554      n_type:          0x2E555      n_sect:          1556      n_desc:          0557      n_value:         4294971008558    - n_strx:          873559      n_type:          0x24560      n_sect:          1561      n_desc:          0562      n_value:         4294971008563    - n_strx:          1564      n_type:          0x24565      n_sect:          0566      n_desc:          0567      n_value:         96568    - n_strx:          1569      n_type:          0x4E570      n_sect:          1571      n_desc:          0572      n_value:         96573    - n_strx:          1574      n_type:          0x2E575      n_sect:          1576      n_desc:          0577      n_value:         4294971104578    - n_strx:          891579      n_type:          0x24580      n_sect:          1581      n_desc:          0582      n_value:         4294971104583    - n_strx:          1584      n_type:          0x24585      n_sect:          0586      n_desc:          0587      n_value:         127588    - n_strx:          1589      n_type:          0x4E590      n_sect:          1591      n_desc:          0592      n_value:         127593    - n_strx:          939594      n_type:          0x20595      n_sect:          0596      n_desc:          0597      n_value:         0598    - n_strx:          956599      n_type:          0x20600      n_sect:          0601      n_desc:          0602      n_value:         0603    - n_strx:          984604      n_type:          0x20605      n_sect:          0606      n_desc:          0607      n_value:         0608    - n_strx:          996609      n_type:          0x20610      n_sect:          0611      n_desc:          0612      n_value:         0613    - n_strx:          1023614      n_type:          0x20615      n_sect:          0616      n_desc:          0617      n_value:         0618    - n_strx:          1619      n_type:          0x64620      n_sect:          1621      n_desc:          0622      n_value:         0623    - n_strx:          2624      n_type:          0x0F625      n_sect:          1626      n_desc:          16627      n_value:         4294967296628    - n_strx:          22629      n_type:          0x0F630      n_sect:          1631      n_desc:          0632      n_value:         4294970848633    - n_strx:          28634      n_type:          0x01635      n_sect:          0636      n_desc:          768637      n_value:         0638    - n_strx:          47639      n_type:          0x01640      n_sect:          0641      n_desc:          768642      n_value:         0643    - n_strx:          64644      n_type:          0x01645      n_sect:          0646      n_desc:          768647      n_value:         0648    - n_strx:          101649      n_type:          0x01650      n_sect:          0651      n_desc:          512652      n_value:         0653  StringTable:654    - ' '655    - __mh_execute_header656    - _main657    - _swift_beginAccess658    - _swift_endAccess659    - _swift_getTypeByMangledNameInContext660    - dyld_stub_binder661    - '_$s1a3useyyxlF'662    - '_$s1a1fyySi_SiztF'663    - ___swift_instantiateConcreteTypeFromMangledName664    - _symbolic Si_Sit665    - ___swift_reflection_version666    - __dyld_private667    - '_$sSi_SitMD'668    - '_$s1a15global_constantSivp'669    - '_$s1a15global_variableSivp'670    - '/Volumes/Jonas/internal-stable/build/Ninja-RelWithDebInfoAssert+stdlib-RelWithDebInfo/lldb-macosx-x86_64/lldb-test-build.noindex/lang/swift/variables/let/TestSwiftLetConstants.test_let_constants_dwarf/a.swiftmodule'671    - '/Volumes/Jonas/internal-stable/lldb/packages/Python/lldbsuite/test/lang/swift/variables/let/'672    - main.swift673    - '/Volumes/Jonas/internal-stable/build/Ninja-RelWithDebInfoAssert+stdlib-RelWithDebInfo/lldb-macosx-x86_64/lldb-test-build.noindex/lang/swift/variables/let/TestSwiftLetConstants.test_let_constants_dwarf/main.o'674    - _main675    - '_$s1a3useyyxlF'676    - '_$s1a1fyySi_SiztF'677    - ___swift_instantiateConcreteTypeFromMangledName678    - _symbolic Si_Sit679    - ___swift_reflection_version680    - '_$sSi_SitMD'681    - '_$s1a15global_constantSivp'682    - '_$s1a15global_variableSivp'683    - ''684    - ''685    - ''686    - ''687    - ''688    - ''689...690