From: Ian Lynagh Date: Sat, 27 Nov 2010 19:09:07 +0000 (+0000) Subject: Improve linker debugging for archive files X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=9e210359085b4748ead9f4202fd869aaf934a542 Improve linker debugging for archive files --- diff --git a/rts/Linker.c b/rts/Linker.c index 6ce16d9..25644bd 100644 --- a/rts/Linker.c +++ b/rts/Linker.c @@ -1684,7 +1684,7 @@ loadArchive( char *path ) int isObject; char tmp[12]; - IF_DEBUG(linker, debugBelch("loadArchive `%s'\n", path)); + IF_DEBUG(linker, debugBelch("loadArchive: Loading archive `%s'\n", path)); fileSize = 32; file = stgMallocBytes(fileSize, "loadArchive(file)"); @@ -1751,6 +1751,8 @@ loadArchive( char *path ) fileNameSize = 16; } + IF_DEBUG(linker, debugBelch("loadArchive: Found member file `%s'\n", file)); + isObject = 0; for (n = 0; n < (int)fileNameSize - 1; n++) { if ((file[n] == '.') && (file[n + 1] == 'o')) { @@ -1762,6 +1764,8 @@ loadArchive( char *path ) if (isObject) { char *archiveMemberName; + IF_DEBUG(linker, debugBelch("loadArchive: Member is an object file...loading...\n")); + /* We can't mmap from the archive directly, as object files need to be 8-byte aligned but files in .ar archives are 2-byte aligned. When possible we use mmap