libtcc: reimplement option -Wl,[-no]-whöle-archive

- taking advantage of previous commit "incremental -Wl parsing"
This commit is contained in:
grischka
2016-10-01 20:54:45 +02:00
parent 2f1174550e
commit 0d9f88ea67
5 changed files with 119 additions and 113 deletions

View File

@ -1664,7 +1664,7 @@ ST_FUNC int pe_load_file(struct TCCState *s1, const char *filename, int fd)
ret = pe_load_def(s1, fd);
else if (pe_load_res(s1, fd) == 0)
ret = 0;
else if (read_mem(fd, 0, buf, sizeof buf) && 0 == strncmp(buf, "MZ", 2))
else if (read_mem(fd, 0, buf, 4) && 0 == memcmp(buf, "MZ\220", 4))
ret = pe_load_dll(s1, tcc_basename(filename), fd);
return ret;
}