From 74a2d9486b33138da5c15b85645f812ac6893db1 Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Thu, 12 Sep 2002 14:39:17 +0000 Subject: [PATCH] Initial NRV2E support. Pretty much untested. committer: mfx 1031841557 +0000 --- src/filter/ct.h | 8 ++--- src/filter/cto.h | 8 ++--- src/filter/ctoj.h | 13 ++++--- src/filter/ctojr.h | 13 ++++--- src/filter/ctok.h | 13 ++++--- src/filter/ctsw.h | 8 ++--- src/filter/getcto.h | 8 ++--- src/filter/sub.hh | 8 ++--- src/filter/sub16.h | 8 ++--- src/filter/sub32.h | 8 ++--- src/filter/sub8.h | 8 ++--- src/filter/sw.h | 8 ++--- src/mem.cpp | 1 + src/p_djgpp2.cpp | 11 +----- src/p_elks.cpp | 6 +--- src/p_exe.cpp | 12 ++----- src/p_lx_exc.cpp | 11 +----- src/p_psx.cpp | 12 +------ src/p_tmt.cpp | 11 +----- src/p_tos.cpp | 15 ++------ src/p_vmlinz.cpp | 11 +----- src/p_w16ne.cpp | 12 ++----- src/p_w32pe.cpp | 12 ++----- src/p_wcle.cpp | 11 +----- src/packer.cpp | 69 ++++++++++++++++++++++++++++++++----- src/packer.h | 3 +- src/stub/fold_elf86.asm | 13 +++++-- src/stub/fold_exec86.asm | 13 +++++-- src/stub/fold_sh86.asm | 13 ++++--- src/stub/header.ash | 8 ++--- src/stub/l_com.asm | 8 ++--- src/stub/l_djgpp2.asm | 9 ++--- src/stub/l_lx_elf.c | 13 ++++--- src/stub/l_lx_elf86.asm | 13 ++++--- src/stub/l_lx_elf86.lds | 9 +++-- src/stub/l_lx_exec86.asm | 13 ++++--- src/stub/l_lx_exec86.lds | 9 +++-- src/stub/l_lx_sep.c | 13 ++++--- src/stub/l_lx_sep86.asm | 13 ++++--- src/stub/l_lx_sep86.lds | 9 +++-- src/stub/l_lx_sh.c | 13 ++++--- src/stub/l_lx_sh86.asm | 13 ++++--- src/stub/l_lx_sh86.lds | 9 +++-- src/stub/l_psx.asm | 8 ++--- src/stub/l_sys.asm | 8 ++--- src/stub/l_tmt.asm | 9 ++--- src/stub/l_vmlinz.asm | 8 ++--- src/stub/l_w32pe.asm | 9 ++--- src/stub/l_wcle.asm | 9 ++--- src/stub/linux.hh | 1 + src/stub/macros.ash | 8 ++--- src/stub/scripts/asl_68k.sh | 50 --------------------------- src/stub/scripts/setfold.pl | 9 +++-- src/version.h | 2 +- 54 files changed, 298 insertions(+), 322 deletions(-) delete mode 100644 src/stub/scripts/asl_68k.sh diff --git a/src/filter/ct.h b/src/filter/ct.h index 5cf9adbf..33c98add 100644 --- a/src/filter/ct.h +++ b/src/filter/ct.h @@ -2,8 +2,8 @@ This file is part of the UPX executable compressor. - Copyright (C) 1996-2001 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1996-2001 Laszlo Molnar + Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2002 Laszlo Molnar All Rights Reserved. UPX and the UCL library are free software; you can redistribute them @@ -21,8 +21,8 @@ If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Markus F.X.J. Oberhumer Laszlo Molnar - markus@oberhumer.com ml1050@cdata.tvnet.hu + Markus F.X.J. Oberhumer Laszlo Molnar + */ diff --git a/src/filter/cto.h b/src/filter/cto.h index 8ff610f4..2a7e034b 100644 --- a/src/filter/cto.h +++ b/src/filter/cto.h @@ -2,8 +2,8 @@ This file is part of the UPX executable compressor. - Copyright (C) 1996-2001 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1996-2001 Laszlo Molnar + Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2002 Laszlo Molnar All Rights Reserved. UPX and the UCL library are free software; you can redistribute them @@ -21,8 +21,8 @@ If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Markus F.X.J. Oberhumer Laszlo Molnar - markus@oberhumer.com ml1050@cdata.tvnet.hu + Markus F.X.J. Oberhumer Laszlo Molnar + */ diff --git a/src/filter/ctoj.h b/src/filter/ctoj.h index 5313a29c..83f5b13a 100644 --- a/src/filter/ctoj.h +++ b/src/filter/ctoj.h @@ -2,9 +2,9 @@ This file is part of the UPX executable compressor. - Copyright (C) 1996-2001 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1996-2001 Laszlo Molnar - Copyright (C) 2000-2001 John F. Reiser + Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2002 Laszlo Molnar + Copyright (C) 2000-2002 John F. Reiser All Rights Reserved. UPX and the UCL library are free software; you can redistribute them @@ -22,8 +22,11 @@ If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Markus F.X.J. Oberhumer Laszlo Molnar John F. Reiser - markus@oberhumer.com ml1050@cdata.tvnet.hu jreiser@BitWagon.com + Markus F.X.J. Oberhumer Laszlo Molnar + + + John F. Reiser + */ diff --git a/src/filter/ctojr.h b/src/filter/ctojr.h index 97e0922f..9152e93f 100644 --- a/src/filter/ctojr.h +++ b/src/filter/ctojr.h @@ -2,9 +2,9 @@ This file is part of the UPX executable compressor. - Copyright (C) 1996-2001 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1996-2001 Laszlo Molnar - Copyright (C) 2000-2001 John F. Reiser + Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2002 Laszlo Molnar + Copyright (C) 2000-2002 John F. Reiser All Rights Reserved. UPX and the UCL library are free software; you can redistribute them @@ -22,8 +22,11 @@ If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Markus F.X.J. Oberhumer Laszlo Molnar John F. Reiser - markus@oberhumer.com ml1050@cdata.tvnet.hu jreiser@BitWagon.com + Markus F.X.J. Oberhumer Laszlo Molnar + + + John F. Reiser + */ diff --git a/src/filter/ctok.h b/src/filter/ctok.h index b82403ba..6cc4b432 100644 --- a/src/filter/ctok.h +++ b/src/filter/ctok.h @@ -2,9 +2,9 @@ This file is part of the UPX executable compressor. - Copyright (C) 1996-2001 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1996-2001 Laszlo Molnar - Copyright (C) 2000-2001 John F. Reiser + Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2002 Laszlo Molnar + Copyright (C) 2000-2002 John F. Reiser All Rights Reserved. UPX and the UCL library are free software; you can redistribute them @@ -22,8 +22,11 @@ If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Markus F.X.J. Oberhumer Laszlo Molnar John F. Reiser - markus@oberhumer.com ml1050@cdata.tvnet.hu jreiser@BitWagon.com + Markus F.X.J. Oberhumer Laszlo Molnar + + + John F. Reiser + */ diff --git a/src/filter/ctsw.h b/src/filter/ctsw.h index ba742834..8ad1184d 100644 --- a/src/filter/ctsw.h +++ b/src/filter/ctsw.h @@ -2,8 +2,8 @@ This file is part of the UPX executable compressor. - Copyright (C) 1996-2001 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1996-2001 Laszlo Molnar + Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2002 Laszlo Molnar All Rights Reserved. UPX and the UCL library are free software; you can redistribute them @@ -21,8 +21,8 @@ If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Markus F.X.J. Oberhumer Laszlo Molnar - markus@oberhumer.com ml1050@cdata.tvnet.hu + Markus F.X.J. Oberhumer Laszlo Molnar + */ diff --git a/src/filter/getcto.h b/src/filter/getcto.h index 4a96e9f8..e71edf35 100644 --- a/src/filter/getcto.h +++ b/src/filter/getcto.h @@ -2,8 +2,8 @@ This file is part of the UPX executable compressor. - Copyright (C) 1996-2001 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1996-2001 Laszlo Molnar + Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2002 Laszlo Molnar All Rights Reserved. UPX and the UCL library are free software; you can redistribute them @@ -21,8 +21,8 @@ If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Markus F.X.J. Oberhumer Laszlo Molnar - markus@oberhumer.com ml1050@cdata.tvnet.hu + Markus F.X.J. Oberhumer Laszlo Molnar + */ diff --git a/src/filter/sub.hh b/src/filter/sub.hh index e188bf5a..6cba3bd1 100644 --- a/src/filter/sub.hh +++ b/src/filter/sub.hh @@ -2,8 +2,8 @@ This file is part of the UPX executable compressor. - Copyright (C) 1996-2001 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1996-2001 Laszlo Molnar + Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2002 Laszlo Molnar All Rights Reserved. UPX and the UCL library are free software; you can redistribute them @@ -21,8 +21,8 @@ If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Markus F.X.J. Oberhumer Laszlo Molnar - markus@oberhumer.com ml1050@cdata.tvnet.hu + Markus F.X.J. Oberhumer Laszlo Molnar + */ diff --git a/src/filter/sub16.h b/src/filter/sub16.h index 9add845a..be8a14b7 100644 --- a/src/filter/sub16.h +++ b/src/filter/sub16.h @@ -2,8 +2,8 @@ This file is part of the UPX executable compressor. - Copyright (C) 1996-2001 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1996-2001 Laszlo Molnar + Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2002 Laszlo Molnar All Rights Reserved. UPX and the UCL library are free software; you can redistribute them @@ -21,8 +21,8 @@ If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Markus F.X.J. Oberhumer Laszlo Molnar - markus@oberhumer.com ml1050@cdata.tvnet.hu + Markus F.X.J. Oberhumer Laszlo Molnar + */ diff --git a/src/filter/sub32.h b/src/filter/sub32.h index 7cdd19ef..6efd4235 100644 --- a/src/filter/sub32.h +++ b/src/filter/sub32.h @@ -2,8 +2,8 @@ This file is part of the UPX executable compressor. - Copyright (C) 1996-2001 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1996-2001 Laszlo Molnar + Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2002 Laszlo Molnar All Rights Reserved. UPX and the UCL library are free software; you can redistribute them @@ -21,8 +21,8 @@ If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Markus F.X.J. Oberhumer Laszlo Molnar - markus@oberhumer.com ml1050@cdata.tvnet.hu + Markus F.X.J. Oberhumer Laszlo Molnar + */ diff --git a/src/filter/sub8.h b/src/filter/sub8.h index c97ffbf3..a306c045 100644 --- a/src/filter/sub8.h +++ b/src/filter/sub8.h @@ -2,8 +2,8 @@ This file is part of the UPX executable compressor. - Copyright (C) 1996-2001 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1996-2001 Laszlo Molnar + Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2002 Laszlo Molnar All Rights Reserved. UPX and the UCL library are free software; you can redistribute them @@ -21,8 +21,8 @@ If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Markus F.X.J. Oberhumer Laszlo Molnar - markus@oberhumer.com ml1050@cdata.tvnet.hu + Markus F.X.J. Oberhumer Laszlo Molnar + */ diff --git a/src/filter/sw.h b/src/filter/sw.h index a15ce44f..8fa72249 100644 --- a/src/filter/sw.h +++ b/src/filter/sw.h @@ -2,8 +2,8 @@ This file is part of the UPX executable compressor. - Copyright (C) 1996-2001 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1996-2001 Laszlo Molnar + Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2002 Laszlo Molnar All Rights Reserved. UPX and the UCL library are free software; you can redistribute them @@ -21,8 +21,8 @@ If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Markus F.X.J. Oberhumer Laszlo Molnar - markus@oberhumer.com ml1050@cdata.tvnet.hu + Markus F.X.J. Oberhumer Laszlo Molnar + */ diff --git a/src/mem.cpp b/src/mem.cpp index 4de8ee22..d0351eae 100644 --- a/src/mem.cpp +++ b/src/mem.cpp @@ -79,6 +79,7 @@ void MemBuffer::alloc(unsigned size, unsigned base_offset) alloc_ptr = (unsigned char *) malloc(size); if (!alloc_ptr) { + //throw bad_alloc(); throwCantPack("out of memory"); //exit(1); } diff --git a/src/p_djgpp2.cpp b/src/p_djgpp2.cpp index d81f5bfd..a03daa85 100644 --- a/src/p_djgpp2.cpp +++ b/src/p_djgpp2.cpp @@ -58,16 +58,7 @@ PackDjgpp2::PackDjgpp2(InputFile *f) : const int *PackDjgpp2::getCompressionMethods(int method, int level) const { - static const int m_nrv2b[] = { M_NRV2B_LE32, M_NRV2D_LE32, -1 }; - static const int m_nrv2d[] = { M_NRV2D_LE32, M_NRV2B_LE32, -1 }; - - if (M_IS_NRV2B(method)) - return m_nrv2b; - if (M_IS_NRV2D(method)) - return m_nrv2d; - if (level == 1 || file_size <= 512*1024) - return m_nrv2b; - return m_nrv2d; + return Packer::getDefaultCompressionMethods_LE32(method, level); } diff --git a/src/p_elks.cpp b/src/p_elks.cpp index 79285bef..0607ae80 100644 --- a/src/p_elks.cpp +++ b/src/p_elks.cpp @@ -51,11 +51,7 @@ static const unsigned zimage_offset = 0x1000; const int *PackElks8086::getCompressionMethods(int method, int level) const { - if (M_IS_NRV2B(method)) - return M_NRV2B_8; - if (M_IS_NRV2D(method)) - return M_NRV2D_8; - return level > 1 ? M_NRV2D_8 : M_NRV2B_8; + return Packer::getDefaultCompressionMethods_8(method, level); } diff --git a/src/p_exe.cpp b/src/p_exe.cpp index 90b6ab13..1fe7df7d 100644 --- a/src/p_exe.cpp +++ b/src/p_exe.cpp @@ -56,16 +56,8 @@ PackExe::PackExe(InputFile *f) : const int *PackExe::getCompressionMethods(int method, int level) const { - static const int m_nrv2b[] = { M_NRV2B_8, M_NRV2D_8, -1 }; - static const int m_nrv2d[] = { M_NRV2D_8, M_NRV2B_8, -1 }; - - if (M_IS_NRV2B(method)) - return m_nrv2b; - if (M_IS_NRV2D(method)) - return m_nrv2d; - if (level == 1 || ih_imagesize <= 256*1024) - return m_nrv2b; - return m_nrv2d; + bool small = ih_imagesize <= 256*1024; + return Packer::getDefaultCompressionMethods_8(method, level, small); } diff --git a/src/p_lx_exc.cpp b/src/p_lx_exc.cpp index 599ca8c6..8a7a1cf5 100644 --- a/src/p_lx_exc.cpp +++ b/src/p_lx_exc.cpp @@ -57,16 +57,7 @@ static const const int *PackLinuxI386::getCompressionMethods(int method, int level) const { - static const int m_nrv2b[] = { M_NRV2B_LE32, M_NRV2D_LE32, -1 }; - static const int m_nrv2d[] = { M_NRV2D_LE32, M_NRV2B_LE32, -1 }; - - if (M_IS_NRV2B(method)) - return m_nrv2b; - if (M_IS_NRV2D(method)) - return m_nrv2d; - if (level == 1 || file_size <= 512*1024) - return m_nrv2b; - return m_nrv2d; + return Packer::getDefaultCompressionMethods_LE32(method, level); } const int *PackLinuxI386::getFilters() const diff --git a/src/p_psx.cpp b/src/p_psx.cpp index baa176a0..f185598b 100644 --- a/src/p_psx.cpp +++ b/src/p_psx.cpp @@ -62,17 +62,7 @@ PackPsx::PackPsx(InputFile *f) : const int *PackPsx::getCompressionMethods(int method, int level) const { - static const int m_nrv2b[] = { M_NRV2B_LE32, M_NRV2D_LE32, -1 }; - static const int m_nrv2d[] = { M_NRV2D_LE32, M_NRV2B_LE32, -1 }; - - if (M_IS_NRV2B(method)) - return m_nrv2b; - if (M_IS_NRV2D(method)) - return m_nrv2d; - if (level == 1 || file_size-PS_HDR_SIZE < 512*1024) - return m_nrv2b; - return m_nrv2d; - + return Packer::getDefaultCompressionMethods_LE32(method, level); } const int *PackPsx::getFilters() const diff --git a/src/p_tmt.cpp b/src/p_tmt.cpp index 062c46cf..0986187c 100644 --- a/src/p_tmt.cpp +++ b/src/p_tmt.cpp @@ -50,16 +50,7 @@ PackTmt::PackTmt(InputFile *f) : super(f) const int *PackTmt::getCompressionMethods(int method, int level) const { - static const int m_nrv2b[] = { M_NRV2B_LE32, M_NRV2D_LE32, -1 }; - static const int m_nrv2d[] = { M_NRV2D_LE32, M_NRV2B_LE32, -1 }; - - if (M_IS_NRV2B(method)) - return m_nrv2b; - if (M_IS_NRV2D(method)) - return m_nrv2d; - if (level == 1 || file_size <= 512*1024) - return m_nrv2b; - return m_nrv2d; + return Packer::getDefaultCompressionMethods_LE32(method, level); } diff --git a/src/p_tos.cpp b/src/p_tos.cpp index 680a2794..16a65b82 100644 --- a/src/p_tos.cpp +++ b/src/p_tos.cpp @@ -64,19 +64,8 @@ PackTos::PackTos(InputFile *f) : const int *PackTos::getCompressionMethods(int method, int level) const { - static const int m_nrv2b[] = { M_NRV2B_8, M_NRV2D_8, -1 }; - static const int m_nrv2d[] = { M_NRV2D_8, M_NRV2B_8, -1 }; - static const int m_nrv2e[] = { M_NRV2E_8, M_NRV2B_8, -1 }; - - if (M_IS_NRV2B(method)) - return m_nrv2b; - if (M_IS_NRV2D(method)) - return m_nrv2d; - if (M_IS_NRV2E(opt->method)) - return m_nrv2e; - if (level == 1 || ih.fh_text + ih.fh_data <= 256*1024) - return m_nrv2b; - return m_nrv2d; + bool small = ih.fh_text + ih.fh_data <= 256*1024; + return Packer::getDefaultCompressionMethods_8(method, level, small); } diff --git a/src/p_vmlinz.cpp b/src/p_vmlinz.cpp index 6190bae9..871ca882 100644 --- a/src/p_vmlinz.cpp +++ b/src/p_vmlinz.cpp @@ -58,16 +58,7 @@ PackVmlinuzI386::PackVmlinuzI386(InputFile *f) : const int *PackVmlinuzI386::getCompressionMethods(int method, int level) const { - static const int m_nrv2b[] = { M_NRV2B_LE32, M_NRV2D_LE32, -1 }; - static const int m_nrv2d[] = { M_NRV2D_LE32, M_NRV2B_LE32, -1 }; - - if (M_IS_NRV2B(method)) - return m_nrv2b; - if (M_IS_NRV2D(method)) - return m_nrv2d; - if (level == 1) - return m_nrv2b; - return m_nrv2d; + return Packer::getDefaultCompressionMethods_LE32(method, level); } diff --git a/src/p_w16ne.cpp b/src/p_w16ne.cpp index 62a188ca..0a71f33b 100644 --- a/src/p_w16ne.cpp +++ b/src/p_w16ne.cpp @@ -45,16 +45,8 @@ PackW16Ne::PackW16Ne(InputFile *f) : const int *PackW16Ne::getCompressionMethods(int method, int level) const { - static const int m_nrv2b[] = { M_NRV2B_8, M_NRV2D_8, -1 }; - static const int m_nrv2d[] = { M_NRV2D_8, M_NRV2B_8, -1 }; - - if (M_IS_NRV2B(method)) - return m_nrv2b; - if (M_IS_NRV2D(method)) - return m_nrv2d; - if (level == 1) - return m_nrv2b; - return m_nrv2d; + bool small = false; + return Packer::getDefaultCompressionMethods_8(method, level, small); } diff --git a/src/p_w32pe.cpp b/src/p_w32pe.cpp index 7e0020a5..baebcc6b 100644 --- a/src/p_w32pe.cpp +++ b/src/p_w32pe.cpp @@ -123,16 +123,8 @@ PackW32Pe::~PackW32Pe() const int *PackW32Pe::getCompressionMethods(int method, int level) const { - static const int m_nrv2b[] = { M_NRV2B_LE32, M_NRV2D_LE32, -1 }; - static const int m_nrv2d[] = { M_NRV2D_LE32, M_NRV2B_LE32, -1 }; - - if (M_IS_NRV2B(method)) - return m_nrv2b; - if (M_IS_NRV2D(method)) - return m_nrv2d; - if (level == 1 || ih.codesize + ih.datasize <= 256*1024) - return m_nrv2b; - return m_nrv2d; + bool small = ih.codesize + ih.datasize <= 256*1024; + return Packer::getDefaultCompressionMethods_LE32(method, level, small); } diff --git a/src/p_wcle.cpp b/src/p_wcle.cpp index e3336f40..4e94b2e9 100644 --- a/src/p_wcle.cpp +++ b/src/p_wcle.cpp @@ -68,16 +68,7 @@ static const const int *PackWcle::getCompressionMethods(int method, int level) const { - static const int m_nrv2b[] = { M_NRV2B_LE32, M_NRV2D_LE32, -1 }; - static const int m_nrv2d[] = { M_NRV2D_LE32, M_NRV2B_LE32, -1 }; - - if (M_IS_NRV2B(method)) - return m_nrv2b; - if (M_IS_NRV2D(method)) - return m_nrv2d; - if (level == 1 || file_size <= 512*1024) - return m_nrv2b; - return m_nrv2d; + return Packer::getDefaultCompressionMethods_LE32(method, level); } diff --git a/src/packer.cpp b/src/packer.cpp index 8cbc4b65..8635994c 100644 --- a/src/packer.cpp +++ b/src/packer.cpp @@ -671,12 +671,6 @@ void Packer::checkAlreadyPacked(void *b, int blen) } -bool Packer::isValidCompressionMethod(int method) -{ - return (method >= M_NRV2B_LE32 && method <= M_NRV2D_LE16); -} - - /************************************************************************* // patch util for loader **************************************************************************/ @@ -917,6 +911,56 @@ unsigned Packer::unoptimizeReloc32(upx_byte **in, upx_byte *image, } +/************************************************************************* +// compression method util [static] +**************************************************************************/ + +bool Packer::isValidCompressionMethod(int method) +{ + return (method >= M_NRV2B_LE32 && method <= M_NRV2D_LE16); +} + + +const int *Packer::getDefaultCompressionMethods_8(int method, int level, int small) const +{ + static const int m_nrv2b[] = { M_NRV2B_8, M_NRV2D_8, M_NRV2E_8, -1 }; + static const int m_nrv2d[] = { M_NRV2D_8, M_NRV2B_8, M_NRV2E_8, -1 }; + static const int m_nrv2e[] = { M_NRV2E_8, M_NRV2B_8, M_NRV2D_8, -1 }; + + if (small < 0) + small = file_size <= 512*1024; + if (M_IS_NRV2B(method)) + return m_nrv2b; + if (M_IS_NRV2D(method)) + return m_nrv2d; + if (M_IS_NRV2E(method)) + return m_nrv2e; + if (level == 1 || small) + return m_nrv2b; + return m_nrv2d; +} + + +const int *Packer::getDefaultCompressionMethods_LE32(int method, int level, int small) const +{ + static const int m_nrv2b[] = { M_NRV2B_LE32, M_NRV2D_LE32, M_NRV2E_LE32, -1 }; + static const int m_nrv2d[] = { M_NRV2D_LE32, M_NRV2B_LE32, M_NRV2E_LE32, -1 }; + static const int m_nrv2e[] = { M_NRV2E_LE32, M_NRV2B_LE32, M_NRV2D_LE32, -1 }; + + if (small < 0) + small = file_size <= 512*1024; + if (M_IS_NRV2B(method)) + return m_nrv2b; + if (M_IS_NRV2D(method)) + return m_nrv2d; + if (M_IS_NRV2E(method)) + return m_nrv2e; + if (level == 1 || small) + return m_nrv2b; + return m_nrv2d; +} + + /************************************************************************* // loader util **************************************************************************/ @@ -1034,26 +1078,33 @@ const char *Packer::getDecompressor() const "N2BSMA10""N2BDEC10""N2BSMA20""N2BDEC20""N2BSMA30" "N2BDEC30""N2BSMA40""N2BSMA50""N2BDEC50""N2BSMA60" "N2BDEC60"; - static const char nrv2b_le32_fast[] = "N2BFAS10""+80CXXXX""N2BFAS11""N2BDEC10""N2BFAS20" "N2BDEC20""N2BFAS30""N2BDEC30""N2BFAS40""N2BFAS50" "N2BDEC50""N2BFAS60""+40CXXXX""N2BFAS61""N2BDEC60"; - static const char nrv2d_le32_small[] = "N2DSMA10""N2DDEC10""N2DSMA20""N2DDEC20""N2DSMA30" "N2DDEC30""N2DSMA40""N2DSMA50""N2DDEC50""N2DSMA60" "N2DDEC60"; - static const char nrv2d_le32_fast[] = "N2DFAS10""+80CXXXX""N2DFAS11""N2DDEC10""N2DFAS20" "N2DDEC20""N2DFAS30""N2DDEC30""N2DFAS40""N2DFAS50" "N2DDEC50""N2DFAS60""+40CXXXX""N2DFAS61""N2DDEC60"; + static const char nrv2e_le32_small[] = + "N2ESMA10""N2EDEC10""N2ESMA20""N2EDEC20""N2ESMA30" + "N2EDEC30""N2ESMA40""N2ESMA50""N2EDEC50""N2ESMA60" + "N2EDEC60"; + static const char nrv2e_le32_fast[] = + "N2EFAS10""+80CXXXX""N2EFAS11""N2EDEC10""N2EFAS20" + "N2EDEC20""N2EFAS30""N2EDEC30""N2EFAS40""N2EFAS50" + "N2EDEC50""N2EFAS60""+40CXXXX""N2EFAS61""N2EDEC60"; if (ph.method == M_NRV2B_LE32) return opt->small ? nrv2b_le32_small : nrv2b_le32_fast; if (ph.method == M_NRV2D_LE32) return opt->small ? nrv2d_le32_small : nrv2d_le32_fast; + if (ph.method == M_NRV2E_LE32) + return opt->small ? nrv2e_le32_small : nrv2e_le32_fast; throwInternalError("bad decompressor"); return NULL; } diff --git a/src/packer.h b/src/packer.h index 2f883dcd..b255c7b1 100644 --- a/src/packer.h +++ b/src/packer.h @@ -240,10 +240,11 @@ protected: virtual unsigned unoptimizeReloc32(upx_byte **in,upx_byte *image,MemBuffer *out,int bs); // compression method util + const int *getDefaultCompressionMethods_8(int method, int level, int small=-1) const; + const int *getDefaultCompressionMethods_LE32(int method, int level, int small=-1) const; public: static bool isValidCompressionMethod(int method); - protected: InputFile *fi; off_t file_size; // will get set by constructor diff --git a/src/stub/fold_elf86.asm b/src/stub/fold_elf86.asm index 3d0d7d76..00cf38a9 100644 --- a/src/stub/fold_elf86.asm +++ b/src/stub/fold_elf86.asm @@ -2,7 +2,7 @@ ; ; This file is part of the UPX executable compressor. ; -; Copyright (C) 2000-2001 John F. Reiser +; Copyright (C) 2000-2002 John F. Reiser ; All Rights Reserved. ; ; UPX and the UCL library are free software; you can redistribute them @@ -20,9 +20,16 @@ ; If not, write to the Free Software Foundation, Inc., ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ; -; Markus F.X.J. Oberhumer Laszlo Molnar John F. Reiser -; markus@oberhumer.com ml1050@cdata.tvnet.hu jreiser@BitWagon.com +; Markus F.X.J. Oberhumer Laszlo Molnar +; ; +; John F. Reiser +; +; + + + BITS 32 + SECTION .text %define PAGE_SIZE ( 1<<12) %define szElf32_Ehdr 0x34 diff --git a/src/stub/fold_exec86.asm b/src/stub/fold_exec86.asm index 0f0610c2..fdd7795a 100644 --- a/src/stub/fold_exec86.asm +++ b/src/stub/fold_exec86.asm @@ -2,7 +2,7 @@ ; ; This file is part of the UPX executable compressor. ; -; Copyright (C) 2000-2001 John F. Reiser +; Copyright (C) 2000-2002 John F. Reiser ; All Rights Reserved. ; ; UPX and the UCL library are free software; you can redistribute them @@ -20,9 +20,16 @@ ; If not, write to the Free Software Foundation, Inc., ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ; -; Markus F.X.J. Oberhumer Laszlo Molnar John F. Reiser -; markus@oberhumer.com ml1050@cdata.tvnet.hu jreiser@BitWagon.com +; Markus F.X.J. Oberhumer Laszlo Molnar +; ; +; John F. Reiser +; +; + + + BITS 32 + SECTION .text ;; control just falls through, after this part and compiled C code ;; are uncompressed. diff --git a/src/stub/fold_sh86.asm b/src/stub/fold_sh86.asm index 0824d9e5..ba9b3ad0 100644 --- a/src/stub/fold_sh86.asm +++ b/src/stub/fold_sh86.asm @@ -2,9 +2,9 @@ ; ; This file is part of the UPX executable compressor. ; -; Copyright (C) 1996-2001 Markus Franz Xaver Johannes Oberhumer -; Copyright (C) 1996-2001 Laszlo Molnar -; Copyright (C) 2000-2001 John F. Reiser +; Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer +; Copyright (C) 1996-2002 Laszlo Molnar +; Copyright (C) 2000-2002 John F. Reiser ; All Rights Reserved. ; ; UPX and the UCL library are free software; you can redistribute them @@ -22,8 +22,11 @@ ; If not, write to the Free Software Foundation, Inc., ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ; -; Markus F.X.J. Oberhumer Laszlo Molnar John F. Reiser -; markus@oberhumer.com ml1050@cdata.tvnet.hu jreiser@BitWagon.com +; Markus F.X.J. Oberhumer Laszlo Molnar +; +; +; John F. Reiser +; ; diff --git a/src/stub/header.ash b/src/stub/header.ash index 1b1334a1..463a76ed 100644 --- a/src/stub/header.ash +++ b/src/stub/header.ash @@ -2,8 +2,8 @@ ; ; This file is part of the UPX executable compressor. ; -; Copyright (C) 1996-2001 Markus Franz Xaver Johannes Oberhumer -; Copyright (C) 1996-2001 Laszlo Molnar +; Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer +; Copyright (C) 1996-2002 Laszlo Molnar ; All Rights Reserved. ; ; UPX and the UCL library are free software; you can redistribute them @@ -21,8 +21,8 @@ ; If not, write to the Free Software Foundation, Inc., ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ; -; Markus F.X.J. Oberhumer Laszlo Molnar -; markus@oberhumer.com ml1050@cdata.tvnet.hu +; Markus F.X.J. Oberhumer Laszlo Molnar +; ; diff --git a/src/stub/l_com.asm b/src/stub/l_com.asm index c633eaa6..2c2736c8 100644 --- a/src/stub/l_com.asm +++ b/src/stub/l_com.asm @@ -2,8 +2,8 @@ ; ; This file is part of the UPX executable compressor. ; -; Copyright (C) 1996-2001 Markus Franz Xaver Johannes Oberhumer -; Copyright (C) 1996-2001 Laszlo Molnar +; Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer +; Copyright (C) 1996-2002 Laszlo Molnar ; All Rights Reserved. ; ; UPX and the UCL library are free software; you can redistribute them @@ -21,8 +21,8 @@ ; If not, write to the Free Software Foundation, Inc., ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ; -; Markus F.X.J. Oberhumer Laszlo Molnar -; markus@oberhumer.com ml1050@cdata.tvnet.hu +; Markus F.X.J. Oberhumer Laszlo Molnar +; ; diff --git a/src/stub/l_djgpp2.asm b/src/stub/l_djgpp2.asm index 39a17689..eee0e56d 100644 --- a/src/stub/l_djgpp2.asm +++ b/src/stub/l_djgpp2.asm @@ -2,8 +2,8 @@ ; ; This file is part of the UPX executable compressor. ; -; Copyright (C) 1996-2001 Markus Franz Xaver Johannes Oberhumer -; Copyright (C) 1996-2001 Laszlo Molnar +; Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer +; Copyright (C) 1996-2002 Laszlo Molnar ; All Rights Reserved. ; ; UPX and the UCL library are free software; you can redistribute them @@ -21,8 +21,8 @@ ; If not, write to the Free Software Foundation, Inc., ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ; -; Markus F.X.J. Oberhumer Laszlo Molnar -; markus@oberhumer.com ml1050@cdata.tvnet.hu +; Markus F.X.J. Oberhumer Laszlo Molnar +; ; @@ -57,6 +57,7 @@ start: %include "n2b_d32.ash" %include "n2d_d32.ash" +%include "n2e_d32.ash" ; ============= diff --git a/src/stub/l_lx_elf.c b/src/stub/l_lx_elf.c index 35ca2884..8b7600e7 100644 --- a/src/stub/l_lx_elf.c +++ b/src/stub/l_lx_elf.c @@ -2,9 +2,9 @@ This file is part of the UPX executable compressor. - Copyright (C) 1996-2001 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1996-2001 Laszlo Molnar - Copyright (C) 2000-2001 John F. Reiser + Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2002 Laszlo Molnar + Copyright (C) 2000-2002 John F. Reiser All Rights Reserved. UPX and the UCL library are free software; you can redistribute them @@ -22,8 +22,11 @@ If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Markus F.X.J. Oberhumer Laszlo Molnar John F. Reiser - markus@oberhumer.com ml1050@cdata.tvnet.hu jreiser@BitWagon.com + Markus F.X.J. Oberhumer Laszlo Molnar + + + John F. Reiser + */ diff --git a/src/stub/l_lx_elf86.asm b/src/stub/l_lx_elf86.asm index 9b47a7d9..2f6bc967 100644 --- a/src/stub/l_lx_elf86.asm +++ b/src/stub/l_lx_elf86.asm @@ -2,9 +2,9 @@ ; ; This file is part of the UPX executable compressor. ; -; Copyright (C) 1996-2001 Markus Franz Xaver Johannes Oberhumer -; Copyright (C) 1996-2001 Laszlo Molnar -; Copyright (C) 2000-2001 John F. Reiser +; Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer +; Copyright (C) 1996-2002 Laszlo Molnar +; Copyright (C) 2000-2002 John F. Reiser ; All Rights Reserved. ; ; UPX and the UCL library are free software; you can redistribute them @@ -22,8 +22,11 @@ ; If not, write to the Free Software Foundation, Inc., ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ; -; Markus F.X.J. Oberhumer Laszlo Molnar John F. Reiser -; markus@oberhumer.com ml1050@cdata.tvnet.hu jreiser@BitWagon.com +; Markus F.X.J. Oberhumer Laszlo Molnar +; +; +; John F. Reiser +; ; diff --git a/src/stub/l_lx_elf86.lds b/src/stub/l_lx_elf86.lds index b1e66aa2..7234340c 100644 --- a/src/stub/l_lx_elf86.lds +++ b/src/stub/l_lx_elf86.lds @@ -2,7 +2,7 @@ This file is part of the UPX executable compressor. - Copyright (C) 2000-2001 John F. Reiser + Copyright (C) 2000-2002 John F. Reiser All Rights Reserved. UPX and the UCL library are free software; you can redistribute them @@ -20,8 +20,11 @@ If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Markus F.X.J. Oberhumer Laszlo Molnar John F. Reiser - markus@oberhumer.com ml1050@cdata.tvnet.hu jreiser@BitWagon.com + Markus F.X.J. Oberhumer Laszlo Molnar + + + John F. Reiser + */ diff --git a/src/stub/l_lx_exec86.asm b/src/stub/l_lx_exec86.asm index 7098cb86..0147e5a9 100644 --- a/src/stub/l_lx_exec86.asm +++ b/src/stub/l_lx_exec86.asm @@ -2,9 +2,9 @@ ; ; This file is part of the UPX executable compressor. ; -; Copyright (C) 1996-2001 Markus Franz Xaver Johannes Oberhumer -; Copyright (C) 1996-2001 Laszlo Molnar -; Copyright (C) 2000-2001 John F. Reiser +; Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer +; Copyright (C) 1996-2002 Laszlo Molnar +; Copyright (C) 2000-2002 John F. Reiser ; All Rights Reserved. ; ; UPX and the UCL library are free software; you can redistribute them @@ -22,8 +22,11 @@ ; If not, write to the Free Software Foundation, Inc., ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ; -; Markus F.X.J. Oberhumer Laszlo Molnar John F. Reiser -; markus@oberhumer.com ml1050@cdata.tvnet.hu jreiser@BitWagon.com +; Markus F.X.J. Oberhumer Laszlo Molnar +; +; +; John F. Reiser +; ; diff --git a/src/stub/l_lx_exec86.lds b/src/stub/l_lx_exec86.lds index 6e3f742d..431268ec 100644 --- a/src/stub/l_lx_exec86.lds +++ b/src/stub/l_lx_exec86.lds @@ -2,7 +2,7 @@ This file is part of the UPX executable compressor. - Copyright (C) 2000-2001 John F. Reiser + Copyright (C) 2000-2002 John F. Reiser All Rights Reserved. UPX and the UCL library are free software; you can redistribute them @@ -20,8 +20,11 @@ If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Markus F.X.J. Oberhumer Laszlo Molnar John F. Reiser - markus@oberhumer.com ml1050@cdata.tvnet.hu jreiser@BitWagon.com + Markus F.X.J. Oberhumer Laszlo Molnar + + + John F. Reiser + */ diff --git a/src/stub/l_lx_sep.c b/src/stub/l_lx_sep.c index e0724ac1..b73c4991 100644 --- a/src/stub/l_lx_sep.c +++ b/src/stub/l_lx_sep.c @@ -2,9 +2,9 @@ This file is part of the UPX executable compressor. - Copyright (C) 1996-2001 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1996-2001 Laszlo Molnar - Copyright (C) 2000-2001 John F. Reiser + Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2002 Laszlo Molnar + Copyright (C) 2000-2002 John F. Reiser All Rights Reserved. UPX and the UCL library are free software; you can redistribute them @@ -22,8 +22,11 @@ If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Markus F.X.J. Oberhumer Laszlo Molnar John F. Reiser - markus@oberhumer.com ml1050@cdata.tvnet.hu jreiser@BitWagon.com + Markus F.X.J. Oberhumer Laszlo Molnar + + + John F. Reiser + */ diff --git a/src/stub/l_lx_sep86.asm b/src/stub/l_lx_sep86.asm index 712cf40a..2bf8da52 100644 --- a/src/stub/l_lx_sep86.asm +++ b/src/stub/l_lx_sep86.asm @@ -2,9 +2,9 @@ ; ; This file is part of the UPX executable compressor. ; -; Copyright (C) 1996-2001 Markus Franz Xaver Johannes Oberhumer -; Copyright (C) 1996-2001 Laszlo Molnar -; Copyright (C) 2000-2001 John F. Reiser +; Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer +; Copyright (C) 1996-2002 Laszlo Molnar +; Copyright (C) 2000-2002 John F. Reiser ; All Rights Reserved. ; ; UPX and the UCL library are free software; you can redistribute them @@ -22,8 +22,11 @@ ; If not, write to the Free Software Foundation, Inc., ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ; -; Markus F.X.J. Oberhumer Laszlo Molnar John F. Reiser -; markus@oberhumer.com ml1050@cdata.tvnet.hu jreiser@BitWagon.com +; Markus F.X.J. Oberhumer Laszlo Molnar +; +; +; John F. Reiser +; ; diff --git a/src/stub/l_lx_sep86.lds b/src/stub/l_lx_sep86.lds index 8695c363..be8b5658 100644 --- a/src/stub/l_lx_sep86.lds +++ b/src/stub/l_lx_sep86.lds @@ -2,7 +2,7 @@ This file is part of the UPX executable compressor. - Copyright (C) 2000-2001 John F. Reiser + Copyright (C) 2000-2002 John F. Reiser All Rights Reserved. UPX and the UCL library are free software; you can redistribute them @@ -20,8 +20,11 @@ If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Markus F.X.J. Oberhumer Laszlo Molnar John F. Reiser - markus@oberhumer.com ml1050@cdata.tvnet.hu jreiser@BitWagon.com + Markus F.X.J. Oberhumer Laszlo Molnar + + + John F. Reiser + */ diff --git a/src/stub/l_lx_sh.c b/src/stub/l_lx_sh.c index 21adadc6..80c38174 100644 --- a/src/stub/l_lx_sh.c +++ b/src/stub/l_lx_sh.c @@ -2,9 +2,9 @@ This file is part of the UPX executable compressor. - Copyright (C) 1996-2001 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1996-2001 Laszlo Molnar - Copyright (C) 2000-2001 John F. Reiser + Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2002 Laszlo Molnar + Copyright (C) 2000-2002 John F. Reiser All Rights Reserved. UPX and the UCL library are free software; you can redistribute them @@ -22,8 +22,11 @@ If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Markus F.X.J. Oberhumer Laszlo Molnar John F. Reiser - markus@oberhumer.com ml1050@cdata.tvnet.hu jreiser@BitWagon.com + Markus F.X.J. Oberhumer Laszlo Molnar + + + John F. Reiser + */ diff --git a/src/stub/l_lx_sh86.asm b/src/stub/l_lx_sh86.asm index 3f704d01..5aa2a15d 100644 --- a/src/stub/l_lx_sh86.asm +++ b/src/stub/l_lx_sh86.asm @@ -2,9 +2,9 @@ ; ; This file is part of the UPX executable compressor. ; -; Copyright (C) 1996-2001 Markus Franz Xaver Johannes Oberhumer -; Copyright (C) 1996-2001 Laszlo Molnar -; Copyright (C) 2000-2001 John F. Reiser +; Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer +; Copyright (C) 1996-2002 Laszlo Molnar +; Copyright (C) 2000-2002 John F. Reiser ; All Rights Reserved. ; ; UPX and the UCL library are free software; you can redistribute them @@ -22,8 +22,11 @@ ; If not, write to the Free Software Foundation, Inc., ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ; -; Markus F.X.J. Oberhumer Laszlo Molnar John F. Reiser -; markus@oberhumer.com ml1050@cdata.tvnet.hu jreiser@BitWagon.com +; Markus F.X.J. Oberhumer Laszlo Molnar +; +; +; John F. Reiser +; ; diff --git a/src/stub/l_lx_sh86.lds b/src/stub/l_lx_sh86.lds index 06d57437..93073d40 100644 --- a/src/stub/l_lx_sh86.lds +++ b/src/stub/l_lx_sh86.lds @@ -2,7 +2,7 @@ This file is part of the UPX executable compressor. - Copyright (C) 2000-2001 John F. Reiser + Copyright (C) 2000-2002 John F. Reiser All Rights Reserved. UPX and the UCL library are free software; you can redistribute them @@ -20,8 +20,11 @@ If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Markus F.X.J. Oberhumer Laszlo Molnar John F. Reiser - markus@oberhumer.com ml1050@cdata.tvnet.hu jreiser@BitWagon.com + Markus F.X.J. Oberhumer Laszlo Molnar + + + John F. Reiser + */ diff --git a/src/stub/l_psx.asm b/src/stub/l_psx.asm index 02d60fd7..5076b308 100644 --- a/src/stub/l_psx.asm +++ b/src/stub/l_psx.asm @@ -2,8 +2,8 @@ ; ; This file is part of the UPX executable compressor. ; -; Copyright (C) 1996-2001 Markus Franz Xaver Johannes Oberhumer -; Copyright (C) 1996-2001 Laszlo Molnar +; Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer +; Copyright (C) 1996-2002 Laszlo Molnar ; ; UPX and the UCL library are free software; you can redistribute them ; and/or modify them under the terms of the GNU General Public License as @@ -20,8 +20,8 @@ ; If not, write to the Free Software Foundation, Inc., ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ; -; Markus F.X.J. Oberhumer Laszlo Molnar -; markus@oberhumer.com ml1050@cdata.tvnet.hu +; Markus F.X.J. Oberhumer Laszlo Molnar +; ; ; psOne r3k v1.2 by ssg diff --git a/src/stub/l_sys.asm b/src/stub/l_sys.asm index 9d02aa20..8b42e8dd 100644 --- a/src/stub/l_sys.asm +++ b/src/stub/l_sys.asm @@ -2,8 +2,8 @@ ; ; This file is part of the UPX executable compressor. ; -; Copyright (C) 1996-2001 Markus Franz Xaver Johannes Oberhumer -; Copyright (C) 1996-2001 Laszlo Molnar +; Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer +; Copyright (C) 1996-2002 Laszlo Molnar ; All Rights Reserved. ; ; UPX and the UCL library are free software; you can redistribute them @@ -21,8 +21,8 @@ ; If not, write to the Free Software Foundation, Inc., ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ; -; Markus F.X.J. Oberhumer Laszlo Molnar -; markus@oberhumer.com ml1050@cdata.tvnet.hu +; Markus F.X.J. Oberhumer Laszlo Molnar +; ; diff --git a/src/stub/l_tmt.asm b/src/stub/l_tmt.asm index 8d35479d..fa9b5ffb 100644 --- a/src/stub/l_tmt.asm +++ b/src/stub/l_tmt.asm @@ -2,8 +2,8 @@ ; ; This file is part of the UPX executable compressor. ; -; Copyright (C) 1996-2001 Markus Franz Xaver Johannes Oberhumer -; Copyright (C) 1996-2001 Laszlo Molnar +; Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer +; Copyright (C) 1996-2002 Laszlo Molnar ; All Rights Reserved. ; ; UPX and the UCL library are free software; you can redistribute them @@ -21,8 +21,8 @@ ; If not, write to the Free Software Foundation, Inc., ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ; -; Markus F.X.J. Oberhumer Laszlo Molnar -; markus@oberhumer.com ml1050@cdata.tvnet.hu +; Markus F.X.J. Oberhumer Laszlo Molnar +; ; @@ -71,6 +71,7 @@ cutpoint: %include "n2b_d32.ash" %include "n2d_d32.ash" +%include "n2e_d32.ash" ; __TMTMAIN5__ pop ebp diff --git a/src/stub/l_vmlinz.asm b/src/stub/l_vmlinz.asm index ed5137d9..522f1f14 100644 --- a/src/stub/l_vmlinz.asm +++ b/src/stub/l_vmlinz.asm @@ -2,8 +2,8 @@ ; ; This file is part of the UPX executable compressor. ; -; Copyright (C) 1996-2001 Markus Franz Xaver Johannes Oberhumer -; Copyright (C) 1996-2001 Laszlo Molnar +; Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer +; Copyright (C) 1996-2002 Laszlo Molnar ; All Rights Reserved. ; ; UPX and the UCL library are free software; you can redistribute them @@ -21,8 +21,8 @@ ; If not, write to the Free Software Foundation, Inc., ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ; -; Markus F.X.J. Oberhumer Laszlo Molnar -; markus@oberhumer.com ml1050@cdata.tvnet.hu +; Markus F.X.J. Oberhumer Laszlo Molnar +; ; diff --git a/src/stub/l_w32pe.asm b/src/stub/l_w32pe.asm index 36a94b7e..221a0ca9 100644 --- a/src/stub/l_w32pe.asm +++ b/src/stub/l_w32pe.asm @@ -2,8 +2,8 @@ ; ; This file is part of the UPX executable compressor. ; -; Copyright (C) 1996-2001 Markus Franz Xaver Johannes Oberhumer -; Copyright (C) 1996-2001 Laszlo Molnar +; Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer +; Copyright (C) 1996-2002 Laszlo Molnar ; All Rights Reserved. ; ; UPX and the UCL library are free software; you can redistribute them @@ -21,8 +21,8 @@ ; If not, write to the Free Software Foundation, Inc., ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ; -; Markus F.X.J. Oberhumer Laszlo Molnar -; markus@oberhumer.com ml1050@cdata.tvnet.hu +; Markus F.X.J. Oberhumer Laszlo Molnar +; ; @@ -66,6 +66,7 @@ mpass: %include "n2b_d32.ash" %include "n2d_d32.ash" +%include "n2e_d32.ash" ; ============= diff --git a/src/stub/l_wcle.asm b/src/stub/l_wcle.asm index d6e75720..e07f06bd 100644 --- a/src/stub/l_wcle.asm +++ b/src/stub/l_wcle.asm @@ -2,8 +2,8 @@ ; ; This file is part of the UPX executable compressor. ; -; Copyright (C) 1996-2001 Markus Franz Xaver Johannes Oberhumer -; Copyright (C) 1996-2001 Laszlo Molnar +; Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer +; Copyright (C) 1996-2002 Laszlo Molnar ; All Rights Reserved. ; ; UPX and the UCL library are free software; you can redistribute them @@ -21,8 +21,8 @@ ; If not, write to the Free Software Foundation, Inc., ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ; -; Markus F.X.J. Oberhumer Laszlo Molnar -; markus@oberhumer.com ml1050@cdata.tvnet.hu +; Markus F.X.J. Oberhumer Laszlo Molnar +; ; @@ -79,6 +79,7 @@ cutpoint: %include "n2b_d32.ash" %include "n2d_d32.ash" +%include "n2e_d32.ash" ; ============= diff --git a/src/stub/linux.hh b/src/stub/linux.hh index 0fdc1890..96dc65c4 100644 --- a/src/stub/linux.hh +++ b/src/stub/linux.hh @@ -84,6 +84,7 @@ typedef int nrv_int32; typedef unsigned int nrv_uint; typedef unsigned int nrv_uint32; #define nrv_byte unsigned char +#define nrv_bytep unsigned char * #define nrv_voidp void * diff --git a/src/stub/macros.ash b/src/stub/macros.ash index 3f0b98ea..bf90d7b1 100644 --- a/src/stub/macros.ash +++ b/src/stub/macros.ash @@ -2,8 +2,8 @@ ; ; This file is part of the UPX executable compressor. ; -; Copyright (C) 1996-2001 Markus Franz Xaver Johannes Oberhumer -; Copyright (C) 1996-2001 Laszlo Molnar +; Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer +; Copyright (C) 1996-2002 Laszlo Molnar ; All Rights Reserved. ; ; UPX and the UCL library are free software; you can redistribute them @@ -21,8 +21,8 @@ ; If not, write to the Free Software Foundation, Inc., ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ; -; Markus F.X.J. Oberhumer Laszlo Molnar -; markus@oberhumer.com ml1050@cdata.tvnet.hu +; Markus F.X.J. Oberhumer Laszlo Molnar +; ; diff --git a/src/stub/scripts/asl_68k.sh b/src/stub/scripts/asl_68k.sh deleted file mode 100644 index 87d1e3d7..00000000 --- a/src/stub/scripts/asl_68k.sh +++ /dev/null @@ -1,50 +0,0 @@ -#! /bin/sh -# -# asl_68k.sh -- -# -# This file is part of the UPX executable compressor. -# -# Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer -# Copyright (C) 1996-2002 Laszlo Molnar -# All Rights Reserved. -# -# UPX and the UCL library are free software; you can redistribute them -# and/or modify them under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; see the file COPYING. -# If not, write to the Free Software Foundation, Inc., -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# Markus F.X.J. Oberhumer Laszlo Molnar -# -# - -set -e - -# wrapper for the ASL cross-assembler (version 1.42bld9) -# http://john.ccac.rwth-aachen.de:8000/as/ -# http://john.ccac.rwth-aachen.de:8000/ftp/as/source/c_version/ - -file="$1" -test -f "$file" || exit 1 - -ofile=`echo "$file" | sed 's/\.[a-z]*$/.o/'` - -# convert ' to " in dc.x statements -perl -p -i -e ' - s,\x27,",g if m,^\s*dc\.,; -' "$file" - -echo asl -q -xC -U -cpu 68000 -o "$ofile" -L "$file" - asl -q -xC -U -cpu 68000 -o "$ofile" -L "$file" - -exit 0 - diff --git a/src/stub/scripts/setfold.pl b/src/stub/scripts/setfold.pl index d742994c..b5a14f1e 100644 --- a/src/stub/scripts/setfold.pl +++ b/src/stub/scripts/setfold.pl @@ -4,7 +4,7 @@ # # This file is part of the UPX executable compressor. # -# Copyright (C) 2000-2001 John F. Reiser +# Copyright (C) 2000-2002 John F. Reiser # All Rights Reserved. # # UPX and the UCL library are free software; you can redistribute them @@ -22,8 +22,11 @@ # If not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # -# Markus F.X.J. Oberhumer Laszlo Molnar John F. Reiser -# markus@oberhumer.com ml1050@cdata.tvnet.hu jreiser@BitWagon.com +# Markus F.X.J. Oberhumer Laszlo Molnar +# +# +# John F. Reiser +# # diff --git a/src/version.h b/src/version.h index b280e2af..7c20946a 100644 --- a/src/version.h +++ b/src/version.h @@ -1,4 +1,4 @@ #define UPX_VERSION_HEX 0x019001 /* 01.90.01 */ #define UPX_VERSION_STRING "1.90.1" #define UPX_VERSION_STRING4 "1.90" -#define UPX_VERSION_DATE "Sep 9th 2002" +#define UPX_VERSION_DATE "Sep 12th 2002"