================ @@ -1453,6 +1525,15 @@ template <class ELFT> bool ELFObjectFile<ELFT>::isRelocatableObject() const { return EF.getHeader().e_type == ELF::ET_REL; } +template <class ELFT> +StringRef ELFObjectFile<ELFT>::getCrelError(DataRefImpl Sec) const { + uintptr_t SHT = reinterpret_cast<uintptr_t>(cantFail(EF.sections()).begin()); + auto I = (Sec.p - SHT) / EF.getHeader().e_shentsize; + if (I < CrelErrs.size()) + return CrelErrs[I]; + return ""; ---------------- MaskRay wrote:
I have changed `mutable SmallVector<std::string, 0> CrelErrs;` so that it is only non-empty when there is a decoder problem. This is now needed. https://github.com/llvm/llvm-project/pull/97382 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits