diff --git a/tools/llvm-readobj/ELFDumper.cpp b/tools/llvm-readobj/ELFDumper.cpp index 1aea4935da6..1012cf1085f 100644 --- a/tools/llvm-readobj/ELFDumper.cpp +++ b/tools/llvm-readobj/ELFDumper.cpp @@ -3524,7 +3524,7 @@ void GNUStyle::printVersionDefinitionSection(const ELFFile *Obj, const Elf_Shdr *StrTabSec = unwrapOrError(Obj->getSection(Sec->sh_link)); StringRef StringTable( reinterpret_cast(Obj->base() + StrTabSec->sh_offset), - StrTabSec->sh_size); + (size_t)StrTabSec->sh_size); const uint8_t *VerdefBuf = unwrapOrError(Obj->getSectionContents(Sec)).data(); const uint8_t *Begin = VerdefBuf; @@ -3568,7 +3568,7 @@ void GNUStyle::printVersionDependencySection(const ELFFile *Obj, const Elf_Shdr *StrTabSec = unwrapOrError(Obj->getSection(Sec->sh_link)); StringRef StringTable = { reinterpret_cast(Obj->base() + StrTabSec->sh_offset), - StrTabSec->sh_size}; + (size_t)StrTabSec->sh_size}; const uint8_t *VerneedBuf = SecData.data(); for (unsigned I = 0; I < VerneedNum; ++I) {