Ticket #7040: ghc7040.patch

File ghc7040.patch, 630 bytes (added by luite, 3 years ago)

this fixes it on my system (OS X 10.8 x86_64)

  • rts/Linker.c

    diff --git a/rts/Linker.c b/rts/Linker.c
    index 171fbac..7e139dd 100644
    a b ocGetNames_MachO(ObjectCode* oc) 
    57655765
    57665766        if((sections[i].flags & SECTION_TYPE) == S_ZEROFILL)
    57675767        {
     5768#ifdef USE_MMAP
     5769            char * zeroFillArea = mmapForLinker(sections[i].size, MAP_ANONYMOUS, -1);
     5770            memset(zeroFillArea, 0, sections[i].size);
     5771#else
    57685772            char * zeroFillArea = stgCallocBytes(1,sections[i].size,
    57695773                                      "ocGetNames_MachO(common symbols)");
     5774#endif
    57705775            sections[i].offset = zeroFillArea - image;
    57715776        }
    57725777