This class will be used to properly solve the __imp_ symbol and jump-thunk generation issues. It is assumed to be the last definition generator to be called, and as it's the last generator the only symbols remaining in the lookup set are the symbols that are supposed to be queried outside this jitdylib. Instead of just letting them through, we issue another lookup invocation and fetch the allocated addresses, and then create jitlink graph containing __imp_ GOT symbols and jump-thunks targetting the fetched addresses.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
This should probably carry a warning that it's x86-64 only for now.
Could you file a GitHub issue to look at generalizing the pointer / stub synthesis? (You don't have to tackle it, but we should track it)
Otherwise LGTM -- Thanks @sunho!
llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp | ||
---|---|---|
512 | FYI, this produces build warnings: [539/656] Building CXX object lib/ExecutionEngine/Orc/CMakeFiles/LLVMOrcJIT.dir/ExecutionUtils.cpp.o /usr/local/google/home/kubak/llvm/llvm-project/llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp:512:12: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] return std::move(PointerSize.takeError()); ^ /usr/local/google/home/kubak/llvm/llvm-project/llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp:512:12: note: remove std::move call here return std::move(PointerSize.takeError()); ^~~~~~~~~~ ~ /usr/local/google/home/kubak/llvm/llvm-project/llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp:515:12: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] return std::move(Endianness.takeError()); ^ /usr/local/google/home/kubak/llvm/llvm-project/llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp:515:12: note: remove std::move call here return std::move(Endianness.takeError()); ^~~~~~~~~~ ~ |
FYI, this produces build warnings: