all: assorted updates and cleanups

This commit is contained in:
Markus F.X.J. Oberhumer
2023-02-05 17:20:32 +01:00
parent 163377d1a0
commit b8d9c2b755
56 changed files with 691 additions and 853 deletions
+1 -1
View File
@@ -92,7 +92,7 @@ PackLinuxI386sh::buildLoader(Filter const *ft)
optimizeFilter(&fold_ft, buf, sz_fold);
unsigned fold_hdrlen = sizeof(l_info) + sizeof(Elf32_Ehdr) +
sizeof(Elf32_Phdr) * get_te32(&((Elf32_Ehdr const *)(void *)buf)->e_phnum);
if (0 == get_le32(fold_hdrlen + buf)) {
if (0 == get_le32(buf + fold_hdrlen)) {
// inconsistent SIZEOF_HEADERS in *.lds (ld, binutils)
fold_hdrlen = umax(0x80, fold_hdrlen);
}