ObjectFile

public class ObjectFile : BinaryFile

An in-memory representation of a format-independent object file.

  • Creates an object file with the contents of a provided memory buffer.

    Throws

    BinaryFileError if there was an error on creation.

    Declaration

    Swift

    public override init(memoryBuffer: MemoryBuffer, in context: Context = .global) throws

    Parameters

    memoryBuffer

    A memory buffer containing a valid object file.

    context

    The context to allocate the given binary in.

  • Returns a sequence of all the sections in this object file.

    Declaration

    Swift

    public var sections: SectionSequence { get }
  • Returns a sequence of all the symbols in this object file.

    Declaration

    Swift

    public var symbols: SymbolSequence { get }