Re: [GHC] #2841: Ghci + foreign export declarations result in undefined symbols

#2841: Ghci + foreign export declarations result in undefined symbols -----------------------------------+------------------------------------ Reporter: fasta | Owner: ezyang Type: bug | Status: new Priority: normal | Milestone: _|_ Component: Compiler (FFI) | Version: 6.10.1 Resolution: | Keywords: Operating System: Linux | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -----------------------------------+------------------------------------ Changes (by ezyang): * owner: => ezyang * failure: => None/Unknown Comment: It's not explicitly stated anywhere, but the reason this doesn't work is because foreign exports are implemented using `__attribute__(constructor)`, but GHC's linker doesn't run the functions in init/init_array. #7746 is related (profiling uses init as well). I believe this should work fine if you use dynamic objects, in which case the system dynamic linker will properly handle this invocation for you. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/2841#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC