diff --git a/src/hip_module.cpp b/src/hip_module.cpp index 2d4fde7c26..192aba5da6 100644 --- a/src/hip_module.cpp +++ b/src/hip_module.cpp @@ -1179,8 +1179,7 @@ string read_elf_file_as_string(const void* file) { auto h = static_cast(file); auto s = static_cast(file); // This assumes the common case of SHT being the last part of the ELF. - auto sz = - sizeof(ELFIO::Elf64_Ehdr) + h->e_shoff + h->e_shentsize * h->e_shnum; + auto sz = h->e_shoff + h->e_shentsize * h->e_shnum; return string{s, s + sz}; }