3 # RUN: yaml2obj %s -o %t/libnoid.dylib
4 # RUN: echo ".globl _main; .text; _main: ret" | llvm-mc -filetype=obj -triple=x86_64-apple-darwin -o %t/no-id-dylink.o
5 # RUN: not %lld -o %t/no-id-dylink -L%t -lnoid %t/no-id-dylink.o 2>&1 | FileCheck %s
6 # CHECK: error: {{.*}}libnoid.dylib: dylib missing LC_ID_DYLIB load command
8 ## This YAML file was originally generated from linking the following source
9 ## input with ld64 and passing the resulting binary through obj2yaml:
11 ## .section __TEXT,__cstring
12 ## .globl _hello_world
15 ## .asciz "Hello world!\n"
17 ## Then we deleted the LC_ID_DYLIB command from the file.
23 cpusubtype: 0x00000003
44 addr: 0x0000000000000FF2
57 addr: 0x0000000000000FF2
67 content: 48656C6C6F20776F726C64210A00
79 - cmd: LC_DYLD_INFO_ONLY
119 uuid: 4826226E-9210-3984-A388-D5BD6D6DB368
120 - cmd: LC_BUILD_VERSION
129 - cmd: LC_SOURCE_VERSION
132 - cmd: LC_FUNCTION_STARTS
136 - cmd: LC_DATA_IN_CODE
145 Flags: 0x0000000000000000
146 Address: 0x0000000000000000
147 Other: 0x0000000000000000
153 Flags: 0x0000000000000000
154 Address: 0x0000000000000FF2
155 Other: 0x0000000000000000