More lzma updates - win32/pe + lzma seems to work.
This commit is contained in:
+505
-505
File diff suppressed because it is too large
Load Diff
+516
-516
File diff suppressed because it is too large
Load Diff
+520
-521
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+571
-572
File diff suppressed because it is too large
Load Diff
@@ -22,12 +22,14 @@ lzma_d_cs.ash : tc_list = i386-lzma i386-linux.elf i386 default
|
||||
tc.i386-lzma.gcc = $(tc.i386-linux.elf.gcc)
|
||||
tc.i386-lzma.gcc += -ffunction-sections
|
||||
tc.i386-lzma.gcc += -I$(UPX_LZMADIR)
|
||||
tc.i386-lzma.objdump = objdump
|
||||
|
||||
lzma_d_c%.ash : lzma_d_c.c
|
||||
$(call tc,gcc) $(PP_FLAGS) -c $< -o tmp/$T.o
|
||||
$(call tc,objstrip) tmp/$T.o
|
||||
$(call tc,objcopy) --only-section .text.LzmaDecode -O binary tmp/$T.o tmp/$T.bin
|
||||
head -c-1 tmp/$T.bin > tmp/$T.out
|
||||
$(call tc,objdump) -b binary -m i386 -D tmp/$T.out > tmp/$T.out.lst
|
||||
$(call tc,bin2h) --mode=nasm tmp/$T.out $@
|
||||
|
||||
lzma_d_cf.ash : PP_FLAGS = -DFAST
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
; init
|
||||
; __LZMA_DEC00__
|
||||
;
|
||||
|
||||
|
||||
mov ebp, esp ; save stack
|
||||
|
||||
lea ecx, [esp + 'UPXa']
|
||||
@@ -62,22 +62,20 @@
|
||||
cmp esp, ecx
|
||||
jnz .clearstack1
|
||||
|
||||
inc esi
|
||||
|
||||
; LzmaDecodeProperties()
|
||||
inc esi
|
||||
lea edx, [ecx + 8]
|
||||
mov dword [edx], 'UPXb' ; lc, lp, pb, dummy
|
||||
lea eax, [ecx + 16]
|
||||
mov dword [edx+4], eax ; Probs
|
||||
|
||||
push ecx ; outSizeProcessed *
|
||||
push 'UPXc' ; outSize
|
||||
push ecx ; &outSizeProcessed
|
||||
push 'UPXb' ; outSize
|
||||
push edi ; out
|
||||
lea eax, [ecx + 4]
|
||||
push eax ; inSizeProcessed *
|
||||
push 'UPXd' ; inSize
|
||||
add ecx, 4
|
||||
push ecx ; &inSizeProcessed
|
||||
push 'UPXc' ; inSize
|
||||
push esi ; in
|
||||
push edx ; CLzmaDecoderState *
|
||||
add ecx, 4
|
||||
push ecx ; &CLzmaDecoderState
|
||||
push eax ; dummy for call
|
||||
|
||||
mov dword [ecx], 'UPXd' ; lc, lp, pb, dummy
|
||||
|
||||
|
||||
; __LZMA_DEC10__
|
||||
@@ -92,19 +90,18 @@
|
||||
; __LZMA_DEC30__
|
||||
;
|
||||
|
||||
add esi, [esp + 12]
|
||||
add edi, [esp + 24]
|
||||
|
||||
mov esp, ebp ; restore stack
|
||||
add esi, [esp + 32 + 4]
|
||||
add edi, [esp + 32 + 0]
|
||||
xor eax, eax
|
||||
|
||||
lea ecx, [esp - 1024]
|
||||
mov esp, ebp ; restore stack
|
||||
.clearstack2:
|
||||
push eax
|
||||
cmp esp, ecx
|
||||
jnz .clearstack2
|
||||
mov esp, ebp ; restore stack
|
||||
|
||||
mov esp, ebp ; restore stack
|
||||
xor ecx, ecx
|
||||
|
||||
|
||||
|
||||
@@ -53,9 +53,10 @@ ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(CLzmaDecoderState) == 16)
|
||||
#undef LzmaDecode
|
||||
typedef struct {
|
||||
struct { unsigned char lc, lp, pb, dummy; } Properties;
|
||||
CProb *Probs;
|
||||
CProb Probs[];
|
||||
// CProb *Probs;
|
||||
} CLzmaDecoderState;
|
||||
ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(CLzmaDecoderState) == 8)
|
||||
ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(CLzmaDecoderState) == 4)
|
||||
#define CLzmaDecoderState const CLzmaDecoderState
|
||||
#include "C/7zip/Compress/LZMA_C/LzmaDecode.c"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
db 85, 87, 86, 83,131,236,124,139,148, 36,144, 0, 0, 0,199, 68 ; 0x0000
|
||||
db 36,116, 0, 0, 0, 0,198, 68, 36,115, 0,139,172, 36,156, 0 ; 0x0010
|
||||
db 0, 0,139, 66, 4,137, 68, 36,120,184, 1, 0, 0, 0, 15,182 ; 0x0020
|
||||
db 0, 0,141, 66, 4,137, 68, 36,120,184, 1, 0, 0, 0, 15,182 ; 0x0020
|
||||
db 74, 2,137,195,211,227,137,217, 73,137, 76, 36,108, 15,182, 74 ; 0x0030
|
||||
db 1,211,224, 72,137, 68, 36,104,139,132, 36,168, 0, 0, 0, 15 ; 0x0040
|
||||
db 182, 50,199, 69, 0, 0, 0, 0, 0,199, 68, 36, 96, 0, 0, 0 ; 0x0050
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
db 85, 87, 86, 83,131,236,124,139,148, 36,144, 0, 0, 0,199, 68 ; 0x0000
|
||||
db 36,116, 0, 0, 0, 0,198, 68, 36,115, 0,139,172, 36,156, 0 ; 0x0010
|
||||
db 0, 0,139, 66, 4,137, 68, 36,120,184, 1, 0, 0, 0, 15,182 ; 0x0020
|
||||
db 0, 0,141, 66, 4,137, 68, 36,120,184, 1, 0, 0, 0, 15,182 ; 0x0020
|
||||
db 74, 2,137,195,211,227,137,217, 73,137, 76, 36,108, 15,182, 74 ; 0x0030
|
||||
db 1,211,224, 72,137, 68, 36,104,139,132, 36,168, 0, 0, 0, 15 ; 0x0040
|
||||
db 182, 50,199, 69, 0, 0, 0, 0, 0,199, 68, 36, 96, 0, 0, 0 ; 0x0050
|
||||
|
||||
Reference in New Issue
Block a user