System.Posix.DynamicLinker.Prim

Copyright (c) Volker Stolz <[email protected]> 2003
License BSD-style (see the file libraries/base/LICENSE)
Maintainer [email protected]
Stability provisional
Portability non-portable (requires POSIX)
Safe Haskell Trustworthy
Language Haskell2010

Contents

Description

dlopen(3) and friends Derived from GModule.chs by M.Weber & M.Chakravarty which is part of c2hs. I left the API more or less the same, mostly the flags are different.

low level API

c_dlopen :: CString -> CInt -> IO (Ptr ()) Source

c_dlsym :: Ptr () -> CString -> IO (FunPtr a) Source

c_dlerror :: IO CString Source

c_dlclose :: Ptr () -> IO CInt Source

haveRtldNext :: Bool Source

On some hosts (e.g. SuSe and Ubuntu Linux) RTLD_NEXT (and RTLD_DEFAULT) are not visible without setting the macro _GNU_SOURCE. Since we don't want to define this macro, you can use the function haveRtldNext to check wether the flag Next is available. Ideally, this will be optimized by the compiler so that it should be as efficient as an #ifdef.

If you fail to test the flag and use it although it is undefined, packDL will throw an error.

haveRtldLocal :: Bool Source

Deprecated: defaults to True

packRTLDFlags :: [RTLDFlags] -> CInt Source

data RTLDFlags Source

Flags for dlopen.

packDL :: DL -> Ptr () Source

data DL Source

Flags for dlsym. Notice that Next might not be available on your particular platform! Use haveRtldNext.

If RTLD_DEFAULT is not defined on your platform, packDL Default reduces to nullPtr.

Constructors

Null
Next
Default
DLHandle (Ptr ())
Instances
Instances details
Show DL
Instance details

Defined in System.Posix.DynamicLinker.Prim

Methods

showsPrec :: Int -> DL -> ShowS Source

show :: DL -> String Source

showList :: [DL] -> ShowS Source

© The University of Glasgow and others
Licensed under a BSD-style license (see top of the page).
https://downloads.haskell.org/~ghc/8.10.2/docs/html/libraries/unix-2.7.2.2/System-Posix-DynamicLinker-Prim.html