Removing header size from formula (#1988)

Fixed a bug in the elf file size computation.

[ROCm/clr commit: eab81ca91b]
Этот коммит содержится в:
Jatin Chaudhary
2020-04-06 15:37:07 +05:30
коммит произвёл GitHub
родитель aae8a4080d
Коммит f2ea243fa5
+1 -2
Просмотреть файл
@@ -1179,8 +1179,7 @@ string read_elf_file_as_string(const void* file) {
auto h = static_cast<const ELFIO::Elf64_Ehdr*>(file);
auto s = static_cast<const char*>(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};
}