summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorPeter Trommler <ptrommler@acm.org>2015-03-07 11:13:37 -0600
committerAustin Seipp <austin@well-typed.com>2015-03-07 11:13:37 -0600
commit0fcc454329c4e3e0dc4474412bff599d0e9bdfcd (patch)
treee82ad6ced849aabac0a11df129703f9e8f90dc86 /compiler
parent76b1e11943d794da61d342c072a783862a9e2a1a (diff)
downloadhaskell-0fcc454329c4e3e0dc4474412bff599d0e9bdfcd.tar.gz
Dynamically link all loaded packages in new object
Summary: As a result of fixing #8935 we needed to open shared libraries with RTLD_LOCAL and so symbols from packages loaded earlier cannot be found anymore. We need to include in the link all packages loaded so far. This fixes #10058 Test Plan: validate Reviewers: hvr, simonmar, austin Reviewed By: austin Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D676 GHC Trac Issues: #10058
Diffstat (limited to 'compiler')
-rw-r--r--compiler/ghci/Linker.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/ghci/Linker.hs b/compiler/ghci/Linker.hs
index 0e36cd9d20..a2e694e879 100644
--- a/compiler/ghci/Linker.hs
+++ b/compiler/ghci/Linker.hs
@@ -846,7 +846,10 @@ dynLoadObjs dflags pls objs = do
buildTag = mkBuildTag [WayDyn],
outputFile = Just soFile
}
- linkDynLib dflags2 objs []
+ -- link all "loaded packages" so symbols in those can be resolved
+ -- Note: We are loading packages with local scope, so to see the
+ -- symbols in this link we must link all loaded packages again.
+ linkDynLib dflags2 objs (pkgs_loaded pls)
consIORef (filesToNotIntermediateClean dflags) soFile
m <- loadDLL soFile
case m of