Fix debug zebin creation

- ELF type is EXEC
- Absolute GPU addresses in program headers as load addresses
- All relocations are applied (not only for debug info as before)
- Default section alignment for debug zebin is set to 4,
this fix the problem with .notes section parsing

Related-To: NEO-5571
Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
This commit is contained in:
Igor Venevtsev
2022-01-19 18:03:32 +00:00
committed by Compute-Runtime-Automation
parent f8c104feaa
commit af7a475cb0
7 changed files with 71 additions and 83 deletions

View File

@@ -20,7 +20,7 @@ namespace Debug {
struct Segments {
struct Segment {
uintptr_t address = std::numeric_limits<uintptr_t>::max();
ArrayRef<const uint8_t> data;
size_t size = 0;
};
using CPUSegment = Segment;
using GPUSegment = Segment;
@@ -41,7 +41,7 @@ class DebugZebinCreator {
DebugZebinCreator() = delete;
DebugZebinCreator(Elf &zebin, const Segments &segments) : segments(segments), zebin(zebin) {}
void applyDebugRelocations();
void applyRelocations();
void createDebugZebin();
inline std::vector<uint8_t> getDebugZebin() { return debugZebin; }