unix-2.6.0.1: POSIX functionality

Portability | non-portable (requires POSIX)
Stability | provisional
Maintainer | vs@foldr.org
Safe Haskell | Trustworthy

System.Posix.DynamicLinker.ByteString

Description

Dynamic linker support through dlopen()

Synopsis

- module System.Posix.DynamicLinker.Prim
- dlopen :: RawFilePath -> [RTLDFlags] -> IO DL
- dlsym :: DL -> String -> IO (FunPtr a)
- dlerror :: IO String
- dlclose :: DL -> IO ()
- withDL :: RawFilePath -> [RTLDFlags] -> (DL -> IO a) -> IO a
- withDL_ :: RawFilePath -> [RTLDFlags] -> (DL -> IO a) -> IO ()
- undl :: DL -> Ptr ()

# Documentation

module System.Posix.DynamicLinker.Prim

dlopen :: RawFilePath -> [RTLDFlags] -> IO DL

dlsym :: DL -> String -> IO (FunPtr a)

`dlsym` returns the address binding of the symbol described in `symbol`, as it occurs in the shared object identified by `source`.

dlerror :: IO String

dlclose :: DL -> IO ()

withDL :: RawFilePath -> [RTLDFlags] -> (DL -> IO a) -> IO a

withDL_ :: RawFilePath -> [RTLDFlags] -> (DL -> IO a) -> IO ()

undl :: DL -> Ptr ()

`undl` obtains the raw handle. You mustn't do something like `withDL mod flags $ liftM undl >>= p -> use p`