[Orc][MCJIT][RuntimeDyld] Re-apply r231726 and r231724 with fix suggested by
[oota-llvm.git] / tools / llvm-rtdyld / llvm-rtdyld.cpp
index 508318c12a94ece0aa372103d6f472dd287682ae..946201521bae54a29824a9c8bd1cd1ca75b73241 100644 (file)
@@ -298,7 +298,7 @@ static int executeInput() {
   // FIXME: Error out if there are unresolved relocations.
 
   // Get the address of the entry point (_main by default).
-  void *MainAddress = Dyld.getSymbolAddress(EntryPoint);
+  void *MainAddress = Dyld.getSymbolLocalAddress(EntryPoint);
   if (!MainAddress)
     return Error("no definition for '" + EntryPoint + "'");