[GHC] #10352: Properly link Haskell shared libs on ELF systems

GHC ghc-devs at haskell.org
Mon Jul 11 08:34:17 UTC 2016


#10352: Properly link Haskell shared libs on ELF systems
-------------------------------------+-------------------------------------
        Reporter:  duncan            |                Owner:
            Type:  task              |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.11
  (Linking)                          |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:  5987
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by trommler):

 Just an idea:

 The RTS is split into two parts, a small stub library and the actual RTS
 library (respectively its flavours). The stub library checks for an RTS
 parameter or an environment variable or ... to determine the flavour of
 RTS desired. The stub library `dlopen`s the appropriate
 shared library with `RTLD_GLOBAL` scope, which makes all RTS symbols
 available to all shared libraries loaded after. The linking of the stub
 RTS results in dangling references which is fine for ELF shared libraries.

 Perhaps, the functionality of the stub library could also be integrated
 into hs_init(). In that case libraries depending on the RTS  must not be
 linked against any flavour of the RTS resulting in dangling references.
 That is fine in ELF.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10352#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list