[Git][ghc/ghc][wip/andreask/linker_fix] Add debug messages to debug via CI
Andreas Klebinger pushed to branch wip/andreask/linker_fix at Glasgow Haskell Compiler / GHC Commits: 0f2cf29e by Andreas Klebinger at 2026-01-29T10:25:49+01:00 Add debug messages to debug via CI - - - - - 4 changed files: - rts/Linker.c - rts/linker/LoadArchive.c - rts/linker/MachO.c - rts/linker/PEi386.c Changes: ===================================== rts/Linker.c ===================================== @@ -1530,6 +1530,7 @@ HsInt verifyAndInitOc (ObjectCode* oc) #endif if (!r) { IF_DEBUG(linker, ocDebugBelch(oc, "ocVerifyImage_* failed\n")); + ocDebugBelch(oc, "ocVerifyImage_* failed\n"); return r; } return 1; @@ -1565,6 +1566,7 @@ HsInt loadOc (ObjectCode* oc) if (!r) { IF_DEBUG(linker, ocDebugBelch(oc, "ocAllocateExtras_MachO failed\n")); + ocDebugBelch(oc, "ocAllocateExtras_MachO failed\n"); return r; } # elif defined(OBJFORMAT_ELF) @@ -1589,6 +1591,7 @@ HsInt loadOc (ObjectCode* oc) # endif if (!r) { IF_DEBUG(linker, ocDebugBelch(oc, "ocGetNames_* failed\n")); + ocDebugBelch(oc, "ocGetNames_* failed\n"); return r; } ===================================== rts/linker/LoadArchive.c ===================================== @@ -579,6 +579,7 @@ HsInt loadArchive_ (pathchar *path) /* See loadObj() */ if(!machoGetMisalignment(f, &misalignment)) { DEBUG_LOG("Failed to load member as mach-o file. Skipping.\n"); + debugBelch("Failed to load member as mach-o file. Skipping.\n"); continue; } image = stgMallocBytes(memberSize + misalignment, ===================================== rts/linker/MachO.c ===================================== @@ -1764,6 +1764,7 @@ machoGetMisalignment( FILE * f, int* misalignment_out ) return 0; } } + //This seems wrong, but likely only matters for broken archives anyway. fseek(f, -sizeof(header), SEEK_CUR); if(header.magic != MH_MAGIC_64) { ===================================== rts/linker/PEi386.c ===================================== @@ -475,7 +475,7 @@ static void addDLLHandle( static bool verifyCOFFHeader( uint16_t machine, - IMAGE_FILE_HEADER *hdr, + IMAGE_FILE_HEADER *hdr pathchar *fileName); static bool checkIfDllLoaded( View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0f2cf29ea631ba0f9035902524654df1... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0f2cf29ea631ba0f9035902524654df1... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Andreas Klebinger (@AndreasK)