mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-28 16:48:45 +08:00
fix(debug zebin): handle misaligned access
Handle misaligned access when aplying debug relocations in zebin. Debug relocations entries have offsets which are not of natural alignment, and need to be specificialy handled. Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
6806a0fb36
commit
d4fe9298bf
@@ -47,7 +47,7 @@ class DebugZebinCreator {
|
||||
inline std::vector<uint8_t> getDebugZebin() { return debugZebin; }
|
||||
|
||||
protected:
|
||||
void applyRelocation(uint64_t addr, uint64_t value, NEO::Elf::RELOC_TYPE_ZEBIN type);
|
||||
void applyRelocation(uintptr_t addr, uint64_t value, NEO::Elf::RELOC_TYPE_ZEBIN type);
|
||||
bool isRelocTypeSupported(NEO::Elf::RELOC_TYPE_ZEBIN type);
|
||||
const Segments::Segment *getSegmentByName(ConstStringRef sectionName);
|
||||
const Segments::Segment *getTextSegmentByName(ConstStringRef textSegmentName);
|
||||
@@ -59,6 +59,9 @@ class DebugZebinCreator {
|
||||
std::vector<uint8_t> debugZebin;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
void patchWithValue(uintptr_t addr, T value);
|
||||
|
||||
std::vector<uint8_t> createDebugZebin(ArrayRef<const uint8_t> zebin, const Segments &segmentData);
|
||||
} // namespace Debug
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user