[GHC] #8238: Implement unloading of shared libraries

#8238: Implement unloading of shared libraries ------------------------------------+------------------------------------- Reporter: simonmar | Owner: Type: task | Status: new Priority: normal | Milestone: 7.10.1 Component: Runtime System | Version: 7.7 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: 8039 | ------------------------------------+------------------------------------- In #8039 we added support for unloading static objects from the runtime linker, with the GC detecting when there are no references left. We could add this functionality for shared libraries too, using `dl_iterate_phdr`. @heisenbug's comment from #8039 with the relevant pointers: [http://eli.thegreenplace.net/2011/08/25/load-time-relocation-of-shared- libraries Eli Bendersky's article] suggests to use the [http://linux.die.net/man/3/dl_iterate_phdr dl_iterate_phdr] function for finding information about loaded libraries. Seems to be linux only. There is a [http://stackoverflow.com/questions/10009043/dl-iterate-phdr- equivalent-on-mac workaround on OSX], though, on !StackOverflow. And here is how Böhm-Demers-Weiser's GC implement a [https://github.com/ivmai/bdwgc/blob/master/dyn_load.c#L451 callback function for dl_iterate_phdr]. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8238 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8238: Implement unloading of shared libraries -------------------------------------+------------------------------------ Reporter: simonmar | Owner: Type: task | Status: new Priority: normal | Milestone: 7.10.1 Component: Runtime System | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: 8039 -------------------------------------+------------------------------------ Changes (by heisenbug): * cc: ggreif@… (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8238#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8238: Implement unloading of shared libraries -------------------------------------+------------------------------------ Reporter: simonmar | Owner: Type: task | Status: new Priority: normal | Milestone: 7.10.1 Component: Runtime System | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: 8039 -------------------------------------+------------------------------------ Comment (by heisenbug): Some code has been written, take it or leave it: http://ghc.haskell.org/trac/ghc/ticket/8039#comment:15 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8238#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8238: Implement unloading of shared libraries -------------------------------------+------------------------------------- Reporter: simonmar | Owner: Type: task | Status: patch Priority: normal | Milestone: 7.12.1 Component: Runtime System | Version: 7.7 (Linker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: 8039 | Differential Revisions: -------------------------------------+------------------------------------- Changes (by ezyang): * status: new => patch * component: Runtime System => Runtime System (Linker) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8238#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8238: Implement unloading of shared libraries -------------------------------------+------------------------------------- Reporter: simonmar | Owner: Type: task | Status: new Priority: normal | Milestone: 8.0.1 Component: Runtime System | Version: 7.7 (Linker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: 8039 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * status: patch => new Comment: Moving out of review queue. The patch mentioned in comment:2 is unfinished. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8238#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8238: Implement unloading of shared libraries -------------------------------------+------------------------------------- Reporter: simonmar | Owner: Type: task | Status: new Priority: normal | Milestone: 8.0.1 Component: Runtime System | Version: 7.7 (Linker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: 8039 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by trommler): * cc: trommler (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8238#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8238: Implement unloading of shared libraries -------------------------------------+------------------------------------- Reporter: simonmar | Owner: (none) Type: task | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 7.7 (Linker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: 8039 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by mniip): * cc: mniip (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8238#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC