Commit Graph

11 Commits

Author SHA1 Message Date
C. Masloch
99614259ae exeflat: jump across nop slide when the stub is shorter than 192 bytes 2022-05-30 17:37:26 -04:00
C. Masloch
7f38303ade exeflat: shrink uncompressed stub size to 64 bytes
The code still allows for up to 192 bytes, should that
be useful. Simply by re-assembling upxentry.asm then
re-running exeflat, the changes will be picked up.
2022-05-30 17:37:26 -04:00
C. Masloch
45b3d9ef67 exeflat: move reading entry file into main, pass code to write_header 2022-05-30 17:37:26 -04:00
C. Masloch
992a898076 kernel.asm, exeflat: new format with UPX entry at 006C0h
This format has several advantages:

* The CONFIG block need not be moved.

* The entire compressed image (depacker and payload) need
not be moved another time before the UPX depacker's own
operation.

* The CONFIG block always lives at 00602h, and the kernel
need not be aware whether it was compressed for detecting
which CONFIG block to use.

* Support for compressed images beyond 64 KiB for free.
(The assembly define TEST_FILL_INIT_TEXT can be passed in
NASMENV to test this support with 32 KiB of LFSR output.)

* A subsequent commit will shorten the stub to 64 bytes,
compared to the prior 32 + 45 = 77 bytes, with no loss
of features. (The packed payload is a bit shorter too.)

* The new stub also sets ds and es to the segment value
that would point to the DOS/EXE process's PSP. This is
apparently not used by the UPX depacker but could be in
a future or past version, or if another packer is used.
2022-05-30 17:37:26 -04:00
C. Masloch
3b6d8362b3 exeflat: store original ss:sp in UPX help data 2022-05-21 23:22:08 -04:00
C. Masloch
ad368a4420 exeflat: support signal byte (clc/stc) to indicate compression to kernel 2022-05-21 23:22:08 -04:00
C. Masloch
f51c8a5304 exeflat: copy original CONFIG block to the depacker header 2022-05-21 23:22:08 -04:00
Tee-Kiah Chia
2111b543c1 Fix minor issues in diagnostic messages in utils/exeflat.c 2018-04-07 22:22:12 +08:00
lpproj
7eca245bad Fix broken decompression on loading FAT16 kernel (compressed in dos/sys) 2015-04-13 00:03:25 +09:00
KJD
a260927440 Tell version info without booting kernel 2012-10-15 06:41:07 -04:00
KJD
c431157156 FreeDOS kernel current - 2041+svn1709 2012-10-14 20:08:06 -04:00