Some non-ELF --lzma stubs assumed only one block, and <= 0.5MiB

Fixed for p_lx_exc.cpp; others remain a mystery.
https://github.com/upx/upx/issues/816
This commit is contained in:
John Reiser
2024-05-01 10:09:52 -07:00
committed by Markus F.X.J. Oberhumer
parent 8393ded1b3
commit 4562d5459d
45 changed files with 29040 additions and 29211 deletions
+6 -2
View File
@@ -599,8 +599,12 @@ void PackBvmlinuzI386::pack(OutputFile *fo)
properties = bswap32(properties);
linker->defineSymbol("lzma_properties", properties);
// -2 for properties
linker->defineSymbol("lzma_c_len", ph.c_len - 2);
linker->defineSymbol("lzma_u_len", ph.u_len);
if (linker->findSymbol("lzma_c_len", false)) {
linker->defineSymbol("lzma_c_len", ph.c_len - 2);
}
if (linker->findSymbol("lzma_u_len", false)) {
linker->defineSymbol("lzma_u_len", ph.u_len);
}
unsigned const stack = getDecompressorWrkmemSize();
linker->defineSymbol("lzma_stack_adjust", 0u - stack);
}