mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 14:33:04 +08:00
Zebin: Use strings section for printf
Resolves: NEO-6143 Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
5d1c3c98a4
commit
06eaef0352
@@ -635,6 +635,7 @@ bool ModuleImp::linkBinary() {
|
||||
Linker::SegmentInfo globals;
|
||||
Linker::SegmentInfo constants;
|
||||
Linker::SegmentInfo exportedFunctions;
|
||||
Linker::SegmentInfo strings;
|
||||
GraphicsAllocation *globalsForPatching = translationUnit->globalVarBuffer;
|
||||
GraphicsAllocation *constantsForPatching = translationUnit->globalConstBuffer;
|
||||
if (globalsForPatching != nullptr) {
|
||||
@@ -645,6 +646,10 @@ bool ModuleImp::linkBinary() {
|
||||
constants.gpuAddress = static_cast<uintptr_t>(constantsForPatching->getGpuAddress());
|
||||
constants.segmentSize = constantsForPatching->getUnderlyingBufferSize();
|
||||
}
|
||||
if (translationUnit->programInfo.globalStrings.initData != nullptr) {
|
||||
strings.gpuAddress = reinterpret_cast<uintptr_t>(translationUnit->programInfo.globalStrings.initData);
|
||||
strings.segmentSize = translationUnit->programInfo.globalStrings.size;
|
||||
}
|
||||
if (linkerInput->getExportedFunctionsSegmentId() >= 0) {
|
||||
auto exportedFunctionHeapId = linkerInput->getExportedFunctionsSegmentId();
|
||||
this->exportedFunctionsSurface = this->kernelImmDatas[exportedFunctionHeapId]->getIsaGraphicsAllocation();
|
||||
@@ -663,7 +668,7 @@ bool ModuleImp::linkBinary() {
|
||||
}
|
||||
}
|
||||
|
||||
auto linkStatus = linker.link(globals, constants, exportedFunctions,
|
||||
auto linkStatus = linker.link(globals, constants, exportedFunctions, strings,
|
||||
globalsForPatching, constantsForPatching,
|
||||
isaSegmentsForPatching, unresolvedExternalsInfo, this->device->getNEODevice(),
|
||||
translationUnit->programInfo.globalConstants.initData,
|
||||
|
||||
Reference in New Issue
Block a user