[BOLT] Fix getNewValueForSymbol()
Summary: getNewValueForSymbol() uses orc::RTDyldObjectLinkingLayer::findSymbol() to resolve symbol values. The latter will always return JITSymbol, even if there was no symbol defined. The address for the undefined symbol will be zero, but some symbols could legally be resolved to zero too. We need to distinguish between real zero-valued symbols and symbols that were not emitted and are not visible by orc::RTDyldObjectLinkingLayer. If zero address is returned by ORC, check for a binary data with the same name and use its address for the symbol resolution. (cherry picked from FBD22175269)
Loading
Please sign in to comment