@@ -408,8 +408,9 @@ static bool checkOffsets(const typename ELFT::Phdr &Phdr,
408
408
return true ;
409
409
410
410
// Only non-empty sections can be at the end of a segment.
411
- uint64_t SectionSize = Sec.sh_size ? Sec.sh_size : 1 ;
412
- AddressRange SectionAddressRange (Sec.sh_offset , Sec.sh_offset + SectionSize);
411
+ uint64_t SectionSize = Sec.sh_size ? Sec.sh_size : 1ull ;
412
+ AddressRange SectionAddressRange ((uint64_t )Sec.sh_offset ,
413
+ Sec.sh_offset + SectionSize);
413
414
AddressRange SegmentAddressRange (Phdr.p_offset ,
414
415
Phdr.p_offset + Phdr.p_filesz );
415
416
if (SegmentAddressRange.contains (SectionAddressRange))
@@ -425,8 +426,9 @@ template <class ELFT>
425
426
static bool checkVMA (const typename ELFT::Phdr &Phdr,
426
427
const typename ELFT::Shdr &Sec, bool &Overlap) {
427
428
// Only non-empty sections can be at the end of a segment.
428
- uint64_t SectionSize = Sec.sh_size ? Sec.sh_size : 1 ;
429
- AddressRange SectionAddressRange (Sec.sh_addr , Sec.sh_addr + SectionSize);
429
+ uint64_t SectionSize = Sec.sh_size ? Sec.sh_size : 1ull ;
430
+ AddressRange SectionAddressRange ((uint64_t )Sec.sh_addr ,
431
+ Sec.sh_addr + SectionSize);
430
432
AddressRange SegmentAddressRange (Phdr.p_vaddr , Phdr.p_vaddr + Phdr.p_memsz );
431
433
432
434
if (SegmentAddressRange.contains (SectionAddressRange))
0 commit comments