Adding support for R_PER_THREAD_PAYLOAD_OFFSET_32

Change-Id: Iacd8d2f84b6f307b37dd09fe794357bf4fa44388
This commit is contained in:
Jaroslaw Chodor
2020-09-07 02:28:32 +02:00
committed by sys_ocldev
parent b9b01c09bc
commit 6c0da29670
3 changed files with 19 additions and 3 deletions

View File

@@ -377,8 +377,14 @@ TEST(LinkerTests, givenValidSymbolsAndRelocationsThenInstructionSegmentsArePrope
relocCPartLow.r_offset = 36;
relocCPartLow.r_type = vISA::GenRelocType::R_SYM_ADDR_32;
vISA::GenRelocEntry relocs[] = {relocA, relocB, relocC, relocCPartHigh, relocCPartLow};
bool decodeRelocSuccess = linkerInput.decodeRelocationTable(&relocs, 5, 0);
vISA::GenRelocEntry relocIgnore = {};
relocIgnore.r_symbol[0] = 'X';
relocIgnore.r_offset = 36;
relocIgnore.r_type = vISA::GenRelocType::R_PER_THREAD_PAYLOAD_OFFSET_32;
vISA::GenRelocEntry relocs[] = {relocA, relocB, relocC, relocCPartHigh, relocCPartLow, relocIgnore};
constexpr uint32_t numRelocations = sizeof(relocs) / sizeof(relocs[0]);
bool decodeRelocSuccess = linkerInput.decodeRelocationTable(&relocs, numRelocations, 0);
EXPECT_TRUE(decodeRelocSuccess);
NEO::Linker linker(linkerInput);