[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)
Peter Smith via cfe-commits
cfe-commits at lists.llvm.org
Fri May 17 07:50:31 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 (unsigned i = 0, e = Relocs.size(); i != e; ++i)
----------------
smithp35 wrote:
Given that Relocs.size() returns size_t would it be better to use size_t here?
https://github.com/llvm/llvm-project/pull/91280
More information about the cfe-commits
mailing list