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

Commits:

2 changed files:

Changes:

  • rts/linker/LoadArchive.c
    ... ... @@ -574,6 +574,7 @@ HsInt loadArchive_ (pathchar *path)
    574 574
     #endif
    
    575 575
             )
    
    576 576
             {
    
    577
    +            ASSERT(!isGnuIndex);
    
    577 578
                 DEBUG_LOG("Member might be an object file...loading...\n");
    
    578 579
     #if defined(darwin_HOST_OS) || defined(ios_HOST_OS)
    
    579 580
                 if (RTS_LINKER_USE_MMAP)
    
    ... ... @@ -635,6 +636,7 @@ HsInt loadArchive_ (pathchar *path)
    635 636
                 if (0 == loadOc(oc)) {
    
    636 637
                     errorBelch("Failed to load OC %" PATH_FMT " , aborting.\n", path);
    
    637 638
                     stgFree(fileName);
    
    639
    +                freeObjectCode( oc );
    
    638 640
                     fclose(f);
    
    639 641
                     return 0;
    
    640 642
                 } else {
    

  • rts/linker/MachO.c
    ... ... @@ -1772,7 +1772,7 @@ machoGetMisalignment( FILE * f, int* misalignment_out )
    1772 1772
         fseek(f, -sizeof(header), SEEK_CUR);
    
    1773 1773
     
    
    1774 1774
         if(header.magic != MH_MAGIC_64) {
    
    1775
    -        debugBelch("Bad magic. Expected: %08x, got: %08x.",
    
    1775
    +        errorBelch("Bad magic. Expected: %08x, got: %08x.",
    
    1776 1776
                  MH_MAGIC_64, header.magic);
    
    1777 1777
             return 0;
    
    1778 1778
         }