From 63b9ee61d2d1f89bfe36e41e8f02b4cdd346148c Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Mon, 7 Feb 2005 19:32:11 +0000 Subject: [PATCH] Prepare UPX 1.93 release. committer: mfx 1107804731 +0000 --- BUGS | 2 +- NEWS | 6 +- PROJECTS | 2 +- README | 6 +- THANKS | 2 +- TODO | 2 +- doc/Makefile | 2 +- doc/upx.pod | 16 ++--- src/Makefile.bld | 2 +- src/help.cpp | 14 ++--- src/miniacc.h | 154 ++++++++++++++++++++++++++++++++++++++--------- src/packer.cpp | 8 +-- src/version.h | 2 +- 13 files changed, 158 insertions(+), 60 deletions(-) diff --git a/BUGS b/BUGS index 245fd682..bd96e143 100644 --- a/BUGS +++ b/BUGS @@ -8,7 +8,7 @@ The Ultimate Packer for eXecutables - Copyright (c) 1996-2004 Markus Oberhumer & Laszlo Molnar + Copyright (c) 1996-2005 Markus Oberhumer & Laszlo Molnar http://upx.sourceforge.net diff --git a/NEWS b/NEWS index 40ce92d8..16fd69d4 100644 --- a/NEWS +++ b/NEWS @@ -4,11 +4,13 @@ User visible changes for UPX [ UNSTABLE BETA VERSION - please see README.1ST for some more info ] -Changes in 1.93 beta (XX XXX 2004): +Changes in 1.93 beta (07 Feb 2005): * UNSTABLE BETA VERSION - DO NOT USE EXCEPT FOR TESTING + * vmlinuz/386: fixes to support more kernels Changes in 1.92 beta (20 Jul 2004): - * win32/pe: added option `--strip-loadconf' to strip the SEH load config section + * win32/pe: added option `--strip-loadconf' to strip the SEH + load config section * win32/pe: try to detect .NET (win32/net) files [not yet supported by UPX] * vmlinux/386: new format that directly supports building Linux kernels * source code: now compiles cleanly under Win64 diff --git a/PROJECTS b/PROJECTS index eb1bffd2..fe2ee1c9 100644 --- a/PROJECTS +++ b/PROJECTS @@ -8,7 +8,7 @@ The Ultimate Packer for eXecutables - Copyright (c) 1996-2004 Markus Oberhumer & Laszlo Molnar + Copyright (c) 1996-2005 Markus Oberhumer & Laszlo Molnar http://upx.sourceforge.net diff --git a/README b/README index 6e5bbfe4..cb200b7a 100644 --- a/README +++ b/README @@ -8,7 +8,7 @@ The Ultimate Packer for eXecutables - Copyright (c) 1996-2004 Markus Oberhumer & Laszlo Molnar + Copyright (c) 1996-2005 Markus Oberhumer & Laszlo Molnar http://upx.sourceforge.net @@ -129,8 +129,8 @@ THE FUTURE COPYRIGHT ========= -Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer -Copyright (C) 1996-2004 Laszlo Molnar +Copyright (C) 1996-2005 Markus Franz Xaver Johannes Oberhumer +Copyright (C) 1996-2005 Laszlo Molnar This program may be used freely, and you are welcome to redistribute it under certain conditions. diff --git a/THANKS b/THANKS index a12cf1d2..7e98f6ac 100644 --- a/THANKS +++ b/THANKS @@ -8,7 +8,7 @@ The Ultimate Packer for eXecutables - Copyright (c) 1996-2004 Markus Oberhumer & Laszlo Molnar + Copyright (c) 1996-2005 Markus Oberhumer & Laszlo Molnar http://upx.sourceforge.net diff --git a/TODO b/TODO index 9c4b3c33..7f8443c1 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,4 @@ -UPX TODO list. Last updated 2004-07-20. +UPX TODO list. Last updated 2005-01-08. IMPORTANT PROBLEMS THAT SHOULD BE FIXED SOON: diff --git a/doc/Makefile b/doc/Makefile index 08a1b9d5..5381041c 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -3,7 +3,7 @@ SHELL = /bin/sh top_srcdir = .. PACKAGE = upx -VERSION_DATE = 25 Oct 2004 +VERSION_DATE = 07 Feb 2005 VERSION := $(shell sed -n 's/^.*UPX_VERSION_STRING .*"\(.*\)".*/\1/p' $(top_srcdir)/src/version.h) TRIMSPACE = cat diff --git a/doc/upx.pod b/doc/upx.pod index 9f742198..aa061a1a 100644 --- a/doc/upx.pod +++ b/doc/upx.pod @@ -13,7 +13,7 @@ B S<[ I ]> S<[ I ]> I... =head1 ABSTRACT The Ultimate Packer for eXecutables - Copyright (c) 1996-2004 Markus Oberhumer & Laszlo Molnar + Copyright (c) 1996-2005 Markus Oberhumer & Laszlo Molnar http://upx.sourceforge.net @@ -826,9 +826,9 @@ still some incompabilities with some files. Because of the way B (and other packers for this format) works, you can see increased memory usage of your compressed files because the whole program is loaded into memory at startup. -If you start several instances of huge compressed programs you're wasting memory -because the common segements of the program won't get shared -across the instances. +If you start several instances of huge compressed programs you're +wasting memory because the common segements of the program won't +get shared across the instances. On the other hand if you're compressing only smaller programs, or running only one instance of larger programs, then this penalty is smaller, but it's still there. @@ -920,13 +920,13 @@ Please report all bugs immediately to the authors. =head1 COPYRIGHT -Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer +Copyright (C) 1996-2005 Markus Franz Xaver Johannes Oberhumer -Copyright (C) 1996-2004 Laszlo Molnar +Copyright (C) 1996-2005 Laszlo Molnar -Copyright (C) 2000-2004 John F. Reiser +Copyright (C) 2000-2005 John F. Reiser -Copyright (C) 2002-2004 Jens Medoch +Copyright (C) 2002-2005 Jens Medoch This program may be used freely, and you are welcome to redistribute it under certain conditions. diff --git a/src/Makefile.bld b/src/Makefile.bld index dbd0dc65..9e7fff66 100644 --- a/src/Makefile.bld +++ b/src/Makefile.bld @@ -1,5 +1,5 @@ # /*********************************************************************** -# // perpare setup +# // prepare setup # ************************************************************************/ SHELL = /bin/sh diff --git a/src/help.cpp b/src/help.cpp index e047723a..44e9fd46 100644 --- a/src/help.cpp +++ b/src/help.cpp @@ -2,8 +2,8 @@ This file is part of the UPX executable compressor. - Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1996-2004 Laszlo Molnar + Copyright (C) 1996-2005 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2005 Laszlo Molnar All Rights Reserved. UPX and the UCL library are free software; you can redistribute them @@ -48,7 +48,7 @@ void show_head(void) fg = con_fg(f,FG_GREEN); con_fprintf(f, " Ultimate Packer for eXecutables\n" - " Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004\n" + " Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005\n" "UPX %-12s Markus F.X.J. Oberhumer & Laszlo Molnar %20s\n\n", #if (ACC_OS_DOS16 || ACC_OS_DOS32) V("d"), @@ -348,10 +348,10 @@ void show_version(int x) #if defined(WITH_UCL) fprintf(f,"UCL data compression library %s\n", ucl_version_string()); #endif - fprintf(f,"Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer\n"); - fprintf(f,"Copyright (C) 1996-2004 Laszlo Molnar\n"); - fprintf(f,"Copyright (C) 2000-2004 John F. Reiser\n"); - fprintf(f,"Copyright (C) 2002-2004 Jens Medoch\n"); + fprintf(f,"Copyright (C) 1996-2005 Markus Franz Xaver Johannes Oberhumer\n"); + fprintf(f,"Copyright (C) 1996-2005 Laszlo Molnar\n"); + fprintf(f,"Copyright (C) 2000-2005 John F. Reiser\n"); + fprintf(f,"Copyright (C) 2002-2005 Jens Medoch\n"); fprintf(f,"UPX comes with ABSOLUTELY NO WARRANTY; for details type `%s -L'.\n", progname); } diff --git a/src/miniacc.h b/src/miniacc.h index 4671ab50..eca65870 100644 --- a/src/miniacc.h +++ b/src/miniacc.h @@ -35,7 +35,7 @@ #ifndef __ACC_H_INCLUDED #define __ACC_H_INCLUDED 1 -#define ACC_VERSION 20041221L +#define ACC_VERSION 20041222L #if defined(__CYGWIN32__) && !defined(__CYGWIN__) # define __CYGWIN__ __CYGWIN32__ #endif @@ -77,6 +77,68 @@ # pragma option -h #endif #if defined(ACC_CONFIG_NO_LIMITS_H) +#elif defined(ACC_LIBC_FALLBACK_FREESTANDING) || defined(ACC_BROKEN_LIMITS_H) +#ifndef __ACC_FALLBACK_LIMITS_H_INCLUDED +#define __ACC_FALLBACK_LIMITS_H_INCLUDED +#undef CHAR_BIT +#define CHAR_BIT 8 +#ifndef MB_LEN_MAX +#define MB_LEN_MAX 1 +#endif +#ifndef __SCHAR_MAX__ +#define __SCHAR_MAX__ 127 +#endif +#ifndef __SHRT_MAX__ +#define __SHRT_MAX__ 32767 +#endif +#ifndef __INT_MAX__ +#define __INT_MAX__ 2147483647 +#endif +#ifndef __LONG_MAX__ +#if defined(__alpha__) || defined(__MIPS_PSX2__) +#define __LONG_MAX__ 9223372036854775807L +#else +#define __LONG_MAX__ 2147483647L +#endif +#endif +#undef SCHAR_MIN +#undef SCHAR_MAX +#undef UCHAR_MAX +#define SCHAR_MIN (-1 - SCHAR_MAX) +#define SCHAR_MAX (__SCHAR_MAX__) +#define UCHAR_MAX (SCHAR_MAX * 2 + 1) +#undef SHRT_MIN +#undef SHRT_MAX +#undef USHRT_MAX +#define SHRT_MIN (-1 - SHRT_MAX) +#define SHRT_MAX (__SHRT_MAX__) +#if ((__INT_MAX__) == (__SHRT_MAX__)) +#define USHRT_MAX (SHRT_MAX * 2U + 1U) +#else +#define USHRT_MAX (SHRT_MAX * 2 + 1) +#endif +#undef INT_MIN +#undef INT_MAX +#undef UINT_MAX +#define INT_MIN (-1 - INT_MAX) +#define INT_MAX (__INT_MAX__) +#define UINT_MAX (INT_MAX * 2U + 1U) +#undef LONG_MIN +#undef LONG_MAX +#undef ULONG_MAX +#define LONG_MIN (-1L - LONG_MAX) +#define LONG_MAX ((__LONG_MAX__) + 0L) +#define ULONG_MAX (LONG_MAX * 2UL + 1UL) +#undef CHAR_MIN +#undef CHAR_MAX +#if defined(__CHAR_UNSIGNED__) || defined(_CHAR_UNSIGNED) +#define CHAR_MIN 0 +#define CHAR_MAX UCHAR_MAX +#else +#define CHAR_MIN SCHAR_MIN +#define CHAR_MAX SCHAR_MAX +#endif +#endif #else # include #endif @@ -819,6 +881,7 @@ extern "C" { #else # error "unknown memory model" #endif +#if !defined(ACC_ARCH_GENERIC) #if (ACC_MM_FLAT) && (UINT_MAX >= ACC_0xffffffffL) && (ULONG_MAX >= UINT_MAX) #if defined(__LLP64__) || defined(__LLP64) || defined(_LLP64) # define ACC_MM_LLP64 1 @@ -842,6 +905,7 @@ extern "C" { # endif #endif #endif +#endif #if (ACC_MM_ILP32) || (ACC_ARCH_M68K) # define ACC_MM_WORDSIZE 32 #elif (ACC_MM_ILP64 || ACC_MM_LLP64 || ACC_MM_LP64) @@ -1215,24 +1279,8 @@ extern "C" { # include ACC_CONFIG_HEADER #else #if !defined(ACC_CONFIG_AUTO_NO_HEADERS) -#if (ACC_LIBC_GLIBC >= 0x020100ul) -# define HAVE_STDINT_H 1 -#elif (ACC_LIBC_DIETLIBC) -# undef HAVE_STDINT_H -#elif (ACC_LIBC_UCLIBC) -# define HAVE_STDINT_H 1 -#elif (ACC_CC_BORLANDC) && (__BORLANDC__ >= 0x560) -# undef HAVE_STDINT_H -#elif (ACC_CC_DMC) && (__DMC__ >= 0x825) -# define HAVE_STDINT_H 1 -#endif -#if defined(ACC_CONFIG_NO_STDINT_H) -#elif HAVE_STDINT_H -# include -#endif -#endif -#if !defined(ACC_CONFIG_AUTO_NO_HEADERS) -#if defined(ACC_LIBC_STRICT_FREESTANDING) +#if defined(ACC_LIBC_FALLBACK_FREESTANDING) +#elif defined(ACC_LIBC_STRICT_FREESTANDING) # define HAVE_LIMITS_H 1 # define HAVE_STDDEF_H 1 #elif defined(ACC_LIBC_FREESTANDING) @@ -1451,6 +1499,17 @@ extern "C" { # undef HAVE_SYS_TIME_H #endif #endif +#if (ACC_LIBC_GLIBC >= 0x020100ul) +# define HAVE_STDINT_H 1 +#elif (ACC_LIBC_DIETLIBC) +# undef HAVE_STDINT_H +#elif (ACC_LIBC_UCLIBC) +# define HAVE_STDINT_H 1 +#elif (ACC_CC_BORLANDC) && (__BORLANDC__ >= 0x560) +# undef HAVE_STDINT_H +#elif (ACC_CC_DMC) && (__DMC__ >= 0x825) +# define HAVE_STDINT_H 1 +#endif #if (HAVE_SYS_TIME_H && HAVE_TIME_H) # define TIME_WITH_SYS_TIME 1 #endif @@ -1715,11 +1774,7 @@ extern "C" { #define SIZEOF_SHORT (__ACC_SHORT_BIT / 8) #define SIZEOF_INT (__ACC_INT_BIT / 8) #define SIZEOF_LONG (__ACC_LONG_BIT / 8) -#if (ACC_OS_WIN64) -# define SIZEOF_PTRDIFF_T 8 -# define SIZEOF_SIZE_T 8 -# define SIZEOF_VOID_P 8 -#elif (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16) +#if (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16) # define SIZEOF_SIZE_T 2 # if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM) # define SIZEOF_VOID_P 2 @@ -1741,14 +1796,18 @@ extern "C" { # else # error "ACC_MM" # endif -#elif (ACC_ARCH_AVR || ACC_ARCH_C166 || ACC_ARCH_MCS51 || ACC_ARCH_MCS251) +#elif (ACC_ARCH_AVR || ACC_ARCH_C166 || ACC_ARCH_IA16 || ACC_ARCH_MCS51 || ACC_ARCH_MCS251) # define SIZEOF_PTRDIFF_T 2 # define SIZEOF_SIZE_T 2 # define SIZEOF_VOID_P 2 #elif (ACC_MM_IP32L64) -# define SIZEOF_PTRDIFF_T SIZEOF_INT -# define SIZEOF_SIZE_T SIZEOF_INT -# define SIZEOF_VOID_P SIZEOF_INT +# define SIZEOF_PTRDIFF_T 4 +# define SIZEOF_SIZE_T 4 +# define SIZEOF_VOID_P 4 +#elif (ACC_MM_LLP64) || (ACC_OS_WIN64) +# define SIZEOF_PTRDIFF_T 8 +# define SIZEOF_SIZE_T 8 +# define SIZEOF_VOID_P 8 #else # define SIZEOF_PTRDIFF_T SIZEOF_LONG # define SIZEOF_SIZE_T SIZEOF_LONG @@ -2276,7 +2335,38 @@ typedef void (__acc_cdecl_sighandler *acc_sighandler_t)(int); # undef ACC_WANT_ACC_INCD_H #ifndef __ACC_INCD_H_INCLUDED #define __ACC_INCD_H_INCLUDED 1 -#if defined(ACC_LIBC_STRICT_FREESTANDING) +#if defined(ACC_LIBC_FALLBACK_FREESTANDING) +#ifndef __ACC_FALLBACK_STDDEF_H_INCLUDED +#define __ACC_FALLBACK_STDDEF_H_INCLUDED +#if 0 +FIXME + __PTRDIFF_TYPE__, __SSIZE_TYPE__, __SIZE_TYPE__ + wchar_t, wint_t +#endif +typedef int ptrdiff_t; +typedef unsigned int size_t; +#define _PTRDIFF_T_DEFINED +#define _SIZE_T_DEFINED +#define _INTPTR_T_DEFINED +#define _UINTPTR_T_DEFINED +#if !defined(__cplusplus) +#ifndef _WCHAR_T_DEFINED +typedef unsigned short wchar_t; +#define _WCHAR_T_DEFINED +#endif +#endif +#ifndef NULL +#if defined(__cplusplus) +#define NULL 0 +#else +#define NULL ((void*)0) +#endif +#endif +#ifndef offsetof +#define offsetof(s,m) ((size_t)((ptrdiff_t)&(((s*)0)->m))) +#endif +#endif +#elif defined(ACC_LIBC_STRICT_FREESTANDING) # if HAVE_STDDEF_H # include # endif @@ -3338,6 +3428,7 @@ ACCLIB_EXTERN(acc_uint32l_t, acc_randmt_r32) (acc_randmt_p); ACCCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*)) ACCCHK_ASSERT(sizeof(size_t) == sizeof(void*)) ACCCHK_ASSERT(ACC_MM_WORDSIZE == 32) + ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *)) #endif #if (ACC_MM_ILP64) ACCCHK_ASSERT(sizeof(int) == 8) @@ -3346,6 +3437,7 @@ ACCLIB_EXTERN(acc_uint32l_t, acc_randmt_r32) (acc_randmt_p); ACCCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*)) ACCCHK_ASSERT(sizeof(size_t) == sizeof(void*)) ACCCHK_ASSERT(ACC_MM_WORDSIZE == 64) + ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *)) #endif #if (ACC_MM_IP32L64) ACCCHK_ASSERT(sizeof(int) == 4) @@ -3353,6 +3445,7 @@ ACCLIB_EXTERN(acc_uint32l_t, acc_randmt_r32) (acc_randmt_p); ACCCHK_ASSERT(sizeof(void*) == 4) ACCCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*)) ACCCHK_ASSERT(sizeof(size_t) == sizeof(void*)) + ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *)) #endif #if (ACC_MM_LLP64) ACCCHK_ASSERT(sizeof(int) == 4) @@ -3361,11 +3454,13 @@ ACCLIB_EXTERN(acc_uint32l_t, acc_randmt_r32) (acc_randmt_p); ACCCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*)) ACCCHK_ASSERT(sizeof(size_t) == sizeof(void*)) ACCCHK_ASSERT(ACC_MM_WORDSIZE == 64) + ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *)) #endif #if (ACC_MM_LP32) ACCCHK_ASSERT(sizeof(int) == 2) ACCCHK_ASSERT(sizeof(long) == 4) ACCCHK_ASSERT(sizeof(void*) == 4) + ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *)) #endif #if (ACC_MM_LP64) ACCCHK_ASSERT(sizeof(int) == 4) @@ -3374,6 +3469,7 @@ ACCLIB_EXTERN(acc_uint32l_t, acc_randmt_r32) (acc_randmt_p); ACCCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*)) ACCCHK_ASSERT(sizeof(size_t) == sizeof(void*)) ACCCHK_ASSERT(ACC_MM_WORDSIZE == 64) + ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *)) #endif #if (ACC_ARCH_IA16) ACCCHK_ASSERT(sizeof(size_t) == 2) diff --git a/src/packer.cpp b/src/packer.cpp index 0c75e257..0c3c100f 100644 --- a/src/packer.cpp +++ b/src/packer.cpp @@ -2,8 +2,8 @@ This file is part of the UPX executable compressor. - Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer - Copyright (C) 1996-2004 Laszlo Molnar + Copyright (C) 1996-2005 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2005 Laszlo Molnar All Rights Reserved. UPX and the UCL library are free software; you can redistribute them @@ -977,12 +977,12 @@ char const *Packer::getIdentstr(unsigned *size, int small) "\n\0" "$Id: UPX " UPX_VERSION_STRING4 - " Copyright (C) 1996-2004 the UPX Team. All Rights Reserved. $" + " Copyright (C) 1996-2005 the UPX Team. All Rights Reserved. $" "\n"; static const char identsmall[] = "\n" "$Id: UPX " - "(C) 1996-2004 the UPX Team. All Rights Reserved. http://upx.sf.net $" + "(C) 1996-2005 the UPX Team. All Rights Reserved. http://upx.sf.net $" "\n"; static const char identtiny[] = UPX_VERSION_STRING4; diff --git a/src/version.h b/src/version.h index c92fd342..18df7d94 100644 --- a/src/version.h +++ b/src/version.h @@ -1,4 +1,4 @@ #define UPX_VERSION_HEX 0x019300 /* 01.93.00 */ #define UPX_VERSION_STRING "1.93 beta" #define UPX_VERSION_STRING4 "1.93" -#define UPX_VERSION_DATE "Oct 25th 2004" +#define UPX_VERSION_DATE "Feb 7th 2005"