Whitespace changes.
committer: mfx <mfx> 984629032 +0000
This commit is contained in:
+45
-45
@@ -198,35 +198,35 @@ static int F(Filter *f)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (f_on) {
|
if (f_on) {
|
||||||
if (ic - lastnoncall < 5)
|
if (ic - lastnoncall < 5)
|
||||||
{
|
{
|
||||||
// check the last 4 bytes before this call
|
// check the last 4 bytes before this call
|
||||||
for (kc = 4; kc; kc--)
|
for (kc = 4; kc; kc--)
|
||||||
if (CONDF(which,b,ic-kc,lastcall) && b[ic-kc+1] == cto8)
|
if (CONDF(which,b,ic-kc,lastcall) && b[ic-kc+1] == cto8)
|
||||||
break;
|
break;
|
||||||
if (kc)
|
if (kc)
|
||||||
{
|
{
|
||||||
#ifdef U
|
#ifdef U
|
||||||
// restore original
|
// restore original
|
||||||
if (2==which) {
|
if (2==which) {
|
||||||
// Unswap prefix and opcode for 6-byte Jcc <disp32>
|
// Unswap prefix and opcode for 6-byte Jcc <disp32>
|
||||||
unsigned char const t =
|
unsigned char const t =
|
||||||
b[ic-1];
|
b[ic-1];
|
||||||
b[ic-1] = b[ic];
|
b[ic-1] = b[ic];
|
||||||
b[ic] = t;
|
b[ic] = t;
|
||||||
}
|
}
|
||||||
set_le32(b+ic+1,jc-ic-1);
|
set_le32(b+ic+1,jc-ic-1);
|
||||||
#endif
|
#endif
|
||||||
if (b[ic+1] == cto8)
|
if (b[ic+1] == cto8)
|
||||||
return 1; // fail - buffer not restored
|
return 1; // fail - buffer not restored
|
||||||
lastnoncall = ic;
|
lastnoncall = ic;
|
||||||
noncalls2++;
|
noncalls2++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
calls++;
|
calls++;
|
||||||
ic += 4;
|
ic += 4;
|
||||||
lastcall = ic+1;
|
lastcall = ic+1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -283,22 +283,22 @@ static int U(Filter *f)
|
|||||||
|| (1==which && MRUFLT==f_jmp1)
|
|| (1==which && MRUFLT==f_jmp1)
|
||||||
|| (2==which && MRUFLT==f_jcc2) ) {
|
|| (2==which && MRUFLT==f_jcc2) ) {
|
||||||
f_on = 1;
|
f_on = 1;
|
||||||
if (1&jc) { // 1st time at this destination
|
if (1&jc) { // 1st time at this destination
|
||||||
jc >>= 1;
|
jc >>= 1;
|
||||||
if (0 > --hand) {
|
if (0 > --hand) {
|
||||||
hand = N_MRU -1;
|
hand = N_MRU -1;
|
||||||
}
|
}
|
||||||
mru[hand] = jc;
|
mru[hand] = jc;
|
||||||
}
|
}
|
||||||
else { // not 1st time at this destination
|
else { // not 1st time at this destination
|
||||||
jc >>= 1;
|
jc >>= 1;
|
||||||
int kh = jc + hand;
|
int kh = jc + hand;
|
||||||
if (N_MRU <= kh) {
|
if (N_MRU <= kh) {
|
||||||
kh -= N_MRU;
|
kh -= N_MRU;
|
||||||
}
|
}
|
||||||
jc = mru[kh];
|
jc = mru[kh];
|
||||||
update_mru(jc, kh, mru, hand, tail);
|
update_mru(jc, kh, mru, hand, tail);
|
||||||
}
|
}
|
||||||
set_le32(b+ic+1,jc-ic-1);
|
set_le32(b+ic+1,jc-ic-1);
|
||||||
} else
|
} else
|
||||||
if ((0==which && NOFILT!=f_call)
|
if ((0==which && NOFILT!=f_call)
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ fold_begin: ; enter: %ebx= &Elf32_Ehdr of this program
|
|||||||
mov esi, [e_entry + ebx] ; beyond compressed data
|
mov esi, [e_entry + ebx] ; beyond compressed data
|
||||||
sub esi, eax ; length of compressed data
|
sub esi, eax ; length of compressed data
|
||||||
mov ebx, [ eax] ; length of uncompressed ELF headers
|
mov ebx, [ eax] ; length of uncompressed ELF headers
|
||||||
mov edx, esp ;
|
mov edx, esp ;
|
||||||
mov ecx, [4+ eax] ; length of compressed ELF headers
|
mov ecx, [4+ eax] ; length of compressed ELF headers
|
||||||
add ecx, byte szb_info
|
add ecx, byte szb_info
|
||||||
pusha ; (AT_next, sz_cpr, f_expand, &tmp_ehdr, {sz_unc, &tmp}, {sz_cpr, &b1st_info} )
|
pusha ; (AT_next, sz_cpr, f_expand, &tmp_ehdr, {sz_unc, &tmp}, {sz_cpr, &b1st_info} )
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ PHDRS
|
|||||||
{
|
{
|
||||||
text PT_LOAD FILEHDR PHDRS ;
|
text PT_LOAD FILEHDR PHDRS ;
|
||||||
data PT_LOAD ; /* for setting brk(0) */
|
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 */
|
/*null PT_NULL;*/ /* changed to PT_DYNAMIC for ldd */
|
||||||
}
|
}
|
||||||
SECTIONS
|
SECTIONS
|
||||||
|
|||||||
Reference in New Issue
Block a user