Prev Next Secure Lazy Binding Slide #9

amd64 Example

      extern int foo;
      extern int bar(int);
      int call_bar(void) {
         return bar(foo);
      }
      movq    foo@GOTPCREL(%rip), %rax  # load foo's address from GOT
      movl    (%rax), %edi              # read foo's value
      call    bar@PLT                   # call bar's PLT stub

continued...


EuroBSDCon 2014 Copyright © 2014 Philip Guenther