[GHC] #10458: GHCi fails to load shared object (the 'impossible' happened)
GHC
ghc-devs at haskell.org
Thu Dec 31 13:27:42 UTC 2015
#10458: GHCi fails to load shared object (the 'impossible' happened)
-------------------------------+----------------------------------------
Reporter: rleslie | Owner:
Type: bug | Status: new
Priority: high | Milestone: 8.0.1
Component: GHCi | Version: 7.10.1
Resolution: | Keywords:
Operating System: Linux | Architecture: Unknown/Multiple
Type of failure: GHCi crash | Test Case:
Blocked By: | Blocking: 11042
Related Tickets: | Differential Rev(s): Phab:D1631
Wiki Page: |
-------------------------------+----------------------------------------
Changes (by trommler):
* status: patch => new
Comment:
@simonmar did not like my hack, and he is right.
Let me sit down and actually fix dynamic linking properly.
My plan for a redesign of dynamic linking is (I'll add that to Trac #11238
too):
1. Use ld to generate a temporary shared object .so from an object file
.o linking no other libraries at all. ELF shared objects allow undefined
symbols at link time.
1. Link all temporary shared objects, Haskell libraries, and command
line C libraries (in that order) into a dummy shared object. Exclude
shared objects that are to be unloaded from the link.
1. Load the dummy shared object. Call this the "new" dummy shared
object and call the one that was previously loaded the "old" dummy shared
object.
1. Unload (dlclose) the dummy shared object. This will also unload
shared objects that are to be unloaded (unless they are still referenced
by other still loaded libraries).
See Phab:1631 for details.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10458#comment:29>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list