[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:14 PDT 2024


================
@@ -321,6 +321,11 @@ class ELFFile {
 
   std::vector<Elf_Rel> decode_relrs(Elf_Relr_Range relrs) const;
 
+  uint64_t crelHeader(ArrayRef<uint8_t> Content) const;
+  using RelsOrRelas = std::pair<std::vector<Elf_Rel>, std::vector<Elf_Rela>>;
----------------
smithp35 wrote:

There is an identically named type in LLD which has a similar purpose but is slightly different https://github.com/llvm/llvm-project/blob/main/lld/ELF/InputSection.h#L39 . Is this likely to clash?

In LLD this is an exclusive or, it looks like this could be an inclusive or as both parts of the pair are accessed in `printDynamicRelocationsHelper` ; however that might just be for implementation convenience.

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


More information about the cfe-commits mailing list