mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-10 12:53:42 +08:00
Create input for linker during zebin decoding
Remove code duplication. Parsing zebin elf for relocations and symbols is moved to decodeSingleDeviceBinary. Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
a9bc4de8cf
commit
311b0b0020
@ -186,18 +186,6 @@ cl_int Program::processGenBinary(const ClDevice &clDevice) {
|
||||
DeviceBinaryFormat singleDeviceBinaryFormat;
|
||||
std::tie(decodeError, singleDeviceBinaryFormat) = NEO::decodeSingleDeviceBinary(programInfo, binary, decodeErrors, decodeWarnings);
|
||||
|
||||
if (isDeviceBinaryFormat<DeviceBinaryFormat::Zebin>(binary.deviceBinary)) {
|
||||
NEO::LinkerInput::SectionNameToSegmentIdMap nameToKernelId;
|
||||
|
||||
uint32_t id = 0;
|
||||
for (auto &kernelInfo : programInfo.kernelInfos) {
|
||||
nameToKernelId[kernelInfo->kernelDescriptor.kernelMetadata.kernelName] = id;
|
||||
id++;
|
||||
}
|
||||
programInfo.prepareLinkerInputStorage();
|
||||
programInfo.linkerInput->decodeElfSymbolTableAndRelocations(programInfo.decodedElf, nameToKernelId);
|
||||
}
|
||||
|
||||
if (decodeWarnings.empty() == false) {
|
||||
PRINT_DEBUG_STRING(DebugManager.flags.PrintDebugMessages.get(), stderr, "%s\n", decodeWarnings.c_str());
|
||||
}
|
||||
|
Reference in New Issue
Block a user