2 # RUN: rm -rf %t; split-file %s %t
3 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/obj.o %t/obj.s
4 # RUN: yaml2obj %t/dylib.yaml -o %t/libdylib.dylib
5 # RUN: %lld -platform_version macos 12.0.0 12.0.0 -lSystem %t/obj.o %t/libdylib.dylib -o /dev/null
13 ## This yaml is from a dylib produced by ld64
14 ## echo ".global _foo\n_foo" > dylib.s
15 ## clang -target=x86_64-apple-macos12 -dynamiclib -isysroot Inputs/MacOSX.sdk dylib.s -o libdylib.dylib
16 ## obj2yaml --raw-segment=data libdylib.dylib
70 compatibility_version: 0
71 Content: libdylib.dylib
73 - cmd: LC_DYLD_CHAINED_FIXUPS
77 - cmd: LC_DYLD_EXPORTS_TRIE
109 uuid: 52409B91-DF59-346A-A63F-D4E6FFDC3E04
110 - cmd: LC_BUILD_VERSION
119 - cmd: LC_SOURCE_VERSION
127 current_version: 65793
128 compatibility_version: 65536
129 Content: '/usr/lib/libSystem.dylib'
131 - cmd: LC_FUNCTION_STARTS
135 - cmd: LC_DATA_IN_CODE
139 __LINKEDIT: 00000000200000002C0000002C000000000000000100000000000000000000000200000000000000000000000000000000015F666F6F000804008080010000000000000000000000020000000F010000004000000000000020005F666F6F0000