brintos

brintos / llvm-project-archived public Read only

0
0
Text · 13.3 KiB · 1e4ddf9 Raw
441 lines · plain
1; RUN: rm -rf %t2; RUN: split-file %s %t3; RUN: sed -e "s|DSTROOT|%/t|g" %t/inputs.json.in > %t/inputs.json4 5; RUN: yaml2obj %t/MagicSymbols.yaml -o %t/MagicSymbols6 7; RUN: not clang-installapi -target x86_64-apple-macosx13 \8; RUN: -install_name \9; RUN: /System/Library/Frameworks/SpecialLinkerSymbols.framework/Versions/A/SpecialLinkerSymbols \10; RUN: -current_version 1 -compatibility_version 1 \11; RUN: %t/inputs.json -o %t/output.tbd \12; RUN: --verify-mode=ErrorsOnly \13; RUN: --verify-against=%t/MagicSymbols 2>&1 | FileCheck %s14 15CHECK: warning: violations found for x86_6416CHECK: error: no declaration found for exported symbol '$ld$add$os10.4$_symbol2' in dynamic library17CHECK: error: no declaration found for exported symbol '$ld$add$os10.5$_symbol2' in dynamic library18CHECK: error: no declaration found for exported symbol '$ld$hide$os10.6$_symbol1' in dynamic library19CHECK: error: no declaration found for exported symbol '$ld$hide$os10.7$_symbol1' in dynamic library20CHECK: error: no declaration found for exported symbol '$ld$weak$os10.5$_symbol3' in dynamic library21CHECK: error: no declaration found for exported symbol '$ld$weak$os10.4$_symbol3' in dynamic library22CHECK: error: no declaration found for exported symbol '$ld$install_name$os10.4$/System/Library/Frameworks/A.framework/Versions/A/A' in dynamic library23CHECK: error: no declaration found for exported symbol '$ld$install_name$os10.5$/System/Library/Frameworks/B.framework/Versions/A/B' in dynamic library24 25;--- MagicSymbols.h26#ifndef SPECIAL_LINKER_SYMBOLS_H27#define SPECIAL_LINKER_SYMBOLS_H28 29extern const int SpecialLinkerSymbolsVersion;30 31extern int symbol1;32extern int symbol3;33 34#endif // SPECIAL_LINKER_SYMBOLS_H35 36;--- inputs.json.in37{38  "headers": [ {39    "path" : "DSTROOT/MagicSymbols.h",40    "type" : "project"41  }42  ],43  "version": "3"44}45 46;--- MagicSymbols.yaml47--- !mach-o48FileHeader:49  magic:           0xFEEDFACF50  cputype:         0x100000751  cpusubtype:      0x352  filetype:        0x653  ncmds:           1254  sizeofcmds:      95255  flags:           0x10008556  reserved:        0x057LoadCommands:58  - cmd:             LC_SEGMENT_6459    cmdsize:         23260    segname:         __TEXT61    vmaddr:          062    vmsize:          409663    fileoff:         064    filesize:        409665    maxprot:         566    initprot:        567    nsects:          268    flags:           069    Sections:70      - sectname:        __text71        segname:         __TEXT72        addr:            0xBD873        size:            074        offset:          0xBD875        align:           076        reloff:          0x077        nreloc:          078        flags:           0x8000000079        reserved1:       0x080        reserved2:       0x081        reserved3:       0x082        content:         ''83      - sectname:        __const84        segname:         __TEXT85        addr:            0xBD886        size:            487        offset:          0xBD888        align:           289        reloff:          0x090        nreloc:          091        flags:           0x092        reserved1:       0x093        reserved2:       0x094        reserved3:       0x095        content:         '07000000'96  - cmd:             LC_SEGMENT_6497    cmdsize:         23298    segname:         __DATA99    vmaddr:          4096100    vmsize:          4096101    fileoff:         4096102    filesize:        4096103    maxprot:         3104    initprot:        3105    nsects:          2106    flags:           0107    Sections:108      - sectname:        __data109        segname:         __DATA110        addr:            0x1000111        size:            8112        offset:          0x1000113        align:           2114        reloff:          0x0115        nreloc:          0116        flags:           0x0117        reserved1:       0x0118        reserved2:       0x0119        reserved3:       0x0120        content:         4D00000009030000121      - sectname:        __common122        segname:         __DATA123        addr:            0x1008124        size:            8125        offset:          0x0126        align:           0127        reloff:          0x0128        nreloc:          0129        flags:           0x1130        reserved1:       0x0131        reserved2:       0x0132        reserved3:       0x0133  - cmd:             LC_SEGMENT_64134    cmdsize:         72135    segname:         __LINKEDIT136    vmaddr:          8192137    vmsize:          944138    fileoff:         8192139    filesize:        944140    maxprot:         1141    initprot:        1142    nsects:          0143    flags:           0144  - cmd:             LC_DYLD_INFO_ONLY145    cmdsize:         48146    rebase_off:      0147    rebase_size:     0148    bind_off:        0149    bind_size:       0150    weak_bind_off:   0151    weak_bind_size:  0152    lazy_bind_off:   0153    lazy_bind_size:  0154    export_off:      8192155    export_size:     376156  - cmd:             LC_SYMTAB157    cmdsize:         24158    symoff:          8576159    nsyms:           12160    stroff:          8768161    strsize:         368162  - cmd:             LC_DYSYMTAB163    cmdsize:         80164    ilocalsym:       0165    nlocalsym:       0166    iextdefsym:      0167    nextdefsym:      11168    iundefsym:       11169    nundefsym:       1170    tocoff:          0171    ntoc:            0172    modtaboff:       0173    nmodtab:         0174    extrefsymoff:    0175    nextrefsyms:     0176    indirectsymoff:  0177    nindirectsyms:   0178    extreloff:       0179    nextrel:         0180    locreloff:       0181    nlocrel:         0182  - cmd:             LC_ID_DYLIB183    cmdsize:         120184    dylib:185      name:            24186      timestamp:       0187      current_version: 65536188      compatibility_version: 65536189    Content:         '/System/Library/Frameworks/SpecialLinkerSymbols.framework/Versions/A/SpecialLinkerSymbols'190    ZeroPadBytes:    7191  - cmd:             LC_UUID192    cmdsize:         24193    uuid:            4C4C4478-5555-3144-A106-356C3C9DACA3194  - cmd:             LC_BUILD_VERSION195    cmdsize:         32196    platform:        1197    minos:           851968198    sdk:             983040199    ntools:          1200    Tools:201      - tool:            4202        version:         1245184203  - cmd:             LC_LOAD_DYLIB204    cmdsize:         56205    dylib:206      name:            24207      timestamp:       0208      current_version: 88539136209      compatibility_version: 65536210    Content:         '/usr/lib/libSystem.B.dylib'211    ZeroPadBytes:    6212  - cmd:             LC_FUNCTION_STARTS213    cmdsize:         16214    dataoff:         8568215    datasize:        8216  - cmd:             LC_DATA_IN_CODE217    cmdsize:         16218    dataoff:         8576219    datasize:        0220LinkEditData:221  ExportTrie:222    TerminalSize:    0223    NodeOffset:      0224    Name:            ''225    Flags:           0x0226    Address:         0x0227    Other:           0x0228    ImportName:      ''229    Children:230      - TerminalSize:    0231        NodeOffset:      11232        Name:            _233        Flags:           0x0234        Address:         0x0235        Other:           0x0236        ImportName:      ''237        Children:238          - TerminalSize:    3239            NodeOffset:      50240            Name:            SpecialLinkerSymbolsVersion241            Flags:           0x0242            Address:         0xBD8243            Other:           0x0244            ImportName:      ''245          - TerminalSize:    0246            NodeOffset:      55247            Name:            symbol248            Flags:           0x0249            Address:         0x0250            Other:           0x0251            ImportName:      ''252            Children:253              - TerminalSize:    3254                NodeOffset:      63255                Name:            '3'256                Flags:           0x0257                Address:         0x1004258                Other:           0x0259                ImportName:      ''260              - TerminalSize:    3261                NodeOffset:      68262                Name:            '1'263                Flags:           0x0264                Address:         0x1000265                Other:           0x0266                ImportName:      ''267      - TerminalSize:    0268        NodeOffset:      73269        Name:            '$ld$'270        Flags:           0x0271        Address:         0x0272        Other:           0x0273        ImportName:      ''274        Children:275          - TerminalSize:    0276            NodeOffset:      134277            Name:            'add$os10.'278            Flags:           0x0279            Address:         0x0280            Other:           0x0281            ImportName:      ''282            Children:283              - TerminalSize:    3284                NodeOffset:      162285                Name:            '4$_symbol2'286                Flags:           0x0287                Address:         0x1008288                Other:           0x0289                ImportName:      ''290              - TerminalSize:    3291                NodeOffset:      167292                Name:            '5$_symbol2'293                Flags:           0x0294                Address:         0x1009295                Other:           0x0296                ImportName:      ''297          - TerminalSize:    0298            NodeOffset:      172299            Name:            'hide$os10.'300            Flags:           0x0301            Address:         0x0302            Other:           0x0303            ImportName:      ''304            Children:305              - TerminalSize:    3306                NodeOffset:      200307                Name:            '6$_symbol1'308                Flags:           0x0309                Address:         0x100A310                Other:           0x0311                ImportName:      ''312              - TerminalSize:    3313                NodeOffset:      205314                Name:            '7$_symbol1'315                Flags:           0x0316                Address:         0x100B317                Other:           0x0318                ImportName:      ''319          - TerminalSize:    0320            NodeOffset:      210321            Name:            'weak$os10.'322            Flags:           0x0323            Address:         0x0324            Other:           0x0325            ImportName:      ''326            Children:327              - TerminalSize:    3328                NodeOffset:      238329                Name:            '5$_symbol3'330                Flags:           0x0331                Address:         0x100F332                Other:           0x0333                ImportName:      ''334              - TerminalSize:    3335                NodeOffset:      243336                Name:            '4$_symbol3'337                Flags:           0x0338                Address:         0x100E339                Other:           0x0340                ImportName:      ''341          - TerminalSize:    0342            NodeOffset:      248343            Name:            'install_name$os10.'344            Flags:           0x0345            Address:         0x0346            Other:           0x0347            ImportName:      ''348            Children:349              - TerminalSize:    3350                NodeOffset:      362351                Name:            '4$/System/Library/Frameworks/A.framework/Versions/A/A'352                Flags:           0x0353                Address:         0x100C354                Other:           0x0355                ImportName:      ''356              - TerminalSize:    3357                NodeOffset:      367358                Name:            '5$/System/Library/Frameworks/B.framework/Versions/A/B'359                Flags:           0x0360                Address:         0x100D361                Other:           0x0362                ImportName:      ''363  NameList:364    - n_strx:          2365      n_type:          0xF366      n_sect:          4367      n_desc:          0368      n_value:         4104369    - n_strx:          26370      n_type:          0xF371      n_sect:          4372      n_desc:          0373      n_value:         4105374    - n_strx:          50375      n_type:          0xF376      n_sect:          4377      n_desc:          0378      n_value:         4106379    - n_strx:          75380      n_type:          0xF381      n_sect:          4382      n_desc:          0383      n_value:         4107384    - n_strx:          100385      n_type:          0xF386      n_sect:          4387      n_desc:          0388      n_value:         4108389    - n_strx:          176390      n_type:          0xF391      n_sect:          4392      n_desc:          0393      n_value:         4109394    - n_strx:          252395      n_type:          0xF396      n_sect:          4397      n_desc:          0398      n_value:         4110399    - n_strx:          277400      n_type:          0xF401      n_sect:          4402      n_desc:          0403      n_value:         4111404    - n_strx:          302405      n_type:          0xF406      n_sect:          2407      n_desc:          0408      n_value:         3032409    - n_strx:          331410      n_type:          0xF411      n_sect:          3412      n_desc:          0413      n_value:         4096414    - n_strx:          340415      n_type:          0xF416      n_sect:          3417      n_desc:          0418      n_value:         4100419    - n_strx:          349420      n_type:          0x1421      n_sect:          0422      n_desc:          256423      n_value:         0424  StringTable:425    - ' '426    - '$ld$add$os10.4$_symbol2'427    - '$ld$add$os10.5$_symbol2'428    - '$ld$hide$os10.6$_symbol1'429    - '$ld$hide$os10.7$_symbol1'430    - '$ld$install_name$os10.4$/System/Library/Frameworks/A.framework/Versions/A/A'431    - '$ld$install_name$os10.5$/System/Library/Frameworks/B.framework/Versions/A/B'432    - '$ld$weak$os10.4$_symbol3'433    - '$ld$weak$os10.5$_symbol3'434    - _SpecialLinkerSymbolsVersion435    - _symbol1436    - _symbol3437    - dyld_stub_binder438    - ''439    - ''440...441