mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-29 09:03:14 +08:00
Handle relocations from zeBin
Related-To: NEO-5323 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
d19d8e0829
commit
5d2ea72db6
@@ -63,12 +63,12 @@ struct Elf {
|
||||
return (elfSymbol.info >> 4) & 0xf;
|
||||
}
|
||||
|
||||
std::string getSectionName(uint32_t id) const {
|
||||
MOCKABLE_VIRTUAL std::string getSectionName(uint32_t id) const {
|
||||
auto sectionHeaderNamesData = sectionHeaders[elfFileHeader->shStrNdx].data;
|
||||
return std::string(reinterpret_cast<const char *>(sectionHeaderNamesData.begin()) + sectionHeaders[id].header->name);
|
||||
}
|
||||
|
||||
std::string getSymbolName(uint32_t nameOffset) const {
|
||||
MOCKABLE_VIRTUAL std::string getSymbolName(uint32_t nameOffset) const {
|
||||
auto sectionHeaderNamesData = sectionHeaders[elfFileHeader->shStrNdx].data;
|
||||
return std::string(reinterpret_cast<const char *>(sectionHeaderNamesData.begin()) + nameOffset);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2020 Intel Corporation
|
||||
* Copyright (C) 2019-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -32,6 +32,7 @@ enum SHT_ZEBIN : uint32_t {
|
||||
namespace SectionsNamesZebin {
|
||||
static constexpr ConstStringRef textPrefix = ".text.";
|
||||
static constexpr ConstStringRef dataConst = ".data.const";
|
||||
static constexpr ConstStringRef dataGlobalConst = ".data.global_const";
|
||||
static constexpr ConstStringRef dataGlobal = ".data.global";
|
||||
static constexpr ConstStringRef symtab = ".symtab";
|
||||
static constexpr ConstStringRef relTablePrefix = ".rel.";
|
||||
|
||||
Reference in New Issue
Block a user