Some time ago I posted here regarding a relocation overflow on Windows (among other things), but the issue disappeared and so the thread got left. I’ve started this new thread because a) I didn’t want to necro the old one and b) it felt like its own.
I’ve now encountered the issue again and am noting down all the information I can get about it whilst it’s happening.
The issues is that I am getting a relocation overflow assertion inside RuntimeDyldCOFFX86_64.h inside the COFF::IMAGE_REL_AMD64_REL32 case.
However, the other thread left me with the impression that I shouldn’t be getting such relocation when I’m compiling for 64 bit. The only reason I can think of for this that I’m not supposed to get 32 bit relocations in the code I’m building rather than all the code being loaded.
The LLVM side of the call stack looks like this:
_wassert(const wchar_t * expr, const wchar_t * filename, unsigned int lineno) Line 369 C
llvm::RuntimeDyldCOFFX86_64::resolveRelocation(const llvm::RelocationEntry & RE, unsigned __int64 Value) Line 81 C++
llvm::RuntimeDyldImpl::resolveRelocationList(const llvm::SmallVectorllvm::RelocationEntry,64 & Relocs, unsigned __int64 Value) Line 796 C++
llvm::RuntimeDyldImpl::resolveExternalSymbols() Line 849 C++
llvm::RuntimeDyldImpl::resolveRelocations() Line 95 C++
llvm::RuntimeDyld::resolveRelocations() Line 961 C++
llvm::orc::ObjectLinkingLayerllvm::orc::DoNothingOnNotifyLoaded::ConcreteLinkedObjectSet<std::shared_ptrllvm::SectionMemoryManager,ClangClasses::LLVMExecutionEngine::LinkingResolver * __ptr64>::Finalize() Line 112 C++
llvm::orc::ObjectLinkingLayerllvm::orc::DoNothingOnNotifyLoaded::findSymbolIn::__l19::() Line 246 C++
std::_Callable_obj<unsigned __int64 (void),0>::_ApplyX() Line 284 C++
std::_Func_impl<std::_Callable_obj<unsigned __int64 (void),0>,std::allocator<std::_Func_class >,unsigned __int64>::_Do_call() Line 229 C++
std::_Func_class::operator()() Line 316 C++
llvm::orc::JITSymbol::getAddress() Line 62 C++
RelType is 4 (IMAGE_REL_AMD64_REL32).
Value is 139830239098107.
Addend is 0.
The symbol that is currently being resolved is _fperrraise. I did some researching and it appears that this symbol resides in libcmtd.lib (for me the path is C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\amd64\libcmtd.lib).
The relocation type stated in that library (information gathered from dumpbin) is REL32.
I’m not sure what other information there is for me to gather, could somebody please help me resolve this?
Many thanks in advance!