ghc-9.6.5: The GHC API
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.Linker.Types

Synopsis

Documentation

newtype Loader Source #

Constructors

Loader 

data LoaderState Source #

Constructors

LoaderState 

Fields

data LinkerEnv Source #

Constructors

LinkerEnv 

Fields

  • closure_env :: ClosureEnv

    Current global mapping from closure Names to their true values

  • itbl_env :: !ItblEnv

    The current global mapping from RdrNames of DataCons to info table addresses. When a new Unlinked is linked into the running image, or an existing module in the image is replaced, the itbl_env must be updated appropriately.

  • addr_env :: !AddrEnv

    Like closure_env and itbl_env, but for top-level 'Addr#' literals, see Note [Generating code for top-level string literal bindings] in GHC.StgToByteCode.

data Linkable Source #

Information we can use to dynamically link modules into the compiler

Constructors

LM 

Fields

Instances

Instances details
Outputable Linkable Source # 
Instance details

Defined in GHC.Linker.Types

Methods

ppr :: Linkable -> SDoc Source #

data Unlinked Source #

Objects which have yet to be linked by the compiler

Constructors

DotO ObjFile

An object file (.o)

DotA FilePath

Static archive file (.a)

DotDLL FilePath

Dynamically linked library file (.so, .dll, .dylib)

CoreBindings WholeCoreBindings

Serialised core which we can turn into BCOs (or object files), or used by some other backend See Note [Interface Files with Core Definitions]

LoadedBCOs [Unlinked]

A list of BCOs, but hidden behind extra indirection to avoid being too strict.

BCOs CompiledByteCode [SptEntry]

A byte-code object, lives only in memory. Also carries some static pointer table entries which should be loaded along with the BCOs. See Note [Grand plan for static forms] in GHC.Iface.Tidy.StaticPtrTable.

Instances

Instances details
Outputable Unlinked Source # 
Instance details

Defined in GHC.Linker.Types

Methods

ppr :: Unlinked -> SDoc Source #

data SptEntry Source #

An entry to be inserted into a module's static pointer table. See Note [Grand plan for static forms] in GHC.Iface.Tidy.StaticPtrTable.

Constructors

SptEntry Id Fingerprint 

Instances

Instances details
Outputable SptEntry Source # 
Instance details

Defined in GHC.Linker.Types

Methods

ppr :: SptEntry -> SDoc Source #

isObject :: Unlinked -> Bool Source #

Is this an actual file on disk we can link in somehow?

nameOfObject :: Unlinked -> FilePath Source #

Retrieve the filename of the linkable if possible. Panic if it is a byte-code object

isInterpretable :: Unlinked -> Bool Source #

Is this a bytecode linkable with no file on disk?

byteCodeOfObject :: Unlinked -> [CompiledByteCode] Source #

Retrieve the compiled byte-code if possible. Panic if it is a file-based linkable

data LibrarySpec Source #

Instances

Instances details
Outputable LibrarySpec Source # 
Instance details

Defined in GHC.Linker.Types

Methods

ppr :: LibrarySpec -> SDoc Source #