You can use otool -l /path/to/binary
and inspect the LC_DYLD_INFO_ONLY
load command. If the binary was linked with -bind_at_load
, then the lazy bind offset/size are equal to 0: dyld
won’t lazily bind symbols and all symbols are bound when the binary is loaded.
Sample output:
With
-bind_at_load
Load command 4 cmd LC_DYLD_INFO_ONLY cmdsize 48 rebase_off 8192 rebase_size 8 bind_off 8200 bind_size 224 weak_bind_off 0 weak_bind_size 0 lazy_bind_off 0 lazy_bind_size 0 export_off 8424 export_size 48
Without
-bind_at_load
Load command 4 cmd LC_DYLD_INFO_ONLY cmdsize 48 rebase_off 8192 rebase_size 8 bind_off 8200 bind_size 128 weak_bind_off 0 weak_bind_size 0 lazy_bind_off 8328 lazy_bind_size 104 export_off 8432 export_size 48