Allow undefined symbols in symbol table for OCL

Related-To: NEO-5081
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2022-03-08 16:21:40 +00:00
committed by Compute-Runtime-Automation
parent 038d1d54fa
commit 3e8a6680e2
6 changed files with 5 additions and 32 deletions

View File

@@ -82,14 +82,8 @@ bool LinkerInput::decodeExportedFunctionsSymbolTable(const void *data, uint32_t
this->valid = false;
return false;
case vISA::S_UNDEF:
if (this->undefinedSymbolsAllowed) {
symbols.erase(symbolEntryIt->s_name);
break;
} else {
DEBUG_BREAK_IF(true);
this->valid = false;
return false;
}
symbols.erase(symbolEntryIt->s_name);
break;
case vISA::S_GLOBAL_VAR:
symbolInfo.segment = SegmentType::GlobalVariables;
traits.exportsGlobalVariables = true;
@@ -195,8 +189,7 @@ void LinkerInput::decodeElfSymbolTableAndRelocations(Elf::Elf<Elf::EI_CLASS_64>
switch (type) {
default:
this->valid &= this->undefinedSymbolsAllowed;
DEBUG_BREAK_IF(false == this->undefinedSymbolsAllowed);
DEBUG_BREAK_IF(type != Elf::SYMBOL_TABLE_TYPE::STT_NOTYPE);
continue;
case Elf::SYMBOL_TABLE_TYPE::STT_OBJECT:
symbolInfo.segment = symbolSegment;
@@ -565,4 +558,4 @@ void Linker::resolveBuiltins(Device *pDevice, UnresolvedExternals &outUnresolved
}
}
}
} // namespace NEO
} // namespace NEO

View File

@@ -147,8 +147,6 @@ struct LinkerInput {
return valid;
}
bool undefinedSymbolsAllowed = false;
const std::vector<ExternalFunctionUsageKernel> &getKernelDependencies() const {
return kernelDependencies;
}