From 371a872e7c80c50fad233c56dac1952c98c119f4 Mon Sep 17 00:00:00 2001 From: foreman Date: Thu, 3 Oct 2019 18:51:01 -0400 Subject: [PATCH] P4 to Git Change 2008360 by gandryey@gera-win10 on 2019/10/03 18:48:04 SWDEV-204999 - [hipclang-vdi-rocm] TF unit test tracking.util_xla_test_gpu fails to run - Fix a regression with 32bit binaries in HSAIL mode Affected files ... ... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/elf/elf.hpp#28 edit --- rocclr/compiler/lib/loaders/elf/elf.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rocclr/compiler/lib/loaders/elf/elf.hpp b/rocclr/compiler/lib/loaders/elf/elf.hpp index 943bf55bc7..7d042973ef 100644 --- a/rocclr/compiler/lib/loaders/elf/elf.hpp +++ b/rocclr/compiler/lib/loaders/elf/elf.hpp @@ -334,7 +334,8 @@ public: const char* getErrMsg() { return _err.getOclElfError(); } unsigned char getELFClass() { return _eclass; } - bool isHsaCo() const { return (elf64_getehdr(_e)->e_machine == EM_AMDGPU); } + bool isHsaCo() const { return (_eclass == ELFCLASS32) ? + (elf32_getehdr(_e)->e_machine == EM_AMDGPU) : (elf64_getehdr(_e)->e_machine == EM_AMDGPU); } private: