[llvm-dev] LLD/Mach-O - how to work around this bug?

Kevin Enderby via llvm-dev llvm-dev at lists.llvm.org
Wed Mar 22 13:10:22 PDT 2017


Hello Andrew,

If you want to try to figure out what is up with the lazy binding info you might try running top of tree llvm-objdump with -lazy-bind to see what error it gives you (that is with my change from Monday with r298292).  The other thing you can do on a MacOS machine is:

xcrun dyldinfo -opcodes ./tmp_exe

to show the bind opcodes that the error message from llvm-objdump should be referring to. That may give you a start as to what is wrong if you want to try to fix the problem in lld.

My thoughts,
Kev

> On Mar 22, 2017, at 12:05 PM, Davide Italiano via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> On Wed, Mar 22, 2017 at 9:59 AM, Andrew Kelley via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
>> I filed this bug today: https://bugs.llvm.org/show_bug.cgi?id=32376
>> 
>> 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?
>> 
>> This trivial IR file gives "dyld: lazy symbol binding failed: bad lazy bind
>> info" at runtime when linked with:
>> 
>> lld -flavor darwin -demangle -dynamic -arch x86_64 -macosx_version_min
>> 10.10.0 -pie -o ./tmp_exe ./tmp_exe.o -lSystem
>> 
> 
> CC'ing the owners as they may have ideas. Please consider that lld
> MachO hasn't been touched in 6-9 months for anything real, at least.
> Even if you work around this bug, chances are you'll find many others.
> In other words, don't expect to be on par with ld64.
> 
> -- 
> Davide
> 
> "There are no solved problems; there are only problems that are more
> or less solved" -- Henri Poincare
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev



More information about the llvm-dev mailing list