Moduleghc-9.10.3GHC2021
GHC.Linker.Types
- 12 types
- 14 values
- Packageghc-9.10.3
- Exports26
- LanguageGHC2021
- LicenceBSD-3-Clause
- SourceTypes.hs
Constructors
LoaderStatelinker_env :: !LinkerEnvCurrent global mapping from Names to their true values
bcos_loaded :: !LinkableSetThe currently loaded interpreted modules (home package)
objs_loaded :: !LinkableSetAnd the currently-loaded compiled modules (home package)
pkgs_loaded :: !PkgsLoadedThe currently-loaded packages; always object code haskell libraries, system libraries, transitive dependencies
temp_sos :: ![(FilePath, String)]We need to remember the name of previous temporary DLL/.so libraries so we can link them (see #10322)
Constructors
LinkerEnvclosure_env :: !ClosureEnvCurrent global mapping from closure Names to their true values
itbl_env :: !ItblEnvThe 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 :: !AddrEnvLike closure_env and itbl_env, but for top-level
Addr#literals, see Note [Generating code for top-level string literal bindings] in GHC.StgToByteCode.
Information we can use to dynamically link modules into the compiler
Constructors
LMlinkableTime :: !UTCTimeTime at which this linkable was built (i.e. when the bytecodes were produced, or the mod date on the files)
linkableModule :: !ModuleThe linkable module itself
linkableUnlinked :: [Unlinked]Those files and chunks of code we have yet to link.
INVARIANT: A valid linkable always has at least one Unlinked item.
Instances1Outputable
Outputable LinkableDefined in ghc-9.10.3 · GHC.Linker.Types
Objects which have yet to be linked by the compiler
Constructors
DotO ObjFileAn object file (.o)
DotA FilePathStatic archive file (.a)
DotDLL FilePathDynamically linked library file (.so, .dll, .dylib)
CoreBindings WholeCoreBindingsSerialised 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.
Instances1Outputable
Outputable UnlinkedDefined in ghc-9.10.3 · GHC.Linker.Types
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
Instances1Outputable
Outputable SptEntryDefined in ghc-9.10.3 · GHC.Linker.Types
Is this an actual file on disk we can link in somehow?
Retrieve the filename of the linkable if possible. Panic if it is a byte-code object
Is this a bytecode linkable with no file on disk?
Retrieve the compiled byte-code if possible. Panic if it is a file-based linkable
Instances1Outputable
Outputable LibrarySpecDefined in ghc-9.10.3 · GHC.Linker.Types
Constructors
LoadedPkgInfoloaded_pkg_uid :: !UnitIdloaded_pkg_hs_objs :: ![LibrarySpec]loaded_pkg_non_hs_objs :: ![LibrarySpec]loaded_pkg_hs_dlls :: ![RemotePtr LoadedDLL]See Note [Looking up symbols in the relevant objects]
loaded_pkg_trans_deps :: UniqDSet UnitId
Instances1Outputable
Outputable LoadedPkgInfoDefined in ghc-9.10.3 · GHC.Linker.Types