From 0e063b9759beebba2676fb06ce260f3e233cdd53 Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Thu, 15 Mar 2001 04:03:52 +0000 Subject: [PATCH] Whitespace changes. committer: mfx 984629032 +0000 --- src/filter/ctojr.h | 90 ++++++++++++++++++++--------------------- src/stub/fold_elf86.asm | 2 +- src/stub/l_lx_elf86.lds | 2 +- 3 files changed, 47 insertions(+), 47 deletions(-) diff --git a/src/filter/ctojr.h b/src/filter/ctojr.h index af03de3d..97e0922f 100644 --- a/src/filter/ctojr.h +++ b/src/filter/ctojr.h @@ -198,35 +198,35 @@ static int F(Filter *f) } #endif if (f_on) { - if (ic - lastnoncall < 5) - { - // check the last 4 bytes before this call - for (kc = 4; kc; kc--) - if (CONDF(which,b,ic-kc,lastcall) && b[ic-kc+1] == cto8) - break; - if (kc) - { - #ifdef U - // restore original - if (2==which) { - // Unswap prefix and opcode for 6-byte Jcc - unsigned char const t = - b[ic-1]; - b[ic-1] = b[ic]; - b[ic] = t; - } - set_le32(b+ic+1,jc-ic-1); - #endif - if (b[ic+1] == cto8) - return 1; // fail - buffer not restored - lastnoncall = ic; - noncalls2++; - continue; - } - } - calls++; - ic += 4; - lastcall = ic+1; + if (ic - lastnoncall < 5) + { + // check the last 4 bytes before this call + for (kc = 4; kc; kc--) + if (CONDF(which,b,ic-kc,lastcall) && b[ic-kc+1] == cto8) + break; + if (kc) + { + #ifdef U + // restore original + if (2==which) { + // Unswap prefix and opcode for 6-byte Jcc + unsigned char const t = + b[ic-1]; + b[ic-1] = b[ic]; + b[ic] = t; + } + set_le32(b+ic+1,jc-ic-1); + #endif + if (b[ic+1] == cto8) + return 1; // fail - buffer not restored + lastnoncall = ic; + noncalls2++; + continue; + } + } + calls++; + ic += 4; + lastcall = ic+1; } } else @@ -283,22 +283,22 @@ static int U(Filter *f) || (1==which && MRUFLT==f_jmp1) || (2==which && MRUFLT==f_jcc2) ) { f_on = 1; - if (1&jc) { // 1st time at this destination - jc >>= 1; - if (0 > --hand) { - hand = N_MRU -1; - } - mru[hand] = jc; - } - else { // not 1st time at this destination - jc >>= 1; - int kh = jc + hand; - if (N_MRU <= kh) { - kh -= N_MRU; - } - jc = mru[kh]; - update_mru(jc, kh, mru, hand, tail); - } + if (1&jc) { // 1st time at this destination + jc >>= 1; + if (0 > --hand) { + hand = N_MRU -1; + } + mru[hand] = jc; + } + else { // not 1st time at this destination + jc >>= 1; + int kh = jc + hand; + if (N_MRU <= kh) { + kh -= N_MRU; + } + jc = mru[kh]; + update_mru(jc, kh, mru, hand, tail); + } set_le32(b+ic+1,jc-ic-1); } else if ((0==which && NOFILT!=f_call) diff --git a/src/stub/fold_elf86.asm b/src/stub/fold_elf86.asm index 2d5f0802..e28d5d31 100644 --- a/src/stub/fold_elf86.asm +++ b/src/stub/fold_elf86.asm @@ -64,7 +64,7 @@ fold_begin: ; enter: %ebx= &Elf32_Ehdr of this program mov esi, [e_entry + ebx] ; beyond compressed data sub esi, eax ; length of compressed data mov ebx, [ eax] ; length of uncompressed ELF headers - mov edx, esp ; + mov edx, esp ; mov ecx, [4+ eax] ; length of compressed ELF headers add ecx, byte szb_info pusha ; (AT_next, sz_cpr, f_expand, &tmp_ehdr, {sz_unc, &tmp}, {sz_cpr, &b1st_info} ) diff --git a/src/stub/l_lx_elf86.lds b/src/stub/l_lx_elf86.lds index 6a3eb780..8f891b00 100644 --- a/src/stub/l_lx_elf86.lds +++ b/src/stub/l_lx_elf86.lds @@ -32,7 +32,7 @@ PHDRS { text PT_LOAD FILEHDR PHDRS ; data PT_LOAD ; /* for setting brk(0) */ - /* 3rd Phdr was not worth it; use "upx -d" first, then apply ldd */ + /* 3rd Phdr was not worth it; use "upx -d" first, then apply ldd */ /*null PT_NULL;*/ /* changed to PT_DYNAMIC for ldd */ } SECTIONS