<< 22/55 >>
First Last

dyld-info-command - bind, lazy_bind

rebase, bind, weak_bind, lazy_bind, and export

 int main() { puts("Hello, world!"); }

% otool -tvV a.out

  _main:
  0000000100000f08        pushq   %rbp
  0000000100000f09        movq    %rsp,%rbp
  0000000100000f0c        leaq    0x00000019(%rip),%rdi
  0000000100000f13        callq   0x100000f26     ; symbol stub for: _puts
  0000000100000f18        movl    $0x00000000,%eax
  0000000100000f1d        leave
  0000000100000f1e        ret

% otool -s __TEXT __symbol_stub1 a.out

  a.out:
  Contents of (__TEXT,__symbol_stub1) section
  0000000100000f20 ff 25 12 01 00 00 ff 25 14 01 00 00 (jmp *0x114)

% dyldinfo -lazy_bind a.out

 __DATA  __la_symbol_ptr  0x100001040 0x000C libSystem        _puts

0x100000f26 + 0x114 + 6 == 0x100001040