================ @@ -4888,6 +4920,34 @@ void ELFDumper<ELFT>::printRelocationsHelper(const Elf_Shdr &Sec) { template <class ELFT> void ELFDumper<ELFT>::printDynamicRelocationsHelper() { const bool IsMips64EL = this->Obj.isMips64EL(); + auto DumpCrelRegion = [&](DynRegionInfo &Region) { + // While the size is unknown, a valid CREL has at least one byte. We can + // check whether Addr is in bounds, and then decode CREL until the file + // end. + Region.Size = Region.EntSize = 1; + if (!Region.template getAsArrayRef<uint8_t>().empty()) { + const uint64_t Offset = + Region.Addr - + (const uint8_t *)ObjF.getMemoryBufferRef().getBufferStart(); ---------------- jh7370 wrote:
Nit: reinterpret_cast https://github.com/llvm/llvm-project/pull/91280 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits