brintos

brintos / llvm-project-archived public Read only

0
0
Text · 8.3 KiB · ab7ac65 Raw
305 lines · plain
1; RUN: rm -rf %t2; RUN: split-file %s %t3 4; RUN: yaml2obj %t/umbrella.yaml -o %t/System/Library/Frameworks/Umbrella.framework/Umbrella5 6; RUN: clang-installapi -target arm64-apple-macosx14 -install_name \7; RUN: /System/Library/Frameworks/Umbrella.framework/Versions/A/Umbrella \8; RUN: --verify-against=%t/System/Library/Frameworks/Umbrella.framework/Umbrella \9; RUN: -L%t/usr/lib -F%t/System/Library/Frameworks \10; RUN: %t/System/Library/Frameworks/Umbrella.framework --verify-mode=Pedantic -reexport-lBar \11; RUN: -o %t/Umbrella.tbd 2>&1 | FileCheck -allow-empty %s12; RUN: llvm-readtapi -compare %t/Umbrella.tbd %t/expected.tbd 2>&1 | FileCheck -allow-empty %s13 14; CHECK-NOT: error15; CHECK-NOT: warning16 17;--- System/Library/Frameworks/Umbrella.framework/Headers/Umbrella.h18extern const char ld_previous __asm("$ld$previous$/usr/lib/libLdPreviousBindPrevious.1.dylib$$1$11.0$16.0$_function$");19extern void function();20 21;--- umbrella.yaml22--- !mach-o23FileHeader:24  magic:           0xFEEDFACF25  cputype:         0x100000C26  cpusubtype:      0x027  filetype:        0x628  ncmds:           1629  sizeofcmds:      85630  flags:           0x8531  reserved:        0x032LoadCommands:33  - cmd:             LC_SEGMENT_6434    cmdsize:         31235    segname:         __TEXT36    vmaddr:          037    vmsize:          1638438    fileoff:         039    filesize:        1638440    maxprot:         541    initprot:        542    nsects:          343    flags:           044    Sections:45      - sectname:        __text46        segname:         __TEXT47        addr:            0x3FB048        size:            449        offset:          0x3FB050        align:           251        reloff:          0x052        nreloc:          053        flags:           0x8000040054        reserved1:       0x055        reserved2:       0x056        reserved3:       0x057        content:         C0035FD658      - sectname:        __const59        segname:         __TEXT60        addr:            0x3FB461        size:            162        offset:          0x3FB463        align:           064        reloff:          0x065        nreloc:          066        flags:           0x067        reserved1:       0x068        reserved2:       0x069        reserved3:       0x070        content:         '00'71      - sectname:        __unwind_info72        segname:         __TEXT73        addr:            0x3FB874        size:            7275        offset:          0x3FB876        align:           277        reloff:          0x078        nreloc:          079        flags:           0x080        reserved1:       0x081        reserved2:       0x082        reserved3:       0x083        content:         010000001C000000000000001C000000000000001C00000002000000B03F00003400000034000000B53F00000000000034000000030000000C00010010000100000000000000000284  - cmd:             LC_SEGMENT_6485    cmdsize:         7286    segname:         __LINKEDIT87    vmaddr:          1638488    vmsize:          1638489    fileoff:         1638490    filesize:        58491    maxprot:         192    initprot:        193    nsects:          094    flags:           095  - cmd:             LC_ID_DYLIB96    cmdsize:         9697    dylib:98      name:            2499      timestamp:       1100      current_version: 0101      compatibility_version: 0102    Content:         '/System/Library/Frameworks/Umbrella.framework/Versions/A/Umbrella'103    ZeroPadBytes:    7104  - cmd:             LC_DYLD_CHAINED_FIXUPS105    cmdsize:         16106    dataoff:         16384107    datasize:        48108  - cmd:             LC_DYLD_EXPORTS_TRIE109    cmdsize:         16110    dataoff:         16432111    datasize:        104112  - cmd:             LC_SYMTAB113    cmdsize:         24114    symoff:          16560115    nsyms:           2116    stroff:          16592117    strsize:         96118  - cmd:             LC_DYSYMTAB119    cmdsize:         80120    ilocalsym:       0121    nlocalsym:       0122    iextdefsym:      0123    nextdefsym:      2124    iundefsym:       2125    nundefsym:       0126    tocoff:          0127    ntoc:            0128    modtaboff:       0129    nmodtab:         0130    extrefsymoff:    0131    nextrefsyms:     0132    indirectsymoff:  0133    nindirectsyms:   0134    extreloff:       0135    nextrel:         0136    locreloff:       0137    nlocrel:         0138  - cmd:             LC_UUID139    cmdsize:         24140    uuid:            CCD7F304-D97B-3521-A980-CC936CCD34E8141  - cmd:             LC_BUILD_VERSION142    cmdsize:         32143    platform:        1144    minos:           917504145    sdk:             983040146    ntools:          1147    Tools:148      - tool:            3149        version:         62525440150  - cmd:             LC_SOURCE_VERSION151    cmdsize:         16152    version:         0153  - cmd:             LC_SEGMENT_SPLIT_INFO154    cmdsize:         16155    dataoff:         16536156    datasize:        16157  - cmd:             LC_REEXPORT_DYLIB158    cmdsize:         48159    dylib:160      name:            24161      timestamp:       2162      current_version: 65536163      compatibility_version: 65536164    Content:         '/usr/lib/libBar.dylib'165    ZeroPadBytes:    3166  - cmd:             LC_LOAD_DYLIB167    cmdsize:         56168    dylib:169      name:            24170      timestamp:       2171      current_version: 88539136172      compatibility_version: 65536173    Content:         '/usr/lib/libSystem.B.dylib'174    ZeroPadBytes:    6175  - cmd:             LC_FUNCTION_STARTS176    cmdsize:         16177    dataoff:         16552178    datasize:        8179  - cmd:             LC_DATA_IN_CODE180    cmdsize:         16181    dataoff:         16560182    datasize:        0183  - cmd:             LC_CODE_SIGNATURE184    cmdsize:         16185    dataoff:         16688186    datasize:        280187LinkEditData:188  ExportTrie:189    TerminalSize:    0190    NodeOffset:      0191    Name:            ''192    Flags:           0x0193    Address:         0x0194    Other:           0x0195    ImportName:      ''196    Children:197      - TerminalSize:    3198        NodeOffset:      94199        Name:            '$ld$previous$/usr/lib/libLdPreviousBindPrevious.1.dylib$$1$11.0$16.0$_function$'200        Flags:           0x0201        Address:         0x3FB4202        Other:           0x0203        ImportName:      ''204      - TerminalSize:    3205        NodeOffset:      99206        Name:            _function207        Flags:           0x0208        Address:         0x3FB0209        Other:           0x0210        ImportName:      ''211  NameList:212    - n_strx:          2213      n_type:          0xF214      n_sect:          2215      n_desc:          0216      n_value:         16308217    - n_strx:          82218      n_type:          0xF219      n_sect:          1220      n_desc:          0221      n_value:         16304222  StringTable:223    - ' '224    - '$ld$previous$/usr/lib/libLdPreviousBindPrevious.1.dylib$$1$11.0$16.0$_function$'225    - _function226    - ''227    - ''228    - ''229    - ''230  FunctionStarts:  [ 0x3FB0 ]231  ChainedFixups:   [ 0x0, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x2C, 0x0, 232                     0x0, 0x0, 0x2C, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 233                     0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 234                     0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 235                     0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 ]236...237 238;--- /usr/lib/libBar.dylib239{240  "main_library": {241    "exported_symbols": [242      {243        "text": {244          "global": [245            "$ld$previous$/usr/lib/libLdPreviousBindPrevious.1.dylib$$1$11.0$16.0$_function$"246          ]247        }248      }249    ],250    "flags": [251      {252        "attributes": [253          "not_app_extension_safe"254        ]255      }256    ],257    "install_names": [258      {259        "name": "/usr/lib/libBar.dylib"260      }261    ],262    "target_info": [263      {264        "min_deployment": "13",265        "target": "arm64-macos"266      }267    ]268  },269  "tapi_tbd_version": 5270}271 272;--- expected.tbd273{274  "main_library": {275    "compatibility_versions": [ { "version": "0" } ],276    "current_versions": [ { "version": "0" } ],277    "exported_symbols": [278      {279        "data": {280          "global": [281            "$ld$previous$/usr/lib/libLdPreviousBindPrevious.1.dylib$$1$11.0$16.0$_function$"282          ]283        },284        "text": { "global": [ "_function" ] }285      }286    ],287    "flags": [288      { "attributes": [ "not_app_extension_safe" ] }289    ],290    "install_names": [291      { "name": "/System/Library/Frameworks/Umbrella.framework/Versions/A/Umbrella" }292    ],293    "reexported_libraries": [294      { "names": [ "/usr/lib/libBar.dylib" ] }295    ],296    "target_info": [297      {298        "min_deployment": "14",299        "target": "arm64-macos"300      }301    ]302  },303  "tapi_tbd_version": 5304}305