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

James Henderson via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 19 06:39:06 PDT 2024


================
@@ -392,6 +393,73 @@ ELFFile<ELFT>::decode_relrs(Elf_Relr_Range relrs) const {
   return Relocs;
 }
 
+template <class ELFT>
+Expected<uint64_t>
+ELFFile<ELFT>::getCrelHeader(ArrayRef<uint8_t> Content) const {
+  DataExtractor Data(Content, isLE(), ELFT::Is64Bits ? 8 : 4);
----------------
jh7370 wrote:

Not quite what I had in mind, if I'm honest. Perhaps `sizeof(ELFT::Addr)`?

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


More information about the cfe-commits mailing list