[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)
James Henderson via cfe-commits
cfe-commits at lists.llvm.org
Thu May 23 02:38:16 PDT 2024
================
@@ -934,10 +943,51 @@ void ELFWriter::WriteSecHdrEntry(uint32_t Name, uint32_t Type, uint64_t Flags,
WriteWord(EntrySize); // sh_entsize
}
+template <class uint>
+static void encodeCrel(ArrayRef<ELFRelocationEntry> Relocs, raw_ostream &os) {
+ uint OffsetMask = 8, Offset = 0, Addend = 0;
+ uint32_t Symidx = 0, Type = 0;
+ // hdr & 4 indicates 3 flag bits in delta offset and flags members.
+ for (size_t i = 0, e = Relocs.size(); i != e; ++i)
----------------
jh7370 wrote:
Nit: `i` and `e` -> `I` and `E`.
https://github.com/llvm/llvm-project/pull/91280
More information about the cfe-commits
mailing list