Revert "feat(zebin): Add support for ELF section type SHT_NOBITS"

This reverts commit fa03aa9a40.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation
2023-02-03 03:11:40 +01:00
committed by Compute-Runtime-Automation
parent 606a900080
commit d0c0c60205
18 changed files with 83 additions and 419 deletions

View File

@@ -2755,13 +2755,13 @@ TEST(MemoryManagerTest, whenMemoryManagerReturnsNullptrThenAllocateGlobalsSurfac
linkerInput.traits.exportsGlobalConstants = true;
linkerInput.traits.exportsGlobalVariables = true;
memoryManager->recentlyPassedDeviceBitfield = {};
GraphicsAllocation *allocation = allocateGlobalsSurface(nullptr, device.getDevice(), 1024, 0u, false, &linkerInput, nullptr);
GraphicsAllocation *allocation = allocateGlobalsSurface(nullptr, device.getDevice(), 1024, false, &linkerInput, nullptr);
EXPECT_EQ(nullptr, allocation);
EXPECT_EQ(deviceBitfield, memoryManager->recentlyPassedDeviceBitfield);
auto svmAllocsManager = std::make_unique<SVMAllocsManager>(device.getMemoryManager(), false);
memoryManager->recentlyPassedDeviceBitfield = {};
allocation = allocateGlobalsSurface(svmAllocsManager.get(), device.getDevice(), 1024, 0u, false, &linkerInput, nullptr);
allocation = allocateGlobalsSurface(svmAllocsManager.get(), device.getDevice(), 1024, false, &linkerInput, nullptr);
EXPECT_EQ(nullptr, allocation);
EXPECT_EQ(deviceBitfield, memoryManager->recentlyPassedDeviceBitfield);
}
@@ -2798,7 +2798,7 @@ TEST_F(MemoryManagerMultiRootDeviceTests, WhenAllocatingGlobalSurfaceThenItHasCo
WhiteBox<NEO::LinkerInput> linkerInput;
linkerInput.traits.exportsGlobalConstants = true;
linkerInput.traits.exportsGlobalVariables = true;
GraphicsAllocation *allocation = allocateGlobalsSurface(context->svmAllocsManager, device1->getDevice(), initData.size(), 0u, false, &linkerInput, initData.data());
GraphicsAllocation *allocation = allocateGlobalsSurface(context->svmAllocsManager, device1->getDevice(), initData.size(), false, &linkerInput, initData.data());
ASSERT_NE(nullptr, allocation);
EXPECT_EQ(expectedRootDeviceIndex, allocation->getRootDeviceIndex());

View File

@@ -550,6 +550,20 @@ TEST_F(ProgramDataTest, GivenProgramWith32bitPointerOptWhenProgramScopeGlobalPoi
prog->setGlobalSurface(nullptr);
}
TEST_F(ProgramDataTest, givenSymbolTablePatchTokenThenLinkerInputIsCreated) {
SPatchFunctionTableInfo token;
token.Token = PATCH_TOKEN_PROGRAM_SYMBOL_TABLE;
token.Size = static_cast<uint32_t>(sizeof(SPatchFunctionTableInfo));
token.NumEntries = 0;
pProgramPatchList = &token;
programPatchListSize = token.Size;
buildAndDecodeProgramPatchList();
EXPECT_NE(nullptr, pProgram->getLinkerInput(pContext->getDevice(0)->getRootDeviceIndex()));
}
TEST(ProgramLinkBinaryTest, whenLinkerInputEmptyThenLinkSuccessful) {
auto linkerInput = std::make_unique<WhiteBox<LinkerInput>>();
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));