================ @@ -1117,9 +1155,11 @@ void ELFObjectFile<ELFT>::getRelocationTypeName( template <class ELFT> Expected<int64_t> ELFObjectFile<ELFT>::getRelocationAddend(DataRefImpl Rel) const { - if (getRelSection(Rel)->sh_type != ELF::SHT_RELA) - return createError("Section is not SHT_RELA"); - return (int64_t)getRela(Rel)->r_addend; + if (getRelSection(Rel)->sh_type == ELF::SHT_RELA) + return (int64_t)getRela(Rel)->r_addend; + if (getRelSection(Rel)->sh_type == ELF::SHT_CREL) + return (int64_t)getCrel(Rel).r_addend; + return createError("Section is not SHT_RELA"); ---------------- jh7370 wrote:
I'm not sure this error quite makes sense anymore. Probably needs to say something about addends. 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