diff --git a/tools/llvm-jitlink/llvm-jitlink.cpp b/tools/llvm-jitlink/llvm-jitlink.cpp index 3e444e609de..9058a7907b0 100644 --- a/tools/llvm-jitlink/llvm-jitlink.cpp +++ b/tools/llvm-jitlink/llvm-jitlink.cpp @@ -86,6 +86,11 @@ static cl::list AbsoluteDefs( cl::desc("Inject absolute symbol definitions (syntax: =)"), cl::ZeroOrMore); +static cl::opt ShowInitialExecutionSessionState( + "show-init-es", + cl::desc("Print ExecutionSession state before resolving entry point"), + cl::init(false)); + static cl::opt ShowAddrs( "show-addrs", cl::desc("Print registered symbol, section, got and stub addresses"), @@ -841,12 +846,14 @@ int main(int argc, char *argv[]) { ExitOnErr(loadProcessSymbols(*S)); ExitOnErr(loadDylibs()); - { TimeRegion TR(Timers ? &Timers->LoadObjectsTimer : nullptr); ExitOnErr(loadObjects(*S)); } + if (ShowInitialExecutionSessionState) + S->ES.dump(outs()); + JITEvaluatedSymbol EntryPoint = 0; { TimeRegion TR(Timers ? &Timers->LinkTimer : nullptr);