title: Dynamic Symbol Resolution of Executable Using LLVM
body: <p>I am currently using <code>LLVM's</code> <code>ObjectFile</code> (documented <a href="http://llvm.org/docs/doxygen/html/ObjectFile_8h_source.html" rel="nofollow noreferrer" title="here">here</a>) to represent an executable. I have successfully read in an executable to the <code>ObjectFile</code> and would like to determine which call destination addresses in my executable correspond to symbol names contained in the <code>symbol_iterator</code> obtained by a call to the <code>begin_dynamic_symbols()</code> function. Iterating over each of the symbols in the <code>symbol_iterator</code> gives me the name of each symbol and its address, but since the symbols are dynamic, the address of each symbol is -1; this indicates that the <code>ObjectFile</code> does not associate symbol names directly with their corresponding call destination addresses.</p>
  
  <p>Is there any way to determine which call destination addresses map to which dynamic symbols in an <code>ObjectFile</code>? I would rather not manually calculate all the jumps through the <code>PLT</code> and <code>GOT</code> if I can avoid doing so.</p>