Commit Graph

22 Commits

Author SHA1 Message Date
Kenneth J Davis
0e6d90cf82
build fixes, declare variables at start of block, use size_t to avoid int vs long errors 2022-06-03 23:29:37 -04:00
C. Masloch
9343e00f9a exeflat: try to fix CI displaying upx output before exeflat output 2022-05-30 17:37:26 -04:00
C. Masloch
b5299924c2 exeflat: update comments before prepending entry header 2022-05-30 17:37:26 -04:00
C. Masloch
70c498a309 exeflat: update usage screen with -E, -D, and -U switches 2022-05-30 17:37:26 -04:00
C. Masloch
e3e58ee3fd upxentry, upxdevic: add header comments 2022-05-30 17:37:26 -04:00
C. Masloch
77d3c7e1d7 exeflat: document UPX 3.96 exact DOS/SYS limit but use a lower number 2022-05-30 17:37:26 -04:00
C. Masloch
f23f035554 exeflat: allow to force either DOS/EXE or DOS/SYS compression format 2022-05-30 17:37:26 -04:00
C. Masloch
10b4d1581f exeflat: implement new-style UPX compression in DOS/SYS format 2022-05-30 17:37:26 -04:00
C. Masloch
9382d7ce00 exeflat: pass argv[3] to use as start_seg in write_header 2022-05-30 17:37:26 -04:00
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
Bart Oldeman
e82de4b707 Introduce end-of-line normalization 2017-12-22 09:37:31 -05:00
Stas Sergeev
e698ae2b3b unix2dos bat files
ms-dos/pc-dos command.com does not understand unix line-endings.
2016-10-06 07:23:59 -04: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