[GHC] #4210: LLVM: Dynamic Library Support

GHC ghc-devs at haskell.org
Mon Jan 20 19:47:51 UTC 2014


#4210: LLVM: Dynamic Library Support
-------------------------------------+------------------------------------
        Reporter:  dterei            |            Owner:  dterei
            Type:  feature request   |           Status:  closed
        Priority:  low               |        Milestone:  7.6.2
       Component:  Compiler (LLVM)   |          Version:  6.13
      Resolution:  fixed             |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  Runtime crash     |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------

Comment (by bgamari):

 It turns out that the code above is the same as is seen in `libHSghc-
 prim*.so` so it seems that the `R_ARM_COPY` relocation is indeed being
 correctly performed. Given that this same code works with gold, it seems
 likely that this isn't trampoline code but instead the correct code for
 this symbol. I now think that it is the copy itself that is causing the
 crash due to tables-before-code. While the linker knows to copy the symbol
 itself, it doesn't copy the info table preceding it.

 Trying to make the runtime linker do the right thing with `R_ARM_COPY`
 with tables-before-code enabled is going to be very difficult, if not
 impossible. If this hypothesis is correct, we should disable tables-
 before-code on ARM when using affected linkers (all versions of bfd ld, as
 far as I can tell).

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


More information about the ghc-tickets mailing list