[GHC] #9237: GHC not recognizing INPUT(-llibrary) in linker scripts

GHC ghc-devs at haskell.org
Sat Sep 5 17:56:42 UTC 2015


#9237: GHC not recognizing INPUT(-llibrary) in linker scripts
-------------------------------------+-------------------------------------
        Reporter:  mmikolajczyk      |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:  7.12.1
       Component:  Runtime System    |                 Version:  7.8.2
  (Linker)                           |
      Resolution:                    |                Keywords:
Operating System:  Linux             |            Architecture:  x86_64
                                     |  (amd64)
 Type of failure:  GHCi crash        |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:  2615, 10046       |  Differential Revisions:
-------------------------------------+-------------------------------------
Changes (by hgolden):

 * failure:  Compile-time crash => GHCi crash
 * component:  Compiler (Linking) => Runtime System (Linker)
 * os:  Unknown/Multiple => Linux


Comment:

 Replying to [comment:2 rwbarton]:
 > Oh, hmm, I actually looked at the code and we do already inspect the
 error string from `dlopen` and try to parse a linker script. The problem
 is that we don't support `INPUT(-llibrary)`. I guess we can transform the
 name to `liblibrary.so` in that case?

 I think that's what's needed. I don't run Arch Linux right now. Maybe I'll
 have some time to install it in a VM and try out this approach.

 When I fixed #2615, the hardest part was generating a test to prove it
 worked. I envision the same difficulty here.

 > I still would like to avoid incurring dependencies on `.so`s that are
 really linker scripts, if possible...

 I don't see any way to avoid this unless we find a way to call `ld` as a
 helper. Doing this would be way beyond my level of understanding.

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


More information about the ghc-tickets mailing list