================
@@ -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");
----------------
MaskRay wrote:
Error message adjusted. I think this line is dynamically unreachable.
https://github.com/llvm/llvm-project/pull/97382
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits