[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

Peter Smith via cfe-commits cfe-commits at lists.llvm.org
Thu May 9 06:51:16 PDT 2024


================
@@ -1142,6 +1193,13 @@ ELFObjectFile<ELFT>::getRela(DataRefImpl Rela) const {
   return *Ret;
 }
 
+template <class ELFT>
----------------
smithp35 wrote:

Is there any way this can be called before Crels has been populated? If not then please ignore the rest of the comment.

It looks like getRelocatedSection() will need to be called first.

It looks like all the existing use cases here are safe, but if this is part of the general API then maybe worth some additional asserts and pre-conditions given in comments.

https://github.com/llvm/llvm-project/pull/91280


More information about the cfe-commits mailing list