blob: 5078852f6e532760566ef3cc213fa4c40711cb74 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
{-# LANGUAGE ForeignFunctionInterface #-}
import Foreign
import System.Posix.DynamicLinker
main :: IO ()
main = do
dl <- dlopen "./T13702" [RTLD_NOW]
funptr <- dlsym dl "hello" :: IO (FunPtr (IO ()))
mkAction funptr
foreign import ccall "dynamic" mkAction :: FunPtr (IO ()) -> IO ()
|