<div dir="ltr">I filed this bug today: <a href="https://bugs.llvm.org/show_bug.cgi?id=32376">https://bugs.llvm.org/show_bug.cgi?id=32376</a><div><br></div><div>I understand that the Mach-O linker is not under active development, but there must be some way to work around this bug. Does anyone have a clue?</div><div><br></div><div>This trivial IR file gives "dyld: lazy symbol binding failed: bad lazy bind info" at runtime when linked with: </div><div><br></div><div> lld -flavor darwin -demangle -dynamic -arch x86_64 -macosx_version_min 10.10.0 -pie -o ./tmp_exe ./tmp_exe.o -lSystem<br><div><br></div><div>When linking with the system linker instead, with the same arguments, it works fine. IR file:</div><div><br></div><div><div>target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"</div><div>target triple = "x86_64-apple-darwin-unknown"</div><div><br></div><div>@0 = internal unnamed_addr constant [9 x i8] c"0: %llu\0A\00", align 1</div><div><br></div><div>; Function Attrs: nounwind</div><div>define i32 @main(i32, i8** nocapture nonnull readnone) local_unnamed_addr #0 {</div><div>Entry:</div><div>  %putchar = call i32 @putchar(i32 10)</div><div>  %2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @0, i64 0, i64 0), i64 0)</div><div>  ret i32 0</div><div>}</div><div><br></div><div>; Function Attrs: nounwind</div><div>declare i32 @printf(i8* nocapture readonly, ...) #0</div><div><br></div><div>declare i32 @putchar(i32) #0</div><div><br></div><div>attributes #0 = { nounwind }</div></div><div><br></div></div></div>