[Git][ghc/ghc][wip/unloading] 4 commits: Fix and enable object unloading in GHCi
Ben Gamari
gitlab at gitlab.haskell.org
Fri Oct 30 23:52:27 UTC 2020
Ben Gamari pushed to branch wip/unloading at Glasgow Haskell Compiler / GHC
Commits:
c2ed5e81 by Ömer Sinan Ağacan at 2020-10-30T19:52:22-04:00
Fix and enable object unloading in GHCi
Fixes #16525
See Note [Object unloading] in CheckUnload.c for details.
- - - - -
75ae73fa by Ray Shih at 2020-10-30T19:52:22-04:00
Add loadNativeObj and unloadNativeObj
(This change is originally written by niteria)
This adds two functions:
* `loadNativeObj`
* `unloadNativeObj`
and implements them for Linux.
They are useful if you want to load a shared object with Haskell code
using the system linker and have GHC call dlclose() after the
code is no longer referenced from the heap.
Using the system linker allows you to load the shared object
above outside the low-mem region. It also loads the DWARF sections
in a way that `perf` understands.
`dl_iterate_phdr` is what makes this implementation Linux specific.
- - - - -
a888e94b by GHC GitLab CI at 2020-10-30T19:52:22-04:00
rts: Introduce highMemDynamic
- - - - -
708ea4cf by GHC GitLab CI at 2020-10-30T19:52:23-04:00
Introduce test for dynamic library unloading
This uses the highMemDynamic flag introduced earlier to verify that
dynamic objects are properly unloaded.
- - - - -
30 changed files:
- compiler/GHC/Runtime/Linker.hs
- includes/rts/Linker.h
- includes/rts/storage/GC.h
- rts/CheckUnload.c
- rts/CheckUnload.h
- rts/Hash.c
- rts/Hash.h
- rts/Linker.c
- rts/LinkerInternals.h
- rts/RtsStartup.c
- rts/linker/Elf.c
- rts/linker/LoadArchive.c
- rts/linker/MachO.c
- rts/linker/PEi386.c
- rts/linker/elf_got.c
- rts/sm/Evac.c
- rts/sm/GC.c
- rts/sm/GC.h
- rts/sm/Storage.c
- testsuite/tests/ghci/T16525a/T16525a.script
- testsuite/tests/ghci/T16525a/T16525a.stdout
- testsuite/tests/ghci/T16525a/all.T
- + testsuite/tests/ghci/T16525b/A.hs
- + testsuite/tests/ghci/T16525b/B.hs
- + testsuite/tests/ghci/T16525b/T16525b.script
- + testsuite/tests/ghci/T16525b/T16525b.stdout
- + testsuite/tests/ghci/T16525b/all.T
- testsuite/tests/rts/linker/Makefile
- testsuite/tests/rts/linker/all.T
- testsuite/tests/rts/linker/linker_error.c
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e3cff938c3f97f7072a6e1c6d79c0ad644694878...708ea4cf8be9803fb100f20d44531f9be5f7a13f
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e3cff938c3f97f7072a6e1c6d79c0ad644694878...708ea4cf8be9803fb100f20d44531f9be5f7a13f
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20201030/8de7bc52/attachment.html>
More information about the ghc-commits
mailing list