llvm::object::extractCodeObject

Extract code object memory from the given Source object file at Offset and of Size, and copy into OutputFileName.

Synopsis

Declared in <llvm/Object/OffloadBundle.h>

Error
extractCodeObject(
    ObjectFile const& Source,
    size_t Offset,
    size_t Size,
    StringRef OutputFileName);

Return Value

Success or an error describing the failure.

Parameters

NameDescription
SourceObject file containing the code object.
OffsetByte offset of the code object within Source.
SizeSize in bytes of the code object.
OutputFileNamePath of the file to write the extracted object to.