Like constants, globals on some platforms are GOT relative. This means they have to be allocated
near the GOT, which new doesn't do. So break out the allocate into a new function. Also move GOT index handling into JITResolver. This lets it update the mapping when a Lazy function is JITed. It doesn't managed the table, just the mapping. Note that this is still non-ideal, as any function that takes a function address should also take a GOT index, but that is a lot of changes. The relocation resolve process updates any GOT entry it sees is out of date. llvm-svn: 22537
Showing
- llvm/include/llvm/CodeGen/MachineCodeEmitter.h 6 additions, 0 deletionsllvm/include/llvm/CodeGen/MachineCodeEmitter.h
- llvm/lib/ExecutionEngine/JIT/JIT.cpp 2 additions, 1 deletionllvm/lib/ExecutionEngine/JIT/JIT.cpp
- llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp 76 additions, 13 deletionsllvm/lib/ExecutionEngine/JIT/JITEmitter.cpp
Loading
Please register or sign in to comment