projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9142c23
)
Improve linker debugging for archive files
author
Ian Lynagh
<igloo@earth.li>
Sat, 27 Nov 2010 19:09:07 +0000
(19:09 +0000)
committer
Ian Lynagh
<igloo@earth.li>
Sat, 27 Nov 2010 19:09:07 +0000
(19:09 +0000)
rts/Linker.c
patch
|
blob
|
history
diff --git
a/rts/Linker.c
b/rts/Linker.c
index
6ce16d9
..
25644bd
100644
(file)
--- a/
rts/Linker.c
+++ b/
rts/Linker.c
@@
-1684,7
+1684,7
@@
loadArchive( char *path )
int isObject;
char tmp[12];
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)");
fileSize = 32;
file = stgMallocBytes(fileSize, "loadArchive(file)");
@@
-1751,6
+1751,8
@@
loadArchive( char *path )
fileNameSize = 16;
}
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')) {
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 (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
/* 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