
#12735: Evaluate the feasibility of using lld for linking -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: task | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.0.1 (Linker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): Replying to [comment:2 dobenour]:
I would like to investigate a different approach: split the RTS linker as a C library that can be used by other projects, and which exposes a C API. GHC would then depend on this library.
I actually had a look at the `lld` codebase a few weeks ago and my initial impressions were that it isn't terribly well-suited to be used as a runtime linker. I offers a lot of parsing and relocation logic, but it lacks any support for managing mappings and the like. Consequently, I think the option that you suggest (which erikd has also advocated for in the past) is the only way forward. I would love to see it happen, but it will take some time. Currently our runtime linker is sorely in need of tests; this makes any sort of large-scale refactoring quite risky. `lld`'s testsuite may be a good source of inspiration (and perhaps even tests!) for fixing this. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12735#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler