fix zebin: use alignemnt of 8 when creating debug zebin
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
parent
e08d6ed4e6
commit
95bea7c92b
|
@ -49,7 +49,7 @@ std::vector<uint8_t> createDebugZebin(ArrayRef<const uint8_t> zebinBin, const Se
|
|||
}
|
||||
|
||||
void DebugZebinCreator::createDebugZebin() {
|
||||
ElfEncoder<EI_CLASS_64> elfEncoder(false, false, 4);
|
||||
ElfEncoder<EI_CLASS_64> elfEncoder(false, false, 8);
|
||||
auto &header = elfEncoder.getElfFileHeader();
|
||||
header.machine = zebin.elfFileHeader->machine;
|
||||
header.flags = zebin.elfFileHeader->flags;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
|
@ -18,7 +18,7 @@ TEST(DebugZebinTest, givenValidZebinThenDebugZebinIsGenerated) {
|
|||
|
||||
uint8_t constData[8] = {0x1};
|
||||
uint8_t varData[8] = {0x2};
|
||||
uint8_t kernelISA[8] = {0x3};
|
||||
uint8_t kernelISA[12] = {0x3};
|
||||
uint8_t stringData[8] = {0x4};
|
||||
|
||||
uint8_t debugInfo[0x30] = {0x22};
|
||||
|
@ -159,6 +159,9 @@ TEST(DebugZebinTest, givenValidZebinThenDebugZebinIsGenerated) {
|
|||
EXPECT_EQ(zebin.sectionHeaders[i].header->flags, debugZebin.sectionHeaders[i].header->flags);
|
||||
|
||||
const auto §ionHeader = debugZebin.sectionHeaders[i].header;
|
||||
|
||||
EXPECT_TRUE(isAligned<8>(sectionHeader->offset));
|
||||
|
||||
const auto §ionData = debugZebin.sectionHeaders[i].data;
|
||||
const auto sectionName = debugZebin.getSectionName(i);
|
||||
auto refSectionName = NEO::ConstStringRef(sectionName);
|
||||
|
|
Loading…
Reference in New Issue