Commit 9e210359 authored by Ian Lynagh's avatar Ian Lynagh

Improve linker debugging for archive files

parent 9142c238
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment