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
4 changed files:
Changes:
| ... | ... | @@ -1530,6 +1530,7 @@ HsInt verifyAndInitOc (ObjectCode* oc) |
| 1530 | 1530 | #endif
|
| 1531 | 1531 | if (!r) {
|
| 1532 | 1532 | IF_DEBUG(linker, ocDebugBelch(oc, "ocVerifyImage_* failed\n"));
|
| 1533 | + ocDebugBelch(oc, "ocVerifyImage_* failed\n");
|
|
| 1533 | 1534 | return r;
|
| 1534 | 1535 | }
|
| 1535 | 1536 | return 1;
|
| ... | ... | @@ -1565,6 +1566,7 @@ HsInt loadOc (ObjectCode* oc) |
| 1565 | 1566 | if (!r) {
|
| 1566 | 1567 | IF_DEBUG(linker,
|
| 1567 | 1568 | ocDebugBelch(oc, "ocAllocateExtras_MachO failed\n"));
|
| 1569 | + ocDebugBelch(oc, "ocAllocateExtras_MachO failed\n");
|
|
| 1568 | 1570 | return r;
|
| 1569 | 1571 | }
|
| 1570 | 1572 | # elif defined(OBJFORMAT_ELF)
|
| ... | ... | @@ -1589,6 +1591,7 @@ HsInt loadOc (ObjectCode* oc) |
| 1589 | 1591 | # endif
|
| 1590 | 1592 | if (!r) {
|
| 1591 | 1593 | IF_DEBUG(linker, ocDebugBelch(oc, "ocGetNames_* failed\n"));
|
| 1594 | + ocDebugBelch(oc, "ocGetNames_* failed\n");
|
|
| 1592 | 1595 | return r;
|
| 1593 | 1596 | }
|
| 1594 | 1597 |
| ... | ... | @@ -579,6 +579,7 @@ HsInt loadArchive_ (pathchar *path) |
| 579 | 579 | /* See loadObj() */
|
| 580 | 580 | if(!machoGetMisalignment(f, &misalignment)) {
|
| 581 | 581 | DEBUG_LOG("Failed to load member as mach-o file. Skipping.\n");
|
| 582 | + debugBelch("Failed to load member as mach-o file. Skipping.\n");
|
|
| 582 | 583 | continue;
|
| 583 | 584 | }
|
| 584 | 585 | image = stgMallocBytes(memberSize + misalignment,
|
| ... | ... | @@ -1764,6 +1764,7 @@ machoGetMisalignment( FILE * f, int* misalignment_out ) |
| 1764 | 1764 | return 0;
|
| 1765 | 1765 | }
|
| 1766 | 1766 | }
|
| 1767 | + //This seems wrong, but likely only matters for broken archives anyway.
|
|
| 1767 | 1768 | fseek(f, -sizeof(header), SEEK_CUR);
|
| 1768 | 1769 | |
| 1769 | 1770 | if(header.magic != MH_MAGIC_64) {
|
| ... | ... | @@ -475,7 +475,7 @@ static void addDLLHandle( |
| 475 | 475 | |
| 476 | 476 | static bool verifyCOFFHeader(
|
| 477 | 477 | uint16_t machine,
|
| 478 | - IMAGE_FILE_HEADER *hdr,
|
|
| 478 | + IMAGE_FILE_HEADER *hdr
|
|
| 479 | 479 | pathchar *fileName);
|
| 480 | 480 | |
| 481 | 481 | static bool checkIfDllLoaded(
|