# HG changeset patch # User Pascal Bellard # Date 1538844619 -7200 # Node ID 623f02d7e6c887ea90e0e11b1e9c830c7a5a3641 # Parent 45d416bfc91ead1fd47b2d11ade6cc8ed7adda2b Up upx (3.95) diff -r 45d416bfc91e -r 623f02d7e6c8 linld/stuff/src/!COMPILE.BAT --- a/linld/stuff/src/!COMPILE.BAT Sat Oct 06 15:26:57 2018 +0200 +++ b/linld/stuff/src/!COMPILE.BAT Sat Oct 06 18:50:19 2018 +0200 @@ -3,17 +3,6 @@ tasm /h > helptasm.log bcc > helpbcc.log tlink > helptlink.log -rem tasm /la /m *.asm > asm.log +bcc @bccopt.opt -S -mt -DLARGE_IMAGES *.cpp > cpp.log tasm /la /m /dLARGE_IMAGES *.asm > asm.log -rem @pause -rem bcc @bccopt.opt -S -mt *.cpp -bcc @bccopt.opt -S -mt -DLARGE_IMAGES *.cpp -tasm /l /m load.asm -tasm /l /m himem.asm -tasm /l /m linld.asm -tasm /l /m iso9660.asm -rem bcc @bccopt.opt -c -mt *.cpp > cpp.log -bcc @bccopt.opt -c -mt -DLARGE_IMAGES *.cpp > cpp.log -rem @pause tlink /m /s /t @link.cmd > lnk.log -rem @pause diff -r 45d416bfc91e -r 623f02d7e6c8 linld/stuff/src/!COMPILEX.BAT --- a/linld/stuff/src/!COMPILEX.BAT Sat Oct 06 15:26:57 2018 +0200 +++ b/linld/stuff/src/!COMPILEX.BAT Sat Oct 06 18:50:19 2018 +0200 @@ -1,16 +1,5 @@ path ..\BC31;%PATH% call !clean.bat -rem tasm /la /m /dEXTRA /dNO386 *.asm > asm.log +bcc @bccopt.opt -S -mt -DLARGE_IMAGES *.cpp > cpp.log tasm /la /m /dEXTRA /dNO386 /dLARGE_IMAGES *.asm > asm.log -rem @pause -rem bcc @bccopt.opt -S -mt *.cpp -bcc @bccopt.opt -S -mt -DLARGE_IMAGES *.cpp -tasm /l /m load.asm -tasm /l /m himem.asm -tasm /l /m tazboot.asm -tasm /l /m iso9660.asm -rem bcc @bccopt.opt -c -mt *.cpp > cpp.log -bcc @bccopt.opt -c -mt -DLARGE_IMAGES *.cpp > cpp.log -rem @pause tlink /m /s /t @linkx.cmd > lnk.log -rem @pause diff -r 45d416bfc91e -r 623f02d7e6c8 linld/stuff/src/CRTL.ASM --- a/linld/stuff/src/CRTL.ASM Sat Oct 06 15:26:57 2018 +0200 +++ b/linld/stuff/src/CRTL.ASM Sat Oct 06 18:50:19 2018 +0200 @@ -171,36 +171,6 @@ ;*************************************************************** -;void* malloc(unsigned sz); -;*************************************************************** - global _malloc:near - proc _malloc near - - pop ax ;caller return address - pop cx ; sz - push cx - push ax - global malloc:near ; malloc(cx) -malloc: ; keep CX, use AX,BX - mov ax,[_heap_top] - mov bx,sp - add bh,-14h ; MIN_STACK=_1k+PAGE_SIZE - sub bx,ax ; can't overflow - cmp bx,cx - mov bx,offset msg_malloc - jb puts - add [_heap_top],cx ; _BEG has zero'd heap - ;mov bx,ax -@@zalloc: - ;mov [byte bx],0 - ;inc bx ; ZF=0 - ;loop @@zalloc - ret - - endp _malloc - - -;*************************************************************** ;void puts(const char* s): ;*************************************************************** global _puts:near @@ -438,8 +408,14 @@ push ax global malloc_or_die:near ; malloc_or_die(cx) malloc_or_die: - call malloc - jz _exit + mov ax,[_heap_top] ; return value + mov bx,sp + add bh,-14h ; MIN_STACK=_1k+PAGE_SIZE + sub bx,ax ; can't overflow + cmp bx,cx + mov bx,offset msg_malloc + jb die + add [_heap_top],cx ; _BEG has zero'd heap ret endp _malloc_or_die diff -r 45d416bfc91e -r 623f02d7e6c8 linld/stuff/src/CRTL.H --- a/linld/stuff/src/CRTL.H Sat Oct 06 15:26:57 2018 +0200 +++ b/linld/stuff/src/CRTL.H Sat Oct 06 18:50:19 2018 +0200 @@ -37,7 +37,6 @@ extern "C" int read(int fd, void* data, int sz); extern "C" int write(int fd, const void* data, int sz); extern "C" long lseekset(int fd, unsigned long sz); -extern "C" void* malloc(unsigned sz); extern "C" int puts(const char* s); extern "C" unsigned long strtol(const char *s); diff -r 45d416bfc91e -r 623f02d7e6c8 upx/receipt --- a/upx/receipt Sat Oct 06 15:26:57 2018 +0200 +++ b/upx/receipt Sat Oct 06 18:50:19 2018 +0200 @@ -1,29 +1,29 @@ # SliTaz package receipt. PACKAGE="upx" -VERSION="3.91" +VERSION="3.95" CATEGORY="system-tools" SHORT_DESC="Ultimate Packer for eXecutables (free version using UCL compression)" MAINTAINER="devl547@gmail.com" LICENSE="GPL2" -WEB_SITE="http://upx.sourceforge.net/" -TARBALL="$PACKAGE-$VERSION-src.tar.bz2" -WGET_URL="http://upx.sourceforge.net/download/$TARBALL" -PATCH="http://downloads.sourceforge.net/sevenzip/lzma465.tar.bz2" -EXTRA_SOURCE_FILES="$PATCH" +WEB_SITE="https://upx.github.io/" +TARBALL="$PACKAGE-$VERSION.tar.gz" +WGET_URL="https://github.com/upx/upx/archive/v$VERSION.tar.gz" +PATCH="https://github.com/upx/upx-lzma-sdk/archive/v$VERSION.tar.gz" +EXTRA_SOURCE_FILES="lzma-$TARBALL" DEPENDS="ucl zlib" -BUILD_DEPENDS="ucl-dev zlib-dev" +BUILD_DEPENDS="ucl-dev zlib-dev perl" # Rules to configure and make the package. compile_rules() { - [ -s $SOURCES_REPOSITORY/$(basename $PATCH) ] || - wget -P $SOURCES_REPOSITORY $PATCH - tar -xjpf $SOURCES_REPOSITORY/$(basename $PATCH) - CXXFLAGS="$CXXFLAGS -DWITH_ZLIB=1" - cd $src - UPX_LZMADIR=$src make all + [ -s $SOURCES_REPOSITORY/lzma-$TARBALL ] || + wget -O $SOURCES_REPOSITORY/lzma-$TARBALL $PATCH + tar -xf $SOURCES_REPOSITORY/lzma-$TARBALL + rm -r $src/src/lzma-sdk + mv $src/upx-lzma-sdk-$VERSION $src/src/lzma-sdk + make CHECK_WHITESPACE=/bin/true all } # Rules to gen a SliTaz package suitable for Tazpkg. @@ -40,6 +40,5 @@ cp $src/THANKS $install/usr/share/doc cp $src/NEWS $install/usr/share/doc cp $src/BUGS $install/usr/share/doc - cp $src/*.txt $install/usr/share/doc cp $src/doc/*.1 $install/usr/share/man }