Tags: hlyu368/cling
Tags
Support autoloading of dynamic symbols and callback from IncrementalE… …xecutor This patch contains two functionality: 1. Autoloading of dynamic symbols for system headers There is three kind of symbols in shared object file, which is 1 normal symbols, 2 dynamic symbols, and 3 hidden visibility symbols. Linker doesn't care about 3, but should take care (of course) 1 and 2. For system headers, often symbols are defined in .dynsym section which means they are 2 dynamic symbols. This patch adds support of autoloading those symbols. We fallback to resolving dynamic symbols from system headers only if we couldn't resolve from normal symbol table, as the initialization of header search is expensive (iterating through all system headers) 2. Register callback from IncrementalExecutor Previously, LazyFunctionCreatorAutoload was getting callback only from DynamicLibraryManager::loadLibrary. This was enough for fixing tests, but is insufficient to handle "symbol <something> unresolved while linking function" errors as those errors are emitted from IncrementalExecutor. Adding a callback from IncrementalExecutor enables us to unresolved symbols. It fixes these kind of errors: `IncrementalExecutor::executeFunction: symbol '_ZN7TCanvasC1EPKcS1_iiii' unresolved while linking function '_GLOBAL__sub_I_cling_module_8'!`