[Mesa-stable] [PATCH 1/3] amd: Add relocation type and relocation target type to reloc structure
Jan Vesely
jan.vesely at rutgers.edu
Tue Jun 4 02:39:15 UTC 2019
Cc: mesa-stable at lists.freedesktop.org
Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
---
src/amd/common/ac_binary.c | 2 ++
src/amd/common/ac_binary.h | 2 ++
2 files changed, 4 insertions(+)
diff --git a/src/amd/common/ac_binary.c b/src/amd/common/ac_binary.c
index 8f4755ebe16..18dc72c61f0 100644
--- a/src/amd/common/ac_binary.c
+++ b/src/amd/common/ac_binary.c
@@ -102,6 +102,8 @@ static void parse_relocs(Elf *elf, Elf_Data *relocs, Elf_Data *symbols,
reloc->offset = rel.r_offset;
strncpy(reloc->name, symbol_name, sizeof(reloc->name)-1);
reloc->name[sizeof(reloc->name)-1] = 0;
+ reloc->type = GELF_R_TYPE(rel.r_info);
+ reloc->target_type = GELF_ST_TYPE(symbol.st_info);
}
}
diff --git a/src/amd/common/ac_binary.h b/src/amd/common/ac_binary.h
index 735e3932055..7541f19fb8e 100644
--- a/src/amd/common/ac_binary.h
+++ b/src/amd/common/ac_binary.h
@@ -34,6 +34,8 @@ extern "C" {
struct ac_shader_reloc {
char name[32];
uint64_t offset;
+ int type;
+ int target_type;
};
struct ac_shader_binary {
--
2.21.0
More information about the mesa-stable
mailing list