llvm::object::decodeCrel

Decode a CREL relocation blob, invoking handlers for the header and entries.

Synopsis

Declared in <llvm/Object/ELF.h>

template<bool Is64>
Error
decodeCrel(
    ArrayRef<uint8_t> Content,
    function_ref<void(uint64_t, bool)> HdrHandler,
    function_ref<void(Elf_Crel_Impl<Is64>)> EntryHandler);

Description

HdrHandler is called once with the number of relocations and whether the relocations have addends. EntryHandler is called once per decoded relocation.

Return Value

Success, or an error if decoding fails.

Parameters

NameDescription
ContentEncoded CREL section bytes.
HdrHandlerCallback receiving relocation count and addend flag.
EntryHandlerCallback invoked once per decoded CREL entry.