================ @@ -1117,9 +1166,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) ---------------- smithp35 wrote:
If the addend bit in the "header" for the CREL section is 0 should this return an Error? 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