[GHC] #8974: 64 bit windows executable built with ghc-7.9.20140405+LLVM segfaults
GHC
ghc-devs at haskell.org
Thu Sep 22 15:28:29 UTC 2016
#8974: 64 bit windows executable built with ghc-7.9.20140405+LLVM segfaults
------------------------------------+--------------------------------------
Reporter: awson | Owner:
Type: bug | Status: new
Priority: high | Milestone: 8.0.1
Component: Compiler (LLVM) | Version: 7.9
Resolution: | Keywords:
Operating System: Windows | Architecture: x86_64 (amd64)
Type of failure: Runtime crash | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
------------------------------------+--------------------------------------
Comment (by awson):
Since I have now quite a bit of spare time, I've decided to look into
this.
Indeed, binutils `ld` is wrong here. I've created
[https://sourceware.org/bugzilla/show_bug.cgi?id=17955#c1 the patch to
binutils] which fixes things for me.
OTOH, mention should be made that R_X86_64_PC64 reloc is '''not
supported''' by MS in PE-COFF and neither MS `link` nor LLVM `lld` can
handle it (the former simply ignores it and the latter complains about
unsupported relocation type). Thus the proper way to fix it is to use a
workaround similar to that used in NCG (see my comment above) to make LLVM
generate R_X86_64_PC32 relocs instead.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8974#comment:40>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list