Ignore SHT_ZEBIN_GTPIN_INFO

Change-Id: I85c5bd52d96dce6603329bfe997a70dc5a432d3f
This commit is contained in:
Jaroslaw Chodor
2020-09-07 03:05:13 +02:00
committed by sys_ocldev
parent 6c0da29670
commit 2d4468bb3b
3 changed files with 8 additions and 2 deletions

View File

@@ -25,8 +25,9 @@ enum ELF_TYPE_ZEBIN : uint16_t {
};
enum SHT_ZEBIN : uint32_t {
SHT_ZEBIN_SPIRV = 0xff000009, // .spv.kernel section, value the same as SHT_OPENCL_SPIRV
SHT_ZEBIN_ZEINFO = 0xff000011 // .ze_info section
SHT_ZEBIN_SPIRV = 0xff000009, // .spv.kernel section, value the same as SHT_OPENCL_SPIRV
SHT_ZEBIN_ZEINFO = 0xff000011, // .ze_info section
SHT_ZEBIN_GTPIN_INFO = 0xff000012 // .gtpin_info section
};
namespace SectionsNamesZebin {
@@ -38,6 +39,7 @@ static constexpr ConstStringRef relTablePrefix = ".rel.";
static constexpr ConstStringRef spv = ".spv";
static constexpr ConstStringRef debugInfo = ".debug_info";
static constexpr ConstStringRef zeInfo = ".ze_info";
static constexpr ConstStringRef gtpinInfo = ".gtpin_info";
} // namespace SectionsNamesZebin
struct ZebinTargetFlags {

View File

@@ -65,6 +65,9 @@ DecodeError extractZebinSections(NEO::Elf::Elf<Elf::EI_CLASS_64> &elf, ZebinSect
case NEO::Elf::SHT_STRTAB:
// ignoring intentionally - section header names
continue;
case NEO::Elf::SHT_ZEBIN_GTPIN_INFO:
// ignoring intentionally - gtpin internal data
continue;
case NEO::Elf::SHT_NULL:
// ignoring intentionally, inactive section, probably UNDEF
continue;

View File

@@ -88,6 +88,7 @@ TEST(ExtractZebinSections, GivenKnownSectionsThenCapturesThemProperly) {
elfEncoder.appendSection(NEO::Elf::SHT_SYMTAB, NEO::Elf::SectionsNamesZebin::symtab, std::string{});
elfEncoder.appendSection(NEO::Elf::SHT_ZEBIN_ZEINFO, NEO::Elf::SectionsNamesZebin::zeInfo, std::string{});
elfEncoder.appendSection(NEO::Elf::SHT_ZEBIN_SPIRV, NEO::Elf::SectionsNamesZebin::spv, std::string{});
elfEncoder.appendSection(NEO::Elf::SHT_ZEBIN_GTPIN_INFO, NEO::Elf::SectionsNamesZebin::gtpinInfo, std::string{});
auto encodedElf = elfEncoder.encode();
std::string elfDecodeErrors;
std::string elfDecodeWarnings;