diff --git a/.hgignore b/.hgignore index e50def2f..3606a036 100644 --- a/.hgignore +++ b/.hgignore @@ -1,7 +1,8 @@ syntax: regexp -^build ^ChangeLog +^build +^maint syntax: glob diff --git a/.hgtags b/.hgtags index 10f43e18..abb4b026 100644 --- a/.hgtags +++ b/.hgtags @@ -3,6 +3,7 @@ 2c753c5bf38e7322715e2a5c6c5381111bd7a61a RELEASE_194 2ee65b77f9117651e2e5517b2edede23698d73ca RELEASE_196 70402aeee6e0e4fc2889658ed8cee44461c0b0a8 RELEASE_200 +a916a2fe22de45167d25abcb40008315f415221c RELEASE_201 a935d577fc7dd9c2c87761c9c702805da6ce1e51 RELEASE_193 b0353253b0b3d062eb5adb50d4b665a96620da45 RELEASE_195 c2e0cd4d621b047f254f2def42132a03683ff52c RELEASE_192 diff --git a/NEWS b/NEWS index 6b2f20c1..daa16b4f 100644 --- a/NEWS +++ b/NEWS @@ -2,12 +2,12 @@ User visible changes for UPX ================================================================== -Changes in 2.01 (27 May 2006): +Changes in 2.01 (06 Jun 2006): * arm/pe: better DLL support * dos/exe: device driver support added * linux/386: Fix --force-execve for PaX, grSecurity, and strict SELinux. /tmp must support execve(); therefore /tmp cannot be mounted 'noexec'. - * win32/pe & arm/pe: added new option '--keep-resource' for + * win32/pe & arm/pe: added new option '--keep-resource=' for excluding selected resources from compression Changes in 2.00 (27 Apr 2006): diff --git a/src/p_armpe.cpp b/src/p_armpe.cpp index cbfcfdfe..66b8f2ef 100644 --- a/src/p_armpe.cpp +++ b/src/p_armpe.cpp @@ -2508,16 +2508,20 @@ void PackArmPe::unpack(OutputFile *fo) // write decompressed file if (fo) { + unsigned ic; + for (ic = 0; ic < objs && osection[ic].rawdataptr == 0; ic++) + ; + ibuf.dealloc(); - ibuf.alloc(osection[0].rawdataptr); + ibuf.alloc(osection[ic].rawdataptr); ibuf.clear(); infoHeader("[Writing uncompressed file]"); // write loader + compressed file fo->write(&oh,sizeof(oh)); fo->write(osection,objs * sizeof(pe_section_t)); - fo->write(ibuf,osection[0].rawdataptr - fo->getBytesWritten()); - for(unsigned ic = 0; ic < objs; ic++) + fo->write(ibuf,osection[ic].rawdataptr - fo->getBytesWritten()); + for (ic = 0; ic < objs; ic++) if (osection[ic].rawdataptr) fo->write(obuf + osection[ic].vaddr - rvamin,ALIGN_UP(osection[ic].size,oh.filealign)); copyOverlay(fo, overlay, &obuf); diff --git a/src/p_w32pe.cpp b/src/p_w32pe.cpp index e86a7491..73157be3 100644 --- a/src/p_w32pe.cpp +++ b/src/p_w32pe.cpp @@ -2600,16 +2600,20 @@ void PackW32Pe::unpack(OutputFile *fo) // write decompressed file if (fo) { + unsigned ic; + for (ic = 0; ic < objs && osection[ic].rawdataptr == 0; ic++) + ; + ibuf.dealloc(); - ibuf.alloc(osection[0].rawdataptr); + ibuf.alloc(osection[ic].rawdataptr); ibuf.clear(); infoHeader("[Writing uncompressed file]"); // write loader + compressed file fo->write(&oh,sizeof(oh)); fo->write(osection,objs * sizeof(pe_section_t)); - fo->write(ibuf,osection[0].rawdataptr - fo->getBytesWritten()); - for(unsigned ic = 0; ic < objs; ic++) + fo->write(ibuf,osection[ic].rawdataptr - fo->getBytesWritten()); + for (ic = 0; ic < objs; ic++) if (osection[ic].rawdataptr) fo->write(obuf + osection[ic].vaddr - rvamin,ALIGN_UP(osection[ic].size,oh.filealign)); copyOverlay(fo, overlay, &obuf); diff --git a/src/stub/Makefile b/src/stub/Makefile index 744d7f84..d50228d2 100644 --- a/src/stub/Makefile +++ b/src/stub/Makefile @@ -61,9 +61,7 @@ endif # util var for use in the rules - basename of the current target override T = $(basename $@) -ifneq ($(strip $(USE_MAKEFILE_DEPS)),) MAKEFILE_DEPS = $(MAKEFILE_LIST) -endif # /*********************************************************************** @@ -107,17 +105,17 @@ OBJCOPY_LINUX_I386 = i386-linux-objcopy-2.16.1 -F elf32-i386 OBJSTRIP_LINUX_I386 = $(OBJCOPY_LINUX_I386) -R .comment -R .note STRIPELF_LINUX_I386 = ./util/sstrip/i386-linux-sstrip -# gcc 2.7.2.3 (fold_*86.bin: 1900 / 1011 / 1786 / 1401) +# gcc 2.7.2.3 CC_LINUX_I386_GCC272 = i386-linux-gcc-2.72 -m386 -O2 -MMD CC_LINUX_I386_GCC272 += -malign-functions=0 -malign-jumps=0 -malign-loops=0 -# gcc 2.95.3 (fold_*86.bin: 1770 / 995 / 1661 / 1314) +# gcc 2.95.3 CC_LINUX_I386_GCC295 = i386-linux-gcc-2.95.3 -march=i386 -mcpu=k6 -fno-exceptions -MMD CC_LINUX_I386_GCC295 += -Os -fno-omit-frame-pointer CC_LINUX_I386_GCC295 += -malign-functions=0 -malign-jumps=0 -malign-loops=0 CC_LINUX_I386_GCC295 += -Werror -# gcc 3.4.6 (fold_*86.bin: 1651 / 947 / 1537 / 1190) +# gcc 3.4.6 (fold_*86.bin: 1622 / 899 / 1531 / 1201) CC_LINUX_I386_GCC34 = i386-linux-gcc-3.4.6 CC_LINUX_I386_GCC34 += -m32 -march=i386 -mtune=k6 -fno-exceptions -MMD CC_LINUX_I386_GCC34 += -Os -fno-omit-frame-pointer @@ -127,9 +125,9 @@ CC_LINUX_I386_GCC34 += -mpreferred-stack-boundary=2 CC_LINUX_I386_GCC34 += -fweb CC_LINUX_I386_GCC34 += -Werror -# gcc 4.1.0 (fold_*86.bin: 1725 / 963 / 1620 / 1202) -# gcc 4.0.3 (fold_*86.bin: 1731 / 995 / 1625 / 1195) -CC_LINUX_I386_GCC41 = i386-linux-gcc-4.1.0 +# gcc 4.1.1 (fold_*86.bin: 1651 / 931 / 1633 / 1215) +# gcc 4.0.3 (fold_*86.bin: 1699 / 963 / 1631 / 1208) +CC_LINUX_I386_GCC41 = i386-linux-gcc-4.1.1 CC_LINUX_I386_GCC41 += -m32 -march=i386 -mtune=k6 -fno-exceptions -MMD CC_LINUX_I386_GCC41 += -Os -fno-omit-frame-pointer CC_LINUX_I386_GCC41 += -momit-leaf-frame-pointer @@ -232,6 +230,7 @@ LD_ARM := arm-9tdmi-linux-gnu-ld OBJCOPY_LINUX_ARM := arm-9tdmi-linux-gnu-objcopy OBJSTRIP_LINUX_ARM := $(OBJCOPY_LINUX_ARM) -R .comment -R .note + # /*********************************************************************** # // main targets # ************************************************************************/ @@ -576,16 +575,17 @@ upxd: l_lx_sep.o l_lx_sep86.asm $(STRIPELF_LINUX_I386) $@ $(BRANDELF) $@ -l_armpea.h: l_armpea.S armv4_n2e_d8.S $(MAKEFILE_LIST) +l_armpea.h: l_armpea.S armv4_n2e_d8.S $(MAKEFILE_DEPS) $(GCC_ARM) $T.S -o $T.out -nostdlib $(OBJCOPY_LINUX_ARM) --only-section .text -O binary $T.out $T.bin $(BIN2H) $T.bin nrv_loader_arm $@ -l_armpet.h: l_armpet.S arm_nrv2e_d8.S arm_nrv2b_d8.S $(MAKEFILE_LIST) +l_armpet.h: l_armpet.S arm_nrv2e_d8.S arm_nrv2b_d8.S $(MAKEFILE_DEPS) $(GCC_ARM_T) $T.S -o $T.out -nostdlib $(OBJCOPY_LINUX_ARM) --only-section .text -O binary $T.out $T.bin $(BIN2H) $T.bin nrv_loader_thumb $@ + # /*********************************************************************** # // dependencies # ************************************************************************/ diff --git a/src/version.h b/src/version.h index 2d573895..92aca62a 100644 --- a/src/version.h +++ b/src/version.h @@ -1,6 +1,6 @@ #define UPX_VERSION_HEX 0x020100 /* 02.01.00 */ #define UPX_VERSION_STRING "2.01" #define UPX_VERSION_STRING4 "2.01" -#define UPX_VERSION_DATE "Apr 28th 2006" -#define UPX_VERSION_DATE_ISO "2006-04-28" +#define UPX_VERSION_DATE "Jun 06th 2006" +#define UPX_VERSION_DATE_ISO "2006-06-06" #define UPX_VERSION_YEAR "2006"