1
0
mirror of https://github.com/upx/upx synced 2025-09-28 19:06:07 +08:00

filter 0x49 for [b]vmlinuz; 2nd parameter for ckt32 (addvalue)

p_vmlinz.cpp stub/macros.ash
	stub/l_lx_elf86.asm
	stub/l_lx_exec86.asm
	stub/l_vmlinz.asm

committer: jreiser <jreiser> 1058406408 +0000
This commit is contained in:
John Reiser 2003-07-17 01:46:48 +00:00
parent 94152391b1
commit 03f1f615e5
5 changed files with 22 additions and 12 deletions

View File

@ -65,7 +65,7 @@ const int *PackVmlinuzI386::getCompressionMethods(int method, int level) const
const int *PackVmlinuzI386::getFilters() const
{
static const int filters[] = {
/*0x49,*/ /* 2003-07-16 bug in unfilter? */
0x49,
0x26, 0x24, 0x11, 0x14, 0x13, 0x16, 0x25, 0x15, 0x12,
-1 };
return filters;

View File

@ -116,7 +116,7 @@ decompress:
ret
ctojr32
ckt32 dl
ckt32 edi, dl
;__LEXEC017__
popa
ret

View File

@ -135,7 +135,7 @@ decompress:
;; jmpn lxunf0 ; logically belongs here
ctojr32
ckt32 dl
ckt32 edi, dl
;__LEXEC017__
popa
ret

View File

@ -120,7 +120,7 @@ checka20:
pop ecx ; MATCH05 len
pop edx ; MATCH04 cto
pop edi ; MATCH03 src
ckt32 dl
ckt32 0, dl
%endif; __LZDUMMY2__
%ifdef __LZCALLT9__
pop edi ; MATCH03 src

View File

@ -171,13 +171,18 @@ ctend:
;; call/jump/jcc trick; also used more than once (and/or optionally), so
;; ecx has byte count (not count of applied instances), and
;; edi points to buffer.
%macro ckt32 1 ; param: where is cto8 (dl, bl, or literal)
%macro ckt32 2
; 1st param: effective addvalue (typically 0 or edi; any rvalue)
; 2nd param: where is cto8 (dl, bl, or literal)
;__CKLLTR00__
mov esi, edi ; base of block
%ifnidn %1,0
mov esi, %1
%endif
jmps ckstart
ckloop3:
mov al, [edi]
inc edi
add edi, byte 1
;__CKLLTR10__ Jcc only
cmp al, 0x80 ; lo of 6-byte Jcc
jb ckloop2
@ -191,27 +196,32 @@ ckloop2:
cmp al, 0xE9 - 0xE8
ja ckcount
ckmark:
cmp byte [edi], %1 ; cto8
cmp byte [edi], %2 ; cto8
jnz ckcount
mov eax, [edi]
shr ax, 8
rol eax, 16
xchg al, ah
; above 3 instr are equivalent to the following 2 instr:
; mov al, 0 ; clear cto8 [setup partial-write stall]
; bswap eax ; not on 386: need 486 and up
sub eax, edi
%ifnidn %1,0
add eax, esi
%endif
mov [edi], eax
add edi, byte 4
ckstart:
sub ecx, byte 4
;__CKLLTR30__ Jcc only
mov al, [edi]
inc edi
add edi, byte 1
loop ckloop2 ; prefix cannot overlap previous displacement
;__CKLLTR40__
ckcount:
dec ecx
sub ecx, byte 1
jg ckloop3
ckend:
%endmacro
@ -497,7 +507,7 @@ lxunf1: ; allocate and clear mru[]
;__LXUNF030__
lxctloop:
movzx eax, word [edi] ; 2 bytes, zero extended
inc edi
add edi, byte 1
;__LXJCC000__
cmp al, 0x80 ; lo of Jcc <d32>
jb lxct1
@ -537,7 +547,7 @@ lxct3:
;__LXUNF034__
unfcount:
dec ecx
sub ecx, byte 1
jg lxctloop
;__LXMRU055__