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

Commits:

1 changed file:

Changes:

  • rts/linker/LoadArchive.c
    ... ... @@ -144,6 +144,12 @@ static enum ObjectFileFormat identifyObjectFile_(char* buf, size_t sz)
    144 144
         if (sz > 8 && ((uint64_t*)buf)[0] == 0x86640002ffff0000) {
    
    145 145
             return COFFAmd64;
    
    146 146
         }
    
    147
    +    if (sz > 8 && ((uint64_t*)buf)[0] == 0x014c0002ffff0000) {
    
    148
    +        return COFFI386;
    
    149
    +    }
    
    150
    +    if (sz > 8 && ((uint64_t*)buf)[0] == 0xaa640002ffff0000) {
    
    151
    +        return COFFAArch64;
    
    152
    +    }
    
    147 153
         return NotObject;
    
    148 154
     }
    
    149 155