October 11, 2017

Definition of PLT(Procedure Linkage Table) and GOT(Global Offset Table)

PLT(Procedure Linkage Table) : The table that enables procedures in other libraries.

GOT(Global Offset Table) : The table referenced by PLT. This contains the actual address of the procedure.

❑ PLT/GOT is used when compiling with dynamic link. The dynamic link requires the process of getting the procedure address because the library is outside the program.


※ First procedure call : The linker calls the dl_resolve function(=_dl_runtime_resolve) to check the address of the required procedure and input it into the GOT.
※ Subsequent procedure calls : The verified address in the first procedure call is used.