Andreas Klebinger pushed to branch wip/andreask/linker_fix at Glasgow Haskell Compiler / GHC

Commits:

2 changed files:

Changes:

  • rts/Linker.c
    ... ... @@ -1394,7 +1394,7 @@ preloadObjectFile (pathchar *path)
    1394 1394
         * the sections. And hence we need to leave r+w+x here for other hosts
    
    1395 1395
         * until all hosts have been made aware of the initial image being r+w only.
    
    1396 1396
         *
    
    1397
    -    * See also the misalignment logic for darwin below.
    
    1397
    +    * See also the alignment logic for darwin sections.
    
    1398 1398
         */
    
    1399 1399
     #if defined(darwin_HOST_OS) || defined(openbsd_HOST_OS)
    
    1400 1400
        image = mmapForLinker(fileSize, MEM_READ_WRITE, MAP_PRIVATE, fd, 0);
    

  • rts/linker/LoadArchive.c
    ... ... @@ -596,11 +596,11 @@ HsInt loadArchive_ (pathchar *path)
    596 596
                 ASSERT(!isGnuIndex);
    
    597 597
                 DEBUG_LOG("Member might be an object file...loading...\n");
    
    598 598
     #if defined(darwin_HOST_OS) || defined(ios_HOST_OS)
    
    599
    -#if defined(RTS_LINKER_USE_MMAP)
    
    599
    +#if RTS_LINKER_USE_MMAP
    
    600 600
                 image = mmapAnonForLinker(memberSize);
    
    601 601
     #else
    
    602 602
     #error "Only MMAP based loading supported on Apple platforms"
    
    603
    -#endif // defined(RTS_LINKER_USE_MMAP)
    
    603
    +#endif // RTS_LINKER_USE_MMAP
    
    604 604
     
    
    605 605
     #else // not darwin
    
    606 606
                 image = stgMallocBytes(memberSize, "loadArchive(image)");