Skip to content
Snippets Groups Projects
Commit 3fd12af1 authored by Moritz Angermann's avatar Moritz Angermann Committed by Ben Gamari
Browse files

Load .lo as well.

Some archives contain so called linker objects, with the affectionate
.lo suffic.  For example the musl libc.a will come in that form.  We
still want to load those objects, hence we should not discard them and
look for .lo as well.  Ultimately we might want to fix this proerly by
looking at the file magic.
parent c0e6dee9
No related merge requests found
......@@ -461,6 +461,7 @@ static HsInt loadArchive_ (pathchar *path)
/* TODO: Stop relying on file extensions to determine input formats.
Instead try to match file headers. See #13103. */
isObject = (thisFileNameSize >= 2 && strncmp(fileName + thisFileNameSize - 2, ".o" , 2) == 0)
|| (thisFileNameSize >= 3 && strncmp(fileName + thisFileNameSize - 3, ".lo" , 3) == 0)
|| (thisFileNameSize >= 4 && strncmp(fileName + thisFileNameSize - 4, ".p_o", 4) == 0)
|| (thisFileNameSize >= 4 && strncmp(fileName + thisFileNameSize - 4, ".obj", 4) == 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment