Implement unloading of shared libraries
In #8039 (closed) 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 (closed) with the relevant pointers:
Eli Bendersky's article suggests to use the dl_iterate_phdr function for finding information about loaded libraries. Seems to be linux only. There is a workaround on OSX, though, on !StackOverflow.
And here is how Böhm-Demers-Weiser's GC implement a callback function for dl_iterate_phdr.
Trac metadata
Trac field | Value |
---|---|
Version | 7.7 |
Type | Task |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Runtime System |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |