mirror of
https://github.com/upx/upx.git
synced 2024-11-23 04:39:59 +00:00
Updated to match new setfold.sh.
committer: mfx <mfx> 962042492 +0000
This commit is contained in:
parent
aba09d07c9
commit
957ef351c4
@ -29,11 +29,15 @@ $fname = shift || die;
|
||||
sysopen (FH,$fname,2) || die;
|
||||
binmode FH;
|
||||
|
||||
$fsize = (stat($fname))[7];
|
||||
|
||||
$val = shift || die "$val";
|
||||
###print STDERR "$val\n";
|
||||
$val = oct($val); # acutally hex()
|
||||
###print STDERR "$val\n";
|
||||
die unless $val;
|
||||
$val = $val & 0xfff;
|
||||
printf STDERR "$fname: setting fold to 0x%x, file size 0x%x\n", $val, $fsize;
|
||||
die unless $val > 0;
|
||||
die unless $val < $fsize;
|
||||
$num = pack("V", $val);
|
||||
|
||||
# 0x34 = sizeof(Elf32_Ehdr)
|
||||
|
Loading…
Reference in New Issue
Block a user