llvm-project/clang/test/InstallAPI/diagnostics-zippered.test
Cyndy Ishida c24efffabb
[InstallAPI] Handle zippered frameworks (#88205)
A zippered framework is a single framework that can be loaded in both
macOS and macatalyst processes. Broadly to InstallAPI, it means the same
interface can represent two separate platforms.

A dylib's symbol table does not distinguish between macOS/macCatalyst.
  `InstallAPI` provides the ability for the tbd file to distinct
symbols between them.
The verifier handles this special logic by tracking all unavailable and
obsoleted APIs in this context and checking against those when
determining dylib symbols with no matching declaration.

* If there exists an available decl for either platform, do not warn.
* If there is no available decl, emit a diagnostic and print the source
location for both decls.
2024-04-11 20:01:55 -07:00

766 lines
40 KiB
Plaintext

; RUN: rm -rf %t
; RUN: split-file %s %t
; RUN: cp -r %S/Inputs/Foundation/Foundation.framework %t/System/Library/Frameworks/
; RUN: sed -e "s|DSTROOT|%/t|g" %t/inputs.json.in > %t/inputs.json
; RUN: yaml2obj %t/Mismatch.yaml -o %t/System/Library/Frameworks/Mismatch.framework/Mismatch
; RUN: not clang-installapi --target=arm64-apple-macos13 \
; RUN: --target=x86_64-apple-macos13 -darwin-target-variant x86_64-apple-ios16.0-macabi \
; RUN: -darwin-target-variant arm64-apple-ios16.0-macabi \
; RUN: -F %t/System/Library/Frameworks -isysroot %S/Inputs/MacOSX13.0.sdk \
; RUN: -install_name /System/Library/Frameworks/Mismatch.framework/Versions/A/Mismatch \
; RUN: -current_version 1 -compatibility_version 1 %t/inputs.json -o %t/Mismatch.tbd \
; RUN: --verify-against=%t/System/Library/Frameworks/Mismatch.framework/Mismatch \
; RUN: --verify-mode=Pedantic 2>&1 | FileCheck %s
; CHECK: warning: violations found for x86_64-apple-macos13
; CHECK: error: declaration has external linkage, but dynamic library doesn't have symbol 'foo_arch_x86'
; CHECK-NEXT: extern int foo_arch_x86();
; CHECK: error: symbol exported in dynamic library, but marked hidden in declaration 'baz'
; CHECK-NEXT: int baz() __attribute__((visibility("hidden")));
; CHECK-NOT: inlinedFunc
; CHECK: error: declaration has external linkage, but symbol has internal linkage in dynamic library 'bar'
; CHECK-NEXT: extern int bar();
; CHECK: error: declaration has external linkage, but dynamic library doesn't have symbol 'NSFoo'
; CHECK-NEXT: @interface NSFoo
; CHECK: error: declaration has external linkage, but dynamic library doesn't have symbol 'NSFoo.nsint'
; CHECK-NEXT: int nsint;
; CHECK: error: declaration has external linkage, but dynamic library doesn't have symbol 'NSFooExcept'
; CHECK-NEXT: @interface NSFooExcept
; CHECK: warning: violations found for arm64-apple-macos13
; CHECK: error: declaration has external linkage, but dynamic library doesn't have symbol 'foo_arch_arm'
; CHECK-NEXT: extern int foo_arch_arm();
; CHECK: warning: violations found for x86_64
; CHECK-NEXT: error: no declaration found for exported symbol '_fooBar' in dynamic library
; CHECK: warning: violations found for arm64
; CHECK-NEXT: error: no declaration found for exported symbol '_fooBar' in dynamic library
; CHECK: warning: violations found for arm64-apple-macos13
; CHECK-NEXT: error: declaration 'unavailableSymbol' is marked unavailable, but symbol is exported in dynamic library
; CHECK-NEXT: extern int unavailableSymbol
; CHECK: warning: violations found for arm64-apple-ios16.0-macabi
; CHECK-NEXT: error: declaration 'unavailableSymbol' is marked unavailable, but symbol is exported in dynamic library
; CHECK-NEXT: extern int unavailableSymbol
;--- System/Library/Frameworks/Mismatch.framework/Headers/Mismatch.h
#if defined(__x86_64__)
extern int foo_arch_x86();
#else
extern int foo_arch_arm();
#endif
int foo();
int baz() __attribute__((visibility("hidden")));
__attribute__((visibility("hidden"))) inline int inlinedFunc() { return 1; }
;--- System/Library/Frameworks/Mismatch.framework/PrivateHeaders/Mismatch_Private.h
#include <Foundation/Foundation.h>
extern int bar();
@interface NSFoo : NSObject {
int nsint;
}
@end
__attribute__((objc_exception))
@interface NSFooExcept : NSObject
@end
extern int unavailableSymbol __attribute__((
availability(macosx, unavailable), availability(macCatalyst, unavailable)));
// Generated from source:
// ***
// int inlinedFunc() { return 1; }
// int foo() { return 1; }
// __attribute__((visibility("hidden"))) int bar() { return 1; }
// int baz() { return 1; }
// int fooBar = 1;
// int unavailableSymbol = 1;
// ***
// xcrun -sdk macosx clang -target x86_64-apple-macos13 --target-variant=x86_64-apple-ios16-macabi -dynamiclib
// xcrun -sdk macosx clang -target arm64-apple-macos13 --target-variant=arm64-apple-ios16-macabi -dynamiclib
// then lipo'ed together.
;--- Mismatch.yaml
--- !fat-mach-o
FatHeader:
magic: 0xCAFEBABE
nfat_arch: 2
FatArchs:
- cputype: 0x1000007
cpusubtype: 0x3
offset: 0x1000
size: 20768
align: 12
- cputype: 0x100000C
cpusubtype: 0x0
offset: 0x8000
size: 49984
align: 14
Slices:
- !mach-o
FileHeader:
magic: 0xFEEDFACF
cputype: 0x1000007
cpusubtype: 0x3
filetype: 0x6
ncmds: 15
sizeofcmds: 1584
flags: 0x100085
reserved: 0x0
LoadCommands:
- cmd: LC_SEGMENT_64
cmdsize: 312
segname: __TEXT
vmaddr: 0
vmsize: 12288
fileoff: 0
filesize: 12288
maxprot: 5
initprot: 5
nsects: 3
flags: 0
Sections:
- sectname: __text
segname: __TEXT
addr: 0x1090
size: 59
offset: 0x1090
align: 4
reloff: 0x0
nreloc: 0
flags: 0x80000400
reserved1: 0x0
reserved2: 0x0
reserved3: 0x0
content: 554889E5B8010000005DC30F1F440000554889E5B8010000005DC30F1F440000554889E5B8010000005DC30F1F440000554889E5B8010000005DC3
- sectname: __unwind_info
segname: __TEXT
addr: 0x10CC
size: 4152
offset: 0x10CC
align: 2
reloff: 0x0
nreloc: 0
flags: 0x0
reserved1: 0x0
reserved2: 0x0
reserved3: 0x0
content: 010000001C000000010000002000000000000000200000000200000000000001901000003800000038000000CB1000000000000038000000030000000C0001001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
- sectname: __eh_frame
segname: __TEXT
addr: 0x2108
size: 24
offset: 0x2108
align: 3
reloff: 0x0
nreloc: 0
flags: 0x6000000B
reserved1: 0x0
reserved2: 0x0
reserved3: 0x0
content: 1400000000000000017A520001781001100C070890010000
- cmd: LC_SEGMENT_64
cmdsize: 152
segname: __DATA_CONST
vmaddr: 12288
vmsize: 4096
fileoff: 12288
filesize: 4096
maxprot: 3
initprot: 3
nsects: 1
flags: 16
Sections:
- sectname: __objc_imageinfo
segname: __DATA_CONST
addr: 0x3000
size: 8
offset: 0x3000
align: 0
reloff: 0x0
nreloc: 0
flags: 0x0
reserved1: 0x0
reserved2: 0x0
reserved3: 0x0
content: '0000000040000000'
- cmd: LC_SEGMENT_64
cmdsize: 152
segname: __DATA
vmaddr: 16384
vmsize: 4096
fileoff: 16384
filesize: 4096
maxprot: 3
initprot: 3
nsects: 1
flags: 0
Sections:
- sectname: __data
segname: __DATA
addr: 0x4000
size: 8
offset: 0x4000
align: 2
reloff: 0x0
nreloc: 0
flags: 0x0
reserved1: 0x0
reserved2: 0x0
reserved3: 0x0
content: '0100000001000000'
- cmd: LC_SEGMENT_64
cmdsize: 72
segname: __LINKEDIT
vmaddr: 20480
vmsize: 288
fileoff: 20480
filesize: 288
maxprot: 1
initprot: 1
nsects: 0
flags: 0
- cmd: LC_DYLD_INFO_ONLY
cmdsize: 48
rebase_off: 0
rebase_size: 0
bind_off: 0
bind_size: 0
weak_bind_off: 0
weak_bind_size: 0
lazy_bind_off: 0
lazy_bind_size: 0
export_off: 20480
export_size: 88
- cmd: LC_SYMTAB
cmdsize: 24
symoff: 20576
nsyms: 7
stroff: 20688
strsize: 80
- cmd: LC_DYSYMTAB
cmdsize: 80
ilocalsym: 0
nlocalsym: 1
iextdefsym: 1
nextdefsym: 5
iundefsym: 6
nundefsym: 1
tocoff: 0
ntoc: 0
modtaboff: 0
nmodtab: 0
extrefsymoff: 0
nextrefsyms: 0
indirectsymoff: 0
nindirectsyms: 0
extreloff: 0
nextrel: 0
locreloff: 0
nlocrel: 0
- cmd: LC_ID_DYLIB
cmdsize: 96
dylib:
name: 24
timestamp: 0
current_version: 65536
compatibility_version: 65536
Content: '/System/Library/Frameworks/Mismatch.framework/Versions/A/Mismatch'
ZeroPadBytes: 7
- cmd: LC_UUID
cmdsize: 24
uuid: 4C4C4421-5555-3144-A16C-E4AA63D66775
- cmd: LC_BUILD_VERSION
cmdsize: 32
platform: 1
minos: 851968
sdk: 983040
ntools: 1
Tools:
- tool: 4
version: 1245184
- cmd: LC_BUILD_VERSION
cmdsize: 32
platform: 6
minos: 1048576
sdk: 1048576
ntools: 1
Tools:
- tool: 4
version: 1245184
- cmd: LC_LOAD_DYLIB
cmdsize: 56
dylib:
name: 24
timestamp: 0
current_version: 14942208
compatibility_version: 65536
Content: '/usr/lib/libobjc.A.dylib'
ZeroPadBytes: 8
- cmd: LC_LOAD_DYLIB
cmdsize: 56
dylib:
name: 24
timestamp: 0
current_version: 88539136
compatibility_version: 65536
Content: '/usr/lib/libSystem.B.dylib'
ZeroPadBytes: 6
- cmd: LC_FUNCTION_STARTS
cmdsize: 16
dataoff: 20568
datasize: 8
- cmd: LC_DATA_IN_CODE
cmdsize: 16
dataoff: 20576
datasize: 0
LinkEditData:
ExportTrie:
TerminalSize: 0
NodeOffset: 0
Name: ''
Flags: 0x0
Address: 0x0
Other: 0x0
ImportName: ''
Children:
- TerminalSize: 0
NodeOffset: 5
Name: _
Flags: 0x0
Address: 0x0
Other: 0x0
ImportName: ''
Children:
- TerminalSize: 3
NodeOffset: 49
Name: inlinedFunc
Flags: 0x0
Address: 0x1090
Other: 0x0
ImportName: ''
- TerminalSize: 3
NodeOffset: 54
Name: foo
Flags: 0x0
Address: 0x10A0
Other: 0x0
ImportName: ''
Children:
- TerminalSize: 4
NodeOffset: 64
Name: Bar
Flags: 0x0
Address: 0x4000
Other: 0x0
ImportName: ''
- TerminalSize: 4
NodeOffset: 70
Name: unavailableSymbol
Flags: 0x0
Address: 0x4004
Other: 0x0
ImportName: ''
- TerminalSize: 3
NodeOffset: 76
Name: baz
Flags: 0x0
Address: 0x10C0
Other: 0x0
ImportName: ''
NameList:
- n_strx: 20
n_type: 0x1E
n_sect: 1
n_desc: 0
n_value: 4272
- n_strx: 2
n_type: 0xF
n_sect: 1
n_desc: 0
n_value: 4240
- n_strx: 15
n_type: 0xF
n_sect: 1
n_desc: 0
n_value: 4256
- n_strx: 25
n_type: 0xF
n_sect: 1
n_desc: 0
n_value: 4288
- n_strx: 30
n_type: 0xF
n_sect: 5
n_desc: 0
n_value: 16384
- n_strx: 38
n_type: 0xF
n_sect: 5
n_desc: 0
n_value: 16388
- n_strx: 57
n_type: 0x1
n_sect: 0
n_desc: 512
n_value: 0
StringTable:
- ' '
- _inlinedFunc
- _foo
- _bar
- _baz
- _fooBar
- _unavailableSymbol
- dyld_stub_binder
- ''
- ''
- ''
- ''
- ''
- ''
FunctionStarts: [ 0x1090, 0x10A0, 0x10B0, 0x10C0 ]
- !mach-o
FileHeader:
magic: 0xFEEDFACF
cputype: 0x100000C
cpusubtype: 0x0
filetype: 0x6
ncmds: 16
sizeofcmds: 1104
flags: 0x100085
reserved: 0x0
LoadCommands:
- cmd: LC_SEGMENT_64
cmdsize: 232
segname: __TEXT
vmaddr: 0
vmsize: 16384
fileoff: 0
filesize: 16384
maxprot: 5
initprot: 5
nsects: 2
flags: 0
Sections:
- sectname: __text
segname: __TEXT
addr: 0x1050
size: 32
offset: 0x1050
align: 2
reloff: 0x0
nreloc: 0
flags: 0x80000400
reserved1: 0x0
reserved2: 0x0
reserved3: 0x0
content: 20008052C0035FD620008052C0035FD620008052C0035FD620008052C0035FD6
- sectname: __unwind_info
segname: __TEXT
addr: 0x1070
size: 4152
offset: 0x1070
align: 2
reloff: 0x0
nreloc: 0
flags: 0x0
reserved1: 0x0
reserved2: 0x0
reserved3: 0x0
content: 010000001C000000010000002000000000000000200000000200000000000002501000003800000038000000701000000000000038000000030000000C0001001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
- cmd: LC_SEGMENT_64
cmdsize: 152
segname: __DATA_CONST
vmaddr: 16384
vmsize: 16384
fileoff: 16384
filesize: 16384
maxprot: 3
initprot: 3
nsects: 1
flags: 16
Sections:
- sectname: __objc_imageinfo
segname: __DATA_CONST
addr: 0x4000
size: 8
offset: 0x4000
align: 0
reloff: 0x0
nreloc: 0
flags: 0x0
reserved1: 0x0
reserved2: 0x0
reserved3: 0x0
content: '0000000040000000'
- cmd: LC_SEGMENT_64
cmdsize: 152
segname: __DATA
vmaddr: 32768
vmsize: 16384
fileoff: 32768
filesize: 16384
maxprot: 3
initprot: 3
nsects: 1
flags: 0
Sections:
- sectname: __data
segname: __DATA
addr: 0x8000
size: 8
offset: 0x8000
align: 2
reloff: 0x0
nreloc: 0
flags: 0x0
reserved1: 0x0
reserved2: 0x0
reserved3: 0x0
content: '0100000001000000'
- cmd: LC_SEGMENT_64
cmdsize: 72
segname: __LINKEDIT
vmaddr: 49152
vmsize: 832
fileoff: 49152
filesize: 832
maxprot: 1
initprot: 1
nsects: 0
flags: 0
- cmd: LC_DYLD_INFO_ONLY
cmdsize: 48
rebase_off: 0
rebase_size: 0
bind_off: 0
bind_size: 0
weak_bind_off: 0
weak_bind_size: 0
lazy_bind_off: 0
lazy_bind_size: 0
export_off: 49152
export_size: 88
- cmd: LC_SYMTAB
cmdsize: 24
symoff: 49248
nsyms: 7
stroff: 49360
strsize: 80
- cmd: LC_DYSYMTAB
cmdsize: 80
ilocalsym: 0
nlocalsym: 1
iextdefsym: 1
nextdefsym: 5
iundefsym: 6
nundefsym: 1
tocoff: 0
ntoc: 0
modtaboff: 0
nmodtab: 0
extrefsymoff: 0
nextrefsyms: 0
indirectsymoff: 0
nindirectsyms: 0
extreloff: 0
nextrel: 0
locreloff: 0
nlocrel: 0
- cmd: LC_ID_DYLIB
cmdsize: 96
dylib:
name: 24
timestamp: 0
current_version: 65536
compatibility_version: 65536
Content: '/System/Library/Frameworks/Mismatch.framework/Versions/A/Mismatch'
ZeroPadBytes: 7
- cmd: LC_UUID
cmdsize: 24
uuid: 4C4C4428-5555-3144-A12B-7130A3C946D2
- cmd: LC_BUILD_VERSION
cmdsize: 32
platform: 1
minos: 851968
sdk: 983040
ntools: 1
Tools:
- tool: 4
version: 1245184
- cmd: LC_BUILD_VERSION
cmdsize: 32
platform: 6
minos: 1048576
sdk: 1048576
ntools: 1
Tools:
- tool: 4
version: 1245184
- cmd: LC_LOAD_DYLIB
cmdsize: 56
dylib:
name: 24
timestamp: 0
current_version: 14942208
compatibility_version: 65536
Content: '/usr/lib/libobjc.A.dylib'
ZeroPadBytes: 8
- cmd: LC_LOAD_DYLIB
cmdsize: 56
dylib:
name: 24
timestamp: 0
current_version: 88539136
compatibility_version: 65536
Content: '/usr/lib/libSystem.B.dylib'
ZeroPadBytes: 6
- cmd: LC_FUNCTION_STARTS
cmdsize: 16
dataoff: 49240
datasize: 8
- cmd: LC_DATA_IN_CODE
cmdsize: 16
dataoff: 49248
datasize: 0
- cmd: LC_CODE_SIGNATURE
cmdsize: 16
dataoff: 49440
datasize: 544
LinkEditData:
ExportTrie:
TerminalSize: 0
NodeOffset: 0
Name: ''
Flags: 0x0
Address: 0x0
Other: 0x0
ImportName: ''
Children:
- TerminalSize: 0
NodeOffset: 5
Name: _
Flags: 0x0
Address: 0x0
Other: 0x0
ImportName: ''
Children:
- TerminalSize: 3
NodeOffset: 49
Name: inlinedFunc
Flags: 0x0
Address: 0x1050
Other: 0x0
ImportName: ''
- TerminalSize: 3
NodeOffset: 54
Name: foo
Flags: 0x0
Address: 0x1058
Other: 0x0
ImportName: ''
Children:
- TerminalSize: 4
NodeOffset: 64
Name: Bar
Flags: 0x0
Address: 0x8000
Other: 0x0
ImportName: ''
- TerminalSize: 4
NodeOffset: 70
Name: unavailableSymbol
Flags: 0x0
Address: 0x8004
Other: 0x0
ImportName: ''
- TerminalSize: 3
NodeOffset: 76
Name: baz
Flags: 0x0
Address: 0x1068
Other: 0x0
ImportName: ''
NameList:
- n_strx: 20
n_type: 0x1E
n_sect: 1
n_desc: 0
n_value: 4192
- n_strx: 2
n_type: 0xF
n_sect: 1
n_desc: 0
n_value: 4176
- n_strx: 15
n_type: 0xF
n_sect: 1
n_desc: 0
n_value: 4184
- n_strx: 25
n_type: 0xF
n_sect: 1
n_desc: 0
n_value: 4200
- n_strx: 30
n_type: 0xF
n_sect: 4
n_desc: 0
n_value: 32768
- n_strx: 38
n_type: 0xF
n_sect: 4
n_desc: 0
n_value: 32772
- n_strx: 57
n_type: 0x1
n_sect: 0
n_desc: 512
n_value: 0
StringTable:
- ' '
- _inlinedFunc
- _foo
- _bar
- _baz
- _fooBar
- _unavailableSymbol
- dyld_stub_binder
- ''
- ''
- ''
- ''
- ''
- ''
FunctionStarts: [ 0x1050, 0x1058, 0x1060, 0x1068 ]
...
;--- inputs.json.in
{
"headers": [
{
"path" : "DSTROOT/System/Library/Frameworks/Mismatch.framework/PrivateHeaders/Mismatch_Private.h",
"type" : "private"
},
{
"path" : "DSTROOT/System/Library/Frameworks/Mismatch.framework/Headers/Mismatch.h",
"type" : "public"
}
],
"version": "3"
}