[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Tue May 28 00:05:23 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)
----------------
MaskRay wrote:
changed to a for each loop
https://github.com/llvm/llvm-project/pull/91280
More information about the llvm-commits
mailing list