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

We now use bin2h.pl to build stubify.h

committer: mfx <mfx> 968866969 +0000
This commit is contained in:
Markus F.X.J. Oberhumer 2000-09-13 17:42:49 +00:00
parent 9da2c2d087
commit de0f0c92be
5 changed files with 18 additions and 5 deletions

View File

@ -30,9 +30,8 @@
#include "packer.h"
#include "p_djgpp2.h"
static const unsigned char stubify_stub[] = {
static const
#include "stub/stubify.h"
};
static const
#include "stub/l_djgpp2.h"

View File

@ -22,6 +22,7 @@ l_t_n2d.h
l_t_n2ds.h
l_w32pe.h
l_wcle.h
stubify.exe
stubify.h
upxb
upxd

View File

@ -94,7 +94,7 @@ all: stubs upxb upxd
stubs: $(STUBS)
mostlyclean:
-rm -f *~ *.bin *.bkp *.i *.lst *.map
-rm -f *~ *.bin *.bkp *.i *.lst *.map stubify.exe
clean: mostlyclean
-rm -f *.o *.asx *.asy
@ -125,7 +125,8 @@ strings: all
stubify.h: stub.asm
djasm $< $@
djasm $< stubify.exe
$(BIN2H) stubify.exe stubify_stub $@ -q
l_com.h: l_com.asx
$(NASM) -f bin -o $T.bin $<

View File

@ -34,6 +34,9 @@ $ifile = shift || die;
$ident = shift || die;
$ofile = shift || die;
$opt_q = "";
$opt_q = shift if ($#ARGV >= 0);
open(INFILE,$ifile) || die "$ifile\n";
binmode(INFILE);
open(OUTFILE,">$ofile") || die "$ofile\n";
@ -50,6 +53,7 @@ select(OUTFILE);
$o = $ofile;
$o =~ s/.*[\/\\]//;
if ($opt_q ne "-q") {
print <<"EOF";
/* $o -- created from $ifile, $n bytes
@ -79,6 +83,7 @@ print <<"EOF";
EOF
}
printf("unsigned char %s[%d] = {", $ident, $n);
for ($i = 0; $i < $n; $i++) {
@ -89,6 +94,13 @@ for ($i = 0; $i < $n; $i++) {
printf("%3d", ord(substr($data, $i, 1)));
print "," if ($i != $n - 1);
}
while (($i % 16) != 0) {
$i++;
print " ";
}
printf(" /* 0x%4x */", $i - 16);
print "\n};\n";
close(OUTFILE) || die;

View File

@ -1,2 +1,2 @@
#define UPX_VERSION_STRING "1.09.3"
#define UPX_VERSION_DATE "Sep 10th 2000"
#define UPX_VERSION_DATE "Sep 13th 2000"