[GHC] #8698: .ctors handling does not work on Windows 64-bit ghci

GHC ghc-devs at haskell.org
Tue Feb 4 22:58:15 UTC 2014


#8698: .ctors handling does not work on Windows 64-bit ghci
-------------------------------+----------------------------------
        Reporter:  awson       |            Owner:  ezyang
            Type:  bug         |           Status:  new
        Priority:  normal      |        Milestone:
       Component:  Compiler    |          Version:  7.8.1-rc1
      Resolution:              |         Keywords:
Operating System:  Windows     |     Architecture:  x86_64 (amd64)
 Type of failure:  GHCi crash  |       Difficulty:  Unknown
       Test Case:              |       Blocked By:
        Blocking:              |  Related Tickets:
-------------------------------+----------------------------------

Comment (by ezyang):

 This patch seems to be enough to do that:

 {{{
 diff --git a/rts/Linker.c b/rts/Linker.c
 index b9c8fd0..649df7f 100644
 --- a/rts/Linker.c
 +++ b/rts/Linker.c
 @@ -211,9 +211,7 @@ static int ocAllocateSymbolExtras_ELF ( ObjectCode* oc
 );
  static int ocVerifyImage_PEi386 ( ObjectCode* oc );
  static int ocGetNames_PEi386    ( ObjectCode* oc );
  static int ocResolve_PEi386     ( ObjectCode* oc );
 -#if !defined(x86_64_HOST_ARCH)
  static int ocRunInit_PEi386     ( ObjectCode* oc );
 -#endif
  static void *lookupSymbolInDLLs ( unsigned char *lbl );
  static void zapTrailingAtSign   ( unsigned char *sym );
  static char *allocateImageAndTrampolines (
 @@ -2875,10 +2873,8 @@ resolveObjs( void )
  #if defined(OBJFORMAT_ELF)
              r = ocRunInit_ELF ( oc );
  #elif defined(OBJFORMAT_PEi386)
 -#if !defined(x86_64_HOST_ARCH)
              /* It does not work on x86_64 yet. #8698. */
              r = ocRunInit_PEi386 ( oc );
 -#endif
  #elif defined(OBJFORMAT_MACHO)
              r = ocRunInit_MachO ( oc );
  #else
 @@ -4415,7 +4411,6 @@ ocResolve_PEi386 ( ObjectCode* oc )
  }

  /* It does not work on x86_64 yet. #8698. */
 -#if !defined(x86_64_HOST_ARCH)
  static int
  ocRunInit_PEi386 ( ObjectCode *oc )
  {
 @@ -4458,7 +4453,6 @@ ocRunInit_PEi386 ( ObjectCode *oc )
      freeProgEnvv(envc, envv);
      return 1;
  }
 -#endif

  #endif /* defined(OBJFORMAT_PEi386) */

 }}}

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


More information about the ghc-tickets mailing list