Andreas Klebinger pushed to branch wip/andreask/linker_fix at Glasgow Haskell Compiler / GHC Commits: d49cb21a by Andreas Klebinger at 2026-01-29T13:38:53+01:00 more debug wibbles - - - - - 2 changed files: - rts/linker/LoadArchive.c - rts/linker/MachO.c Changes: ===================================== rts/linker/LoadArchive.c ===================================== @@ -574,6 +574,7 @@ HsInt loadArchive_ (pathchar *path) #endif ) { + ASSERT(!isGnuIndex); DEBUG_LOG("Member might be an object file...loading...\n"); #if defined(darwin_HOST_OS) || defined(ios_HOST_OS) if (RTS_LINKER_USE_MMAP) @@ -635,6 +636,7 @@ HsInt loadArchive_ (pathchar *path) if (0 == loadOc(oc)) { errorBelch("Failed to load OC %" PATH_FMT " , aborting.\n", path); stgFree(fileName); + freeObjectCode( oc ); fclose(f); return 0; } else { ===================================== rts/linker/MachO.c ===================================== @@ -1772,7 +1772,7 @@ machoGetMisalignment( FILE * f, int* misalignment_out ) fseek(f, -sizeof(header), SEEK_CUR); if(header.magic != MH_MAGIC_64) { - debugBelch("Bad magic. Expected: %08x, got: %08x.", + errorBelch("Bad magic. Expected: %08x, got: %08x.", MH_MAGIC_64, header.magic); return 0; } View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d49cb21aaebac390ddbcb686c9d801e7... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d49cb21aaebac390ddbcb686c9d801e7... You're receiving this email because of your account on gitlab.haskell.org.