Compare commits

..

54 Commits

Author SHA1 Message Date
Markus F.X.J. Oberhumer 747e8370e0 Remove debug leftover. 2007-04-26 16:20:01 +02:00
Markus F.X.J. Oberhumer 2c67875781 Pass and verify original data in all xxx_test_overlap() functions. 2007-04-26 16:15:49 +02:00
Markus F.X.J. Oberhumer c96e8a8c19 Better underflow and overflow handling in Packer::findOverlapOverhead(). 2007-04-26 13:59:01 +02:00
Markus F.X.J. Oberhumer 5f203fc082 Avoid warnings. 2007-04-26 13:13:26 +02:00
John Reiser b943c9b471 fix upx_zlib_test_overlap 2007-04-25 20:24:30 -07:00
John Reiser 1a90a1daa8 Implement upx_zlib_test_overlap() following upx_lzma_test_overlap() 2007-04-25 20:19:40 -07:00
John Reiser 72dfc743fd upx_lzma_test_overlap cleanup 2007-04-25 20:11:04 -07:00
John Reiser 465307655b Implement real upx_lzma_test_overlap().
Also make Packer::findOverlapOverhead() more pessimistic in worst case.
2007-04-25 16:11:33 -07:00
John Reiser 6ce71e6694 upx_lzma_test_overlap revert to 256 [FIXME] 2007-04-25 10:54:00 -07:00
John Reiser 7f01b3b92a upx_lzma_test_overlap() heuristic overlap_overhead up to 0xA00 2007-04-25 09:19:29 -07:00
John Reiser 76950d56b9 PackUnix::canPack allow incompressible extents in getPackHeader() 2007-04-25 09:18:31 -07:00
Markus F.X.J. Oberhumer c11e0d02b3 Added parm "allow_incompressible" to Packer::{get,read}PackHeader(). 2007-04-25 17:33:39 +02:00
Markus F.X.J. Oberhumer 4c798c1718 Use official name "armeb" instead of "armbe". 2007-04-25 16:50:51 +02:00
Markus F.X.J. Oberhumer 450d7e9ad4 Merge. 2007-04-25 16:42:41 +02:00
Markus F.X.J. Oberhumer b8ab79c83e Use offical name "arm" instead of "armel". 2007-04-25 16:42:08 +02:00
John Reiser 6934bdd533 allow unpack of incompressible extents, such as
http://www.equi4.com/pub/tk/8.4.13/tclkit-linux-x86.gz
2007-04-25 07:34:24 -07:00
John Reiser 84dedb73a5 propagate changes arm*-linux.elf-fold.h 2007-04-24 16:08:34 -07:00
John Reiser 8964aa5221 fix endian issue with .b_method (arm-linux.elf-entry.S) 2007-04-24 12:05:53 -07:00
Markus F.X.J. Oberhumer 3481ae236c Added missing armeb generated files. 2007-04-23 18:11:24 +02:00
John Reiser 46adc5f8a4 armeb-linux.kernel.vmlinux.S 2007-04-23 09:00:28 -07:00
John Reiser 5296df5899 add armeb-linux.kernel.vmlinux-head.S 2007-04-23 08:53:53 -07:00
John Reiser 13dad4be16 merge 2007-04-23 07:22:36 -07:00
John Reiser b5d0c343b4 sync src/Makefile with Markus bfb3d24c1fe7 2007-04-23 07:15:42 -07:00
Markus F.X.J. Oberhumer b00b945264 src/Makefile: avoid rebuilding .depend file on clean targets 2007-04-23 08:23:01 +02:00
John Reiser 3bda09e105 more cleanup armel etc 2007-04-22 20:04:13 -07:00
John Reiser 32d32c4e4a cleanup ARMEL etc. 2007-04-22 19:52:23 -07:00
John Reiser 497441b54e merge 2007-04-22 16:19:13 -07:00
John Reiser 9c564fd4c7 Add file formst UPX_F_LINUX_ELF32_ARMEB and normalize spelling
of ARMEL, ARMEB, armel, armeb.
2007-04-22 16:09:18 -07:00
John Reiser 0c2263d0e9 fix O_INP etc because cto8 is not pushed.
This change should have paralleled 1382:367eb149f29c
(Sun Aug 20 11:19:37 2006 -0700)
2007-04-22 15:50:24 -07:00
John Reiser 3d4d30766d merge 2007-04-22 15:24:17 -07:00
John Reiser 99d84d44fc propagate change to O_INP 2007-04-22 14:50:58 -07:00
John Reiser 41ba7077ad propagate change to O_INP 2007-04-22 14:50:58 -07:00
John Reiser 8a929a91c3 Fix O_INP etc because calling sequence changed to omit cto8.
This parallel change was forgotten at:
   changeset:   1382:367eb149f29c
   date:        Sun Aug 20 11:19:37 2006 -0700
   summary:     i386-linux.elf decompress does not need cto8
2007-04-22 14:47:08 -07:00
Markus F.X.J. Oberhumer 0604f06841 Backed out changeset 1b7b0715e0ab0d3b2e8afc96ac95d46d44bf3618 2007-04-23 07:36:46 +02:00
John Reiser 229924adf9 Fix O_INP etc because calling sequence changed to omit cto8.
This parallel change was forgotten at:
   changeset:   1382:367eb149f29c
   date:        Sun Aug 20 11:19:37 2006 -0700
   summary:     i386-linux.elf decompress does not need cto8
2007-04-22 14:47:08 -07:00
Markus F.X.J. Oberhumer df988b7c69 Bump tentative release date. 2007-04-22 16:55:41 +02:00
John Reiser e8106e2e34 propagate change to 'loadcon8' macro 2007-04-18 09:55:15 -07:00
John Reiser c21d3e24f8 fix 'loadcon8'; was bad for big-endian vmlinux ARM 2007-04-18 09:52:52 -07:00
Markus F.X.J. Oberhumer 2d87aa0753 Better ctok32 fix. 2007-04-02 18:57:42 +02:00
László Molnár b2ad4dc9a0 another fix for ctok32 2007-04-02 14:12:16 +02:00
László Molnár 370f2ea98f tmt/adam: fixed a ctok32 related bug 2007-04-01 17:31:48 +02:00
László Molnár a05ca565ff fixed a bug in ctok32 2007-04-01 17:07:43 +02:00
László Molnár 52255637f2 give an error for x86/wince files 2007-03-22 13:45:03 +01:00
Markus F.X.J. Oberhumer 0fcaa3a2f5 Work around broken scanf() implementations. 2007-03-22 07:30:16 +01:00
László Molnár 0e2fa6eb9d no need to warn for x86 wince files 2007-03-20 09:30:30 +01:00
Markus F.X.J. Oberhumer 1aac462c83 Remove trailing whitespace. 2007-03-15 07:36:58 +01:00
Markus F.X.J. Oberhumer 2a0edfd8f7 Small update from Jens. 2007-03-15 01:41:07 +01:00
László Molnár 1f59a9f846 more PS1 updates from Jens 2007-03-12 12:11:17 +01:00
László Molnár 80c20a90ea PS1 updates from Jens 2007-03-12 11:56:16 +01:00
Markus F.X.J. Oberhumer 56a35649fe Update Makefiles. 2007-03-09 07:59:50 +01:00
Markus F.X.J. Oberhumer f07cea0b79 Update help string. 2007-03-09 07:59:36 +01:00
Markus F.X.J. Oberhumer 4c1b08a281 Bump version for next release. 2007-03-08 08:26:28 +01:00
Markus F.X.J. Oberhumer 117f9eddcd src/Makefile: use an explicit .depend file. 2007-03-08 08:19:27 +01:00
Markus F.X.J. Oberhumer 7bbbfce482 Added tag for RELEASE_293. 2007-03-08 06:16:24 +01:00
60 changed files with 3522 additions and 1618 deletions
+1
View File
@@ -8,6 +8,7 @@ syntax: regexp
syntax: glob syntax: glob
.depend
Makevars.local Makevars.local
*.a *.a
+1
View File
@@ -13,3 +13,4 @@ c2e0cd4d621b047f254f2def42132a03683ff52c RELEASE_192
d276aa09033c24d0981bc3f4fee5628aecc988ad RELEASE_290 d276aa09033c24d0981bc3f4fee5628aecc988ad RELEASE_290
eb1ce56dce7dd1835964362470610925963b9043 RELEASE_110 eb1ce56dce7dd1835964362470610925963b9043 RELEASE_110
ed96891ef795bceec6b7ff3ca1ca7764431bfb39 RELEASE_191 ed96891ef795bceec6b7ff3ca1ca7764431bfb39 RELEASE_191
efa52753e366300c0e0ebe20631adcb24ed3c15b RELEASE_293
+7 -6
View File
@@ -1,17 +1,21 @@
# #
# UPX toplevel Makefile - needs GNU make 3.80 or better # UPX toplevel Makefile - needs GNU make 3.81 or better
# #
MAKEFLAGS += -rR MAKEFLAGS += -rR
.SUFFIXES: .SUFFIXES:
export SHELL = /bin/sh export SHELL = /bin/sh
ifneq ($(findstring $(firstword $(MAKE_VERSION)),3.77 3.78 3.78.1 3.79 3.79.1 3.80),)
$(error GNU make 3.81 or better is required)
endif
srcdir = . srcdir = .
top_srcdir = . top_srcdir = .
-include $(top_srcdir)/Makevars.global ./Makevars.local include $(wildcard $(top_srcdir)/Makevars.global ./Makevars.local)
# info: src/stub needs GNU make 3.81 and special build tools # info: src/stub needs special build tools
BUILD_STUB = 0 BUILD_STUB = 0
ifneq ($(wildcard $(HOME)/local/bin/bin-upx/.),) ifneq ($(wildcard $(HOME)/local/bin/bin-upx/.),)
BUILD_STUB = 1 BUILD_STUB = 1
@@ -19,9 +23,6 @@ endif
ifneq ($(wildcard $(HOME)/bin/bin-upx/.),) ifneq ($(wildcard $(HOME)/bin/bin-upx/.),)
BUILD_STUB = 1 BUILD_STUB = 1
endif endif
ifneq ($(findstring $(firstword $(MAKE_VERSION)),3.79 3.79.1 3.80),)
BUILD_STUB = 0
endif
default: default:
+3
View File
@@ -2,6 +2,9 @@
User visible changes for UPX User visible changes for UPX
================================================================== ==================================================================
Changes in 3.00 (27 Apr 2007):
* watcom/le & tmt/adam: fixed a problem when using certain filters
Changes in 2.93 beta (08 Mar 2007): Changes in 2.93 beta (08 Mar 2007):
* new formats Mach/i386 and Mach/fat support Mac OS X i686 and * new formats Mach/i386 and Mach/fat support Mac OS X i686 and
Universal binaries [i686 and PowerPC only] Universal binaries [i686 and PowerPC only]
+3
View File
@@ -684,6 +684,9 @@ Notes:
- UPX creates as default a suitable executable for CD-Mastering - UPX creates as default a suitable executable for CD-Mastering
and console transfer. For a CD-Master main executable you could also try and console transfer. For a CD-Master main executable you could also try
the special option "--boot-only" as described below. the special option "--boot-only" as described below.
It has been reported that upx packed executables are fully compatible with
the Sony PlayStation 2 (PS2, PStwo) and Sony PlayStation Portable (PSP) in
Sony PlayStation (PSone) emulation mode.
- Normally the packed files use the same memory areas like the uncompressed - Normally the packed files use the same memory areas like the uncompressed
versions, so they will not override other memory areas while unpacking. versions, so they will not override other memory areas while unpacking.
+27 -8
View File
@@ -1,5 +1,5 @@
# #
# UPX Makefile - needs GNU make 3.80 or better # UPX Makefile - needs GNU make 3.81 or better
# #
MAKEFLAGS += -rR MAKEFLAGS += -rR
@@ -7,6 +7,10 @@ MAKEFLAGS += -rR
export SHELL = /bin/sh export SHELL = /bin/sh
override e = $($1) $(EXTRA_$1) $(upx_$1) $($(basename $(notdir $@)).$1) override e = $($1) $(EXTRA_$1) $(upx_$1) $($(basename $(notdir $@)).$1)
ifneq ($(findstring $(firstword $(MAKE_VERSION)),3.77 3.78 3.78.1 3.79 3.79.1 3.80),)
$(error GNU make 3.81 or better is required)
endif
ifndef srcdir ifndef srcdir
srcdir := $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))) srcdir := $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)))
srcdir := $(shell echo '$(srcdir)' | sed 's,/*$$,,') srcdir := $(shell echo '$(srcdir)' | sed 's,/*$$,,')
@@ -14,7 +18,7 @@ endif
ifndef top_srcdir ifndef top_srcdir
top_srcdir := $(srcdir)/.. top_srcdir := $(srcdir)/..
endif endif
-include $(top_srcdir)/Makevars.global ./Makevars.local include $(wildcard $(top_srcdir)/Makevars.global ./Makevars.local)
ifneq ($(srcdir),.) ifneq ($(srcdir),.)
##$(info Info: using VPATH . $(srcdir)) ##$(info Info: using VPATH . $(srcdir))
VPATH := . $(srcdir) VPATH := . $(srcdir)
@@ -27,7 +31,6 @@ ifneq ($(findstring $(firstword $(CXX)),g++),)
USE_GNUC ?= 1 USE_GNUC ?= 1
endif endif
ifeq ($(USE_GNUC),1) ifeq ($(USE_GNUC),1)
CXXFLAGS += -MMD
ifeq ($(DEBUG),1) ifeq ($(DEBUG),1)
CXXFLAGS += -O0 -g CXXFLAGS += -O0 -g
else else
@@ -59,17 +62,26 @@ INCLUDES += -I$(UPX_LZMADIR)
endif endif
all: upx$(exeext) all: upx$(exeext) | .depend
.DELETE_ON_ERROR: upx$(exeext) $(upx_OBJECTS) .DELETE_ON_ERROR: upx$(exeext) $(upx_OBJECTS) .depend
upx$(exeext): $(upx_OBJECTS) $(upx_DEPENDENCIES) upx$(exeext): $(upx_OBJECTS) $(upx_DEPENDENCIES)
$($(notdir $@).PRE_LINK_STEP) $($(notdir $@).PRE_LINK_STEP)
$(strip $(CXXLD) $(call e,CPPFLAGS) $(call e,CXXFLAGS) $(call e,LDFLAGS) -o $@ $(upx_OBJECTS) $(call e,LDADD) $(call e,LIBS)) $(strip $(CXXLD) $(call e,CPPFLAGS) $(call e,CXXFLAGS) $(call e,LDFLAGS) -o $@ $(upx_OBJECTS) $(call e,LDADD) $(call e,LIBS))
$($(notdir $@).POST_LINK_STEP) $($(notdir $@).POST_LINK_STEP)
%.o : %.cpp %.o : %.cpp | .depend
$(strip $(CXX) $(call e,CPPFLAGS) $(call e,CXXFLAGS) -o $@ -c $<) $(strip $(CXX) $(call e,CPPFLAGS) $(call e,CXXFLAGS) -o $@ -c $<)
.depend: $(wildcard $(srcdir)/*.cpp $(srcdir)/*.h) $(MAKEFILE_LIST)
@rm -f $@
ifeq ($(USE_GNUC),1)
@echo "Updating $@"
@$(strip $(CXX) $(call e,CPPFLAGS) -MM) $(filter %.cpp,$^) > $@
else
touch $@
endif
ifeq ($(USE_GNUC),1) ifeq ($(USE_GNUC),1)
##compress_lzma$(objext) : CXXFLAGS += -O3 -fomit-frame-pointer ##compress_lzma$(objext) : CXXFLAGS += -O3 -fomit-frame-pointer
@@ -82,7 +94,14 @@ endif
mostlyclean clean distclean maintainer-clean: mostlyclean clean distclean maintainer-clean:
rm -f *.d *.map *.o *.obj *.res upx.exe upx.out upx.ttp upx$(exeext) rm -f *.d *.map *.o *.obj *.res .depend upx.exe upx.out upx.ttp upx$(exeext)
-include *.d
.PHONY: all mostlyclean clean distclean maintainer-clean .PHONY: all mostlyclean clean distclean maintainer-clean
ifeq ($(MAKECMDGOALS),mostlyclean)
else ifeq ($(MAKECMDGOALS),clean)
else ifeq ($(MAKECMDGOALS),distclean)
else ifeq ($(MAKECMDGOALS),maintainer-clean)
else
-include .depend
endif
+7 -5
View File
@@ -182,8 +182,10 @@ int upx_decompress ( const upx_bytep src, unsigned src_len,
// //
**************************************************************************/ **************************************************************************/
int upx_test_overlap ( const upx_bytep buf, unsigned src_off, int upx_test_overlap ( const upx_bytep buf,
unsigned src_len, unsigned* dst_len, const upx_bytep tbuf,
unsigned src_off, unsigned src_len,
unsigned* dst_len,
int method, int method,
const upx_compress_result_t *cresult ) const upx_compress_result_t *cresult )
{ {
@@ -201,15 +203,15 @@ int upx_test_overlap ( const upx_bytep buf, unsigned src_off,
} }
#if defined(WITH_LZMA) #if defined(WITH_LZMA)
else if (M_IS_LZMA(method)) else if (M_IS_LZMA(method))
r = upx_lzma_test_overlap(buf, src_off, src_len, dst_len, method, cresult); r = upx_lzma_test_overlap(buf, tbuf, src_off, src_len, dst_len, method, cresult);
#endif #endif
#if defined(WITH_NRV) #if defined(WITH_NRV)
else if (M_IS_NRV2B(method) || M_IS_NRV2D(method) || M_IS_NRV2E(method)) else if (M_IS_NRV2B(method) || M_IS_NRV2D(method) || M_IS_NRV2E(method))
r = upx_nrv_test_overlap(buf, src_off, src_len, dst_len, method, cresult); r = upx_nrv_test_overlap(buf, tbuf, src_off, src_len, dst_len, method, cresult);
#endif #endif
#if defined(WITH_UCL) #if defined(WITH_UCL)
else if (M_IS_NRV2B(method) || M_IS_NRV2D(method) || M_IS_NRV2E(method)) else if (M_IS_NRV2B(method) || M_IS_NRV2D(method) || M_IS_NRV2E(method))
r = upx_ucl_test_overlap(buf, src_off, src_len, dst_len, method, cresult); r = upx_ucl_test_overlap(buf, tbuf, src_off, src_len, dst_len, method, cresult);
#endif #endif
else { else {
throwInternalError("unknown decompression method"); throwInternalError("unknown decompression method");
+16 -8
View File
@@ -46,8 +46,10 @@ int upx_lzma_decompress ( const upx_bytep src, unsigned src_len,
upx_bytep dst, unsigned* dst_len, upx_bytep dst, unsigned* dst_len,
int method, int method,
const upx_compress_result_t *cresult ); const upx_compress_result_t *cresult );
int upx_lzma_test_overlap ( const upx_bytep buf, unsigned src_off, int upx_lzma_test_overlap ( const upx_bytep buf,
unsigned src_len, unsigned* dst_len, const upx_bytep tbuf,
unsigned src_off, unsigned src_len,
unsigned* dst_len,
int method, int method,
const upx_compress_result_t *cresult ); const upx_compress_result_t *cresult );
#endif #endif
@@ -65,8 +67,10 @@ int upx_nrv_decompress ( const upx_bytep src, unsigned src_len,
upx_bytep dst, unsigned* dst_len, upx_bytep dst, unsigned* dst_len,
int method, int method,
const upx_compress_result_t *cresult ); const upx_compress_result_t *cresult );
int upx_nrv_test_overlap ( const upx_bytep buf, unsigned src_off, int upx_nrv_test_overlap ( const upx_bytep buf,
unsigned src_len, unsigned* dst_len, const upx_bytep tbuf,
unsigned src_off, unsigned src_len,
unsigned* dst_len,
int method, int method,
const upx_compress_result_t *cresult ); const upx_compress_result_t *cresult );
#endif #endif
@@ -84,8 +88,10 @@ int upx_ucl_decompress ( const upx_bytep src, unsigned src_len,
upx_bytep dst, unsigned* dst_len, upx_bytep dst, unsigned* dst_len,
int method, int method,
const upx_compress_result_t *cresult ); const upx_compress_result_t *cresult );
int upx_ucl_test_overlap ( const upx_bytep buf, unsigned src_off, int upx_ucl_test_overlap ( const upx_bytep buf,
unsigned src_len, unsigned* dst_len, const upx_bytep tbuf,
unsigned src_off, unsigned src_len,
unsigned* dst_len,
int method, int method,
const upx_compress_result_t *cresult ); const upx_compress_result_t *cresult );
#endif #endif
@@ -102,8 +108,10 @@ int upx_zlib_decompress ( const upx_bytep src, unsigned src_len,
upx_bytep dst, unsigned* dst_len, upx_bytep dst, unsigned* dst_len,
int method, int method,
const upx_compress_result_t *cresult ); const upx_compress_result_t *cresult );
int upx_zlib_test_overlap ( const upx_bytep buf, unsigned src_off, int upx_zlib_test_overlap ( const upx_bytep buf,
unsigned src_len, unsigned* dst_len, const upx_bytep tbuf,
unsigned src_off, unsigned src_len,
unsigned* dst_len,
int method, int method,
const upx_compress_result_t *cresult ); const upx_compress_result_t *cresult );
#endif #endif
+19 -14
View File
@@ -28,6 +28,7 @@
#include "conf.h" #include "conf.h"
#include "compress.h" #include "compress.h"
#include "mem.h"
void lzma_compress_config_t::reset() void lzma_compress_config_t::reset()
@@ -483,28 +484,32 @@ error:
/************************************************************************* /*************************************************************************
// test_overlap // test_overlap - see <ucl/ucl.h> for semantics
**************************************************************************/ **************************************************************************/
int upx_lzma_test_overlap ( const upx_bytep buf, unsigned src_off, int upx_lzma_test_overlap ( const upx_bytep buf,
unsigned src_len, unsigned* dst_len, const upx_bytep tbuf,
unsigned src_off, unsigned src_len,
unsigned* dst_len,
int method, int method,
const upx_compress_result_t *cresult ) const upx_compress_result_t *cresult )
{ {
assert(M_IS_LZMA(method)); assert(M_IS_LZMA(method));
// FIXME - implement this MemBuffer b(src_off + src_len);
// Note that Packer::verifyOverlappingDecompression() will memcpy(b + src_off, buf + src_off, src_len);
// verify the final result in any case. unsigned saved_dst_len = *dst_len;
UNUSED(buf); int r = upx_lzma_decompress(b + src_off, src_len, b, dst_len, method, cresult);
if (r != UPX_E_OK)
unsigned overlap_overhead = src_off + src_len - *dst_len; return r;
//printf("upx_lzma_test_overlap: %d\n", overlap_overhead); if (*dst_len != saved_dst_len)
if ((int)overlap_overhead >= 256)
return UPX_E_OK;
UNUSED(cresult);
return UPX_E_ERROR; return UPX_E_ERROR;
// NOTE: there is a very tiny possibility that decompression has
// succeeded but the data is not restored correctly because of
// in-place buffer overlapping.
if (tbuf != NULL && memcmp(tbuf, b, *dst_len) != 0)
return UPX_E_ERROR;
return UPX_E_OK;
} }
+5 -2
View File
@@ -228,12 +228,15 @@ int upx_ucl_decompress ( const upx_bytep src, unsigned src_len,
// //
**************************************************************************/ **************************************************************************/
int upx_ucl_test_overlap ( const upx_bytep buf, unsigned src_off, int upx_ucl_test_overlap ( const upx_bytep buf,
unsigned src_len, unsigned* dst_len, const upx_bytep tbuf,
unsigned src_off, unsigned src_len,
unsigned* dst_len,
int method, int method,
const upx_compress_result_t *cresult ) const upx_compress_result_t *cresult )
{ {
int r; int r;
UNUSED(tbuf); // not needed for UCL
switch (method) switch (method)
{ {
+19 -14
View File
@@ -28,6 +28,7 @@
#include "conf.h" #include "conf.h"
#include "compress.h" #include "compress.h"
#include "mem.h"
void zlib_compress_config_t::reset() void zlib_compress_config_t::reset()
@@ -188,28 +189,32 @@ done:
/************************************************************************* /*************************************************************************
// test_overlap // test_overlap - see <ucl/ucl.h> for semantics
**************************************************************************/ **************************************************************************/
int upx_zlib_test_overlap ( const upx_bytep buf, unsigned src_off, int upx_zlib_test_overlap ( const upx_bytep buf,
unsigned src_len, unsigned* dst_len, const upx_bytep tbuf,
unsigned src_off, unsigned src_len,
unsigned* dst_len,
int method, int method,
const upx_compress_result_t *cresult ) const upx_compress_result_t *cresult )
{ {
assert(method == M_DEFLATE); assert(method == M_DEFLATE);
// FIXME - implement this MemBuffer b(src_off + src_len);
// Note that Packer::verifyOverlappingDecompression() will memcpy(b + src_off, buf + src_off, src_len);
// verify the final result in any case. unsigned saved_dst_len = *dst_len;
UNUSED(buf); int r = upx_zlib_decompress(b + src_off, src_len, b, dst_len, method, cresult);
if (r != UPX_E_OK)
unsigned overlap_overhead = src_off + src_len - *dst_len; return r;
//printf("upx_zlib_test_overlap: %d\n", overlap_overhead); if (*dst_len != saved_dst_len)
if ((int)overlap_overhead >= 256)
return UPX_E_OK;
UNUSED(cresult);
return UPX_E_ERROR; return UPX_E_ERROR;
// NOTE: there is a very tiny possibility that decompression has
// succeeded but the data is not restored correctly because of
// in-place buffer overlapping.
if (tbuf != NULL && memcmp(tbuf, b, *dst_len) != 0)
return UPX_E_ERROR;
return UPX_E_OK;
} }
+8 -5
View File
@@ -448,13 +448,13 @@ private:
#define UPX_F_LINUX_ELFI_i386 20 #define UPX_F_LINUX_ELFI_i386 20
#define UPX_F_WINCE_ARM_PE 21 #define UPX_F_WINCE_ARM_PE 21
#define UPX_F_LINUX_ELF64_AMD 22 #define UPX_F_LINUX_ELF64_AMD 22
#define UPX_F_LINUX_ELF32_ARMLE 23 #define UPX_F_LINUX_ELF32_ARMEL 23
#define UPX_F_BSD_i386 24 #define UPX_F_BSD_i386 24
#define UPX_F_BSD_ELF_i386 25 #define UPX_F_BSD_ELF_i386 25
#define UPX_F_BSD_SH_i386 26 #define UPX_F_BSD_SH_i386 26
#define UPX_F_VMLINUX_AMD64 27 #define UPX_F_VMLINUX_AMD64 27
#define UPX_F_VMLINUX_ARM 28 #define UPX_F_VMLINUX_ARMEL 28
#define UPX_F_MACH_i386 29 #define UPX_F_MACH_i386 29
#define UPX_F_PLAIN_TEXT 127 #define UPX_F_PLAIN_TEXT 127
@@ -463,8 +463,9 @@ private:
#define UPX_F_SOLARIS_SPARC 130 #define UPX_F_SOLARIS_SPARC 130
#define UPX_F_MACH_PPC32 131 #define UPX_F_MACH_PPC32 131
#define UPX_F_LINUX_ELFPPC32 132 #define UPX_F_LINUX_ELFPPC32 132
#define UPX_F_LINUX_ELF32_ARMBE 133 #define UPX_F_LINUX_ELF32_ARMEB 133
#define UPX_F_MACH_FAT 134 #define UPX_F_MACH_FAT 134
#define UPX_F_VMLINUX_ARMEB 135
// compression methods // compression methods
@@ -778,8 +779,10 @@ int upx_decompress ( const upx_bytep src, unsigned src_len,
upx_bytep dst, unsigned* dst_len, upx_bytep dst, unsigned* dst_len,
int method, int method,
const upx_compress_result_t *cresult ); const upx_compress_result_t *cresult );
int upx_test_overlap ( const upx_bytep buf, unsigned src_off, int upx_test_overlap ( const upx_bytep buf,
unsigned src_len, unsigned* dst_len, const upx_bytep tbuf,
unsigned src_off, unsigned src_len,
unsigned* dst_len,
int method, int method,
const upx_compress_result_t *cresult ); const upx_compress_result_t *cresult );
+2 -2
View File
@@ -205,8 +205,8 @@ void show_help(int verbose)
con_fprintf(f,"\nCompression tuning options:\n"); con_fprintf(f,"\nCompression tuning options:\n");
fg = con_fg(f,fg); fg = con_fg(f,fg);
con_fprintf(f, con_fprintf(f,
" --brute try all available compression methods & filters\n" " --brute try all available compression methods & filters [slow]\n"
" --ultra-brute try even more compression variants\n" " --ultra-brute try even more compression variants [very slow]\n"
"\n"); "\n");
fg = con_fg(f,FG_YELLOW); fg = con_fg(f,FG_YELLOW);
con_fprintf(f,"Backup options:\n"); con_fprintf(f,"Backup options:\n");
+5
View File
@@ -235,7 +235,12 @@ void ElfLinker::preprocessSymbols(char *start, char *end)
addSymbol(s, "*ABS*", value); addSymbol(s, "*ABS*", value);
assert(offset == 0); assert(offset == 0);
} }
#if 0
else if (sscanf(start, "%x%*8c %1023s %*x %1023s", else if (sscanf(start, "%x%*8c %1023s %*x %1023s",
#else
// work around broken scanf implementations
else if (sscanf(start, "%x%*c%*c%*c%*c%*c%*c%*c%*c %1023s %*x %1023s",
#endif
&offset, section, symbol) == 3) &offset, section, symbol) == 3)
{ {
char *s = strstr(start, symbol); char *s = strstr(start, symbol);
+2 -1
View File
@@ -76,10 +76,11 @@ const int *PackDjgpp2::getFilters() const
unsigned PackDjgpp2::findOverlapOverhead(const upx_bytep buf, unsigned PackDjgpp2::findOverlapOverhead(const upx_bytep buf,
const upx_bytep tbuf,
unsigned range, unsigned range,
unsigned upper_limit) const unsigned upper_limit) const
{ {
unsigned o = super::findOverlapOverhead(buf, range, upper_limit); unsigned o = super::findOverlapOverhead(buf, tbuf, range, upper_limit);
o = (o + 0x3ff) &~ 0x1ff; o = (o + 0x3ff) &~ 0x1ff;
return o; return o;
} }
+1
View File
@@ -58,6 +58,7 @@ protected:
virtual int readFileHeader(); virtual int readFileHeader();
virtual unsigned findOverlapOverhead(const upx_bytep buf, virtual unsigned findOverlapOverhead(const upx_bytep buf,
const upx_bytep tbuf,
unsigned range = 0, unsigned range = 0,
unsigned upper_limit = ~0u) const; unsigned upper_limit = ~0u) const;
virtual void buildLoader(const Filter *ft); virtual void buildLoader(const Filter *ft);
+4 -4
View File
@@ -416,8 +416,8 @@ class PackLinuxElf32armLe : public PackLinuxElf32Le
public: public:
PackLinuxElf32armLe(InputFile *f); PackLinuxElf32armLe(InputFile *f);
virtual ~PackLinuxElf32armLe(); virtual ~PackLinuxElf32armLe();
virtual int getFormat() const { return UPX_F_LINUX_ELF32_ARMLE; } virtual int getFormat() const { return UPX_F_LINUX_ELF32_ARMEL; }
virtual const char *getName() const { return "linux/armLE"; } virtual const char *getName() const { return "linux/armel"; }
virtual const char *getFullName(const options_t *) const { return "arm-linux.elf"; } virtual const char *getFullName(const options_t *) const { return "arm-linux.elf"; }
virtual const int *getFilters() const; virtual const int *getFilters() const;
@@ -436,8 +436,8 @@ class PackLinuxElf32armBe : public PackLinuxElf32Be
public: public:
PackLinuxElf32armBe(InputFile *f); PackLinuxElf32armBe(InputFile *f);
virtual ~PackLinuxElf32armBe(); virtual ~PackLinuxElf32armBe();
virtual int getFormat() const { return UPX_F_LINUX_ELF32_ARMBE; } virtual int getFormat() const { return UPX_F_LINUX_ELF32_ARMEB; }
virtual const char *getName() const { return "linux/armBE"; } virtual const char *getName() const { return "linux/armeb"; }
virtual const char *getFullName(const options_t *) const { return "armeb-linux.elf"; } virtual const char *getFullName(const options_t *) const { return "armeb-linux.elf"; }
virtual const int *getFilters() const; virtual const int *getFilters() const;
+18 -7
View File
@@ -318,6 +318,7 @@ void PackPs1::buildLoader(const Filter *)
sa_tmp += overlap = ALIGN_UP((ph.overlap_overhead - sa_tmp), 4u); sa_tmp += overlap = ALIGN_UP((ph.overlap_overhead - sa_tmp), 4u);
} }
if (isCon || !isCon && M_IS_LZMA(ph.method))
foundBss = findBssSection(); foundBss = findBssSection();
if (M_IS_LZMA(ph.method) && !buildPart2) if (M_IS_LZMA(ph.method) && !buildPart2)
@@ -370,16 +371,20 @@ void PackPs1::buildLoader(const Filter *)
else else
{ {
if (M_IS_LZMA(ph.method)) if (M_IS_LZMA(ph.method))
addLoader("cdb.start.lzma", "pad.code", "cdb.entry.lzma", method, "cdb.lzma.cpr", addLoader(!foundBss ? "cdb.start.lzma" : "bss.cdb.start.lzma", "pad.code",
!foundBss ? "cdb.entry.lzma" : "bss.cdb.entry.lzma",
method, "cdb.lzma.cpr",
ih.tx_ptr & 0xffff ? "dec.ptr" : "dec.ptr.hi", ih.tx_ptr & 0xffff ? "dec.ptr" : "dec.ptr.hi",
"lzma.exec", NULL); "lzma.exec", NULL);
else else
{
assert(foundBss != true);
addLoader("cdb.start", "pad.code", "cdb.entry", addLoader("cdb.start", "pad.code", "cdb.entry",
ih.tx_ptr & 0xffff ? "cdb.dec.ptr" : "cdb.dec.ptr.hi", ih.tx_ptr & 0xffff ? "cdb.dec.ptr" : "cdb.dec.ptr.hi",
method, method,
sa_cnt ? sa_cnt > (0x10000 << 2) ? "memset.long" : "memset.short" : "", sa_cnt ? sa_cnt > (0x10000 << 2) ? "memset.long" : "memset.short" : "",
!foundBss ? "cdb.exit" : "bss.exit", "cdb.exit", NULL);
"pad.code", NULL); }
} }
addLoader("UPX1HEAD", "IDENTSTR", NULL); addLoader("UPX1HEAD", "IDENTSTR", NULL);
} }
@@ -554,7 +559,9 @@ void PackPs1::pack(OutputFile *fo)
} }
else else
{ {
d_len = (lsize - h_len) - getLoaderSectionStart(M_IS_LZMA(ph.method) ? "cdb.entry.lzma" : "cdb.entry"); const char* entry_lzma = !foundBss ? "cdb.entry.lzma" : "bss.cdb.entry.lzma";
d_len = (lsize - h_len) - getLoaderSectionStart(M_IS_LZMA(ph.method) ? entry_lzma : "cdb.entry");
e_len = (lsize - d_len) - h_len; e_len = (lsize - d_len) - h_len;
} }
@@ -578,7 +585,7 @@ void PackPs1::pack(OutputFile *fo)
unsigned pad = 0; unsigned pad = 0;
if (!opt->ps1_exe.no_align) if (!opt->ps1_exe.no_align || !isCon)
{ {
pad = oh.tx_len; pad = oh.tx_len;
oh.tx_len = ALIGN_UP(oh.tx_len, CD_SEC); oh.tx_len = ALIGN_UP(oh.tx_len, CD_SEC);
@@ -611,8 +618,12 @@ void PackPs1::pack(OutputFile *fo)
linker->defineSymbol("PSVR", FIX_PSVR); linker->defineSymbol("PSVR", FIX_PSVR);
linker->defineSymbol("CPDO", comp_data_start); linker->defineSymbol("CPDO", comp_data_start);
if (M_IS_LZMA(ph.method)) if (M_IS_LZMA(ph.method))
linker->defineSymbol("lzma_cpr", getLoaderSectionStart("lzma.exec") {
- getLoaderSectionStart("cdb.entry.lzma")); unsigned entry_lzma = getLoaderSectionStart( !foundBss ? "cdb.entry.lzma" :
"bss.cdb.entry.lzma");
linker->defineSymbol("lzma_cpr", getLoaderSectionStart("lzma.exec") - entry_lzma);
}
} }
relocateLoader(); relocateLoader();
+2 -1
View File
@@ -67,11 +67,12 @@ const int *PackTmt::getFilters() const
unsigned PackTmt::findOverlapOverhead(const upx_bytep buf, unsigned PackTmt::findOverlapOverhead(const upx_bytep buf,
const upx_bytep tbuf,
unsigned range, unsigned range,
unsigned upper_limit) const unsigned upper_limit) const
{ {
// make sure the decompressor will be paragraph aligned // make sure the decompressor will be paragraph aligned
unsigned o = super::findOverlapOverhead(buf, range, upper_limit); unsigned o = super::findOverlapOverhead(buf, tbuf, range, upper_limit);
o = ((o + 0x20) &~ 0xf) - (ph.u_len & 0xf); o = ((o + 0x20) &~ 0xf) - (ph.u_len & 0xf);
return o; return o;
} }
+1
View File
@@ -56,6 +56,7 @@ protected:
virtual int readFileHeader(); virtual int readFileHeader();
virtual unsigned findOverlapOverhead(const upx_bytep buf, virtual unsigned findOverlapOverhead(const upx_bytep buf,
const upx_bytep tbuf,
unsigned range = 0, unsigned range = 0,
unsigned upper_limit = ~0u) const; unsigned upper_limit = ~0u) const;
virtual void buildLoader(const Filter *ft); virtual void buildLoader(const Filter *ft);
+7 -3
View File
@@ -173,8 +173,10 @@ void PackUnix::pack2(OutputFile *fo, Filter &ft)
compressWithFilters(&ft, OVERHEAD, NULL_cconf, filter_strategy); compressWithFilters(&ft, OVERHEAD, NULL_cconf, filter_strategy);
if (ph.c_len < ph.u_len) { if (ph.c_len < ph.u_len) {
const upx_bytep tbuf = NULL;
if (ft.id == 0) tbuf = ibuf;
ph.overlap_overhead = OVERHEAD; ph.overlap_overhead = OVERHEAD;
if (!testOverlappingDecompression(obuf, ph.overlap_overhead)) { if (!testOverlappingDecompression(obuf, tbuf, ph.overlap_overhead)) {
// not in-place compressible // not in-place compressible
ph.c_len = ph.u_len; ph.c_len = ph.u_len;
} }
@@ -353,8 +355,10 @@ void PackUnix::packExtent(
} }
if (ph.c_len < ph.u_len) { if (ph.c_len < ph.u_len) {
const upx_bytep tbuf = NULL;
if (ft == NULL || ft->id == 0) tbuf = ibuf;
ph.overlap_overhead = OVERHEAD; ph.overlap_overhead = OVERHEAD;
if (!testOverlappingDecompression(obuf, ph.overlap_overhead)) { if (!testOverlappingDecompression(obuf, tbuf, ph.overlap_overhead)) {
// not in-place compressible // not in-place compressible
ph.c_len = ph.u_len; ph.c_len = ph.u_len;
} }
@@ -499,7 +503,7 @@ int PackUnix::canUnpack()
fi->seek(-bufsize, SEEK_END); fi->seek(-bufsize, SEEK_END);
fi->readx(buf, bufsize); fi->readx(buf, bufsize);
if (!getPackHeader(buf, bufsize)) if (!getPackHeader(buf, bufsize, true)) // allow incompressible extents
return false; return false;
int l = ph.buf_offset + ph.getPackHeaderSize(); int l = ph.buf_offset + ph.getPackHeaderSize();
+101 -8
View File
@@ -44,6 +44,8 @@ static const
#include "stub/amd64-linux.kernel.vmlinux.h" #include "stub/amd64-linux.kernel.vmlinux.h"
static const static const
#include "stub/arm-linux.kernel.vmlinux.h" #include "stub/arm-linux.kernel.vmlinux.h"
static const
#include "stub/armeb-linux.kernel.vmlinux.h"
/************************************************************************* /*************************************************************************
@@ -547,18 +549,29 @@ const int *PackVmlinuxI386::getFilters() const
return filters; return filters;
} }
const int *PackVmlinuxARM::getCompressionMethods(int method, int level) const const int *PackVmlinuxARMEL::getCompressionMethods(int method, int level) const
{
return Packer::getDefaultCompressionMethods_8(method, level);
}
const int *PackVmlinuxARMEB::getCompressionMethods(int method, int level) const
{ {
return Packer::getDefaultCompressionMethods_8(method, level); return Packer::getDefaultCompressionMethods_8(method, level);
} }
const int *PackVmlinuxARM::getFilters() const const int *PackVmlinuxARMEL::getFilters() const
{ {
static const int f50[] = { 0x50, FT_END }; static const int f50[] = { 0x50, FT_END };
return f50; return f50;
} }
const int *PackVmlinuxARMEB::getFilters() const
{
static const int f51[] = { 0x51, FT_END };
return f51;
}
// //
// Examples as of 2004-07-16 [readelf --segments vmlinux # before fiddling]: // Examples as of 2004-07-16 [readelf --segments vmlinux # before fiddling]:
// //
@@ -646,18 +659,29 @@ void PackVmlinuxAMD64::buildLoader(const Filter *ft)
"LINUX992,IDENTSTR,UPX1HEAD", NULL); "LINUX992,IDENTSTR,UPX1HEAD", NULL);
} }
bool PackVmlinuxARM::is_valid_e_entry(Addr e_entry) bool PackVmlinuxARMEL::is_valid_e_entry(Addr e_entry)
{ {
return 0xc0008000==e_entry; return 0xc0008000==e_entry;
} }
Linker* PackVmlinuxARM::newLinker() const bool PackVmlinuxARMEB::is_valid_e_entry(Addr e_entry)
{
return 0xc0008000==e_entry;
}
Linker* PackVmlinuxARMEL::newLinker() const
{ {
return new ElfLinkerArmLE; return new ElfLinkerArmLE;
} }
Linker* PackVmlinuxARMEB::newLinker() const
{
return new ElfLinkerArmBE;
}
void PackVmlinuxARM::buildLoader(const Filter *ft)
void PackVmlinuxARMEL::buildLoader(const Filter *ft)
{ {
// prepare loader // prepare loader
initLoader(stub_arm_linux_kernel_vmlinux, sizeof(stub_arm_linux_kernel_vmlinux)); initLoader(stub_arm_linux_kernel_vmlinux, sizeof(stub_arm_linux_kernel_vmlinux));
@@ -679,6 +703,28 @@ void PackVmlinuxARM::buildLoader(const Filter *ft)
addLoader("IDENTSTR,UPX1HEAD", NULL); addLoader("IDENTSTR,UPX1HEAD", NULL);
} }
void PackVmlinuxARMEB::buildLoader(const Filter *ft)
{
// prepare loader
initLoader(stub_armeb_linux_kernel_vmlinux, sizeof(stub_armeb_linux_kernel_vmlinux));
addLoader("LINUX000", NULL);
if (ft->id) {
assert(ft->calls > 0);
addLoader("LINUX010", NULL);
}
addLoader("LINUX020", NULL);
if (ft->id) {
addFilter32(ft->id);
}
addLoader("LINUX030", NULL);
if (ph.method == M_NRV2E_8) addLoader("NRV2E", NULL);
else if (ph.method == M_NRV2B_8) addLoader("NRV2B", NULL);
else if (ph.method == M_NRV2D_8) addLoader("NRV2D", NULL);
else if (M_IS_LZMA(ph.method)) addLoader("LZMA_ELF00,LZMA_DEC10,LZMA_DEC30", NULL);
else throwBadLoader();
addLoader("IDENTSTR,UPX1HEAD", NULL);
}
static const static const
#include "stub/i386-linux.kernel.vmlinux-head.h" #include "stub/i386-linux.kernel.vmlinux-head.h"
@@ -686,6 +732,8 @@ static const
#include "stub/amd64-linux.kernel.vmlinux-head.h" #include "stub/amd64-linux.kernel.vmlinux-head.h"
static const static const
#include "stub/arm-linux.kernel.vmlinux-head.h" #include "stub/arm-linux.kernel.vmlinux-head.h"
static const
#include "stub/armeb-linux.kernel.vmlinux-head.h"
unsigned PackVmlinuxI386::write_vmlinux_head( unsigned PackVmlinuxI386::write_vmlinux_head(
OutputFile *const fo, OutputFile *const fo,
@@ -719,7 +767,15 @@ printf("UnCompressed length=0x%x\n", ph.u_len);
return sizeof(stub_amd64_linux_kernel_vmlinux_head); return sizeof(stub_amd64_linux_kernel_vmlinux_head);
} }
void PackVmlinuxARM::defineDecompressorSymbols() void PackVmlinuxARMEL::defineDecompressorSymbols()
{
super::defineDecompressorSymbols();
linker->defineSymbol( "COMPRESSED_LENGTH", ph.c_len);
linker->defineSymbol("UNCOMPRESSED_LENGTH", ph.u_len);
linker->defineSymbol("METHOD", ph.method);
}
void PackVmlinuxARMEB::defineDecompressorSymbols()
{ {
super::defineDecompressorSymbols(); super::defineDecompressorSymbols();
linker->defineSymbol( "COMPRESSED_LENGTH", ph.c_len); linker->defineSymbol( "COMPRESSED_LENGTH", ph.c_len);
@@ -744,7 +800,7 @@ void PackVmlinuxAMD64::defineDecompressorSymbols()
linker->defineSymbol("PHYSICAL_START", phdri[0].p_paddr); linker->defineSymbol("PHYSICAL_START", phdri[0].p_paddr);
} }
unsigned PackVmlinuxARM::write_vmlinux_head( unsigned PackVmlinuxARMEL::write_vmlinux_head(
OutputFile *const fo, OutputFile *const fo,
Shdr *const stxt Shdr *const stxt
) )
@@ -766,8 +822,30 @@ unsigned PackVmlinuxARM::write_vmlinux_head(
return sizeof(stub_arm_linux_kernel_vmlinux_head); return sizeof(stub_arm_linux_kernel_vmlinux_head);
} }
unsigned PackVmlinuxARMEB::write_vmlinux_head(
OutputFile *const fo,
Shdr *const stxt
)
{
// First word from vmlinux-head.S
fo->write(&stub_armeb_linux_kernel_vmlinux_head[0], 4);
bool PackVmlinuxARM::has_valid_vmlinux_head() // Second word
U32 tmp_u32;
unsigned const t = (0xff000000 &
BeLePolicy::get32(&stub_armeb_linux_kernel_vmlinux_head[4]))
| (0x00ffffff & (0u - 1 + ((3+ ph.c_len)>>2)));
tmp_u32 = t;
fo->write(&tmp_u32, 4);
stxt->sh_addralign = 4;
stxt->sh_size += sizeof(stub_armeb_linux_kernel_vmlinux_head);
return sizeof(stub_armeb_linux_kernel_vmlinux_head);
}
bool PackVmlinuxARMEL::has_valid_vmlinux_head()
{ {
U32 buf[2]; U32 buf[2];
fi->seek(p_text->sh_offset + sizeof(stub_arm_linux_kernel_vmlinux_head) -8, SEEK_SET); fi->seek(p_text->sh_offset + sizeof(stub_arm_linux_kernel_vmlinux_head) -8, SEEK_SET);
@@ -781,6 +859,20 @@ bool PackVmlinuxARM::has_valid_vmlinux_head()
return false; return false;
} }
bool PackVmlinuxARMEB::has_valid_vmlinux_head()
{
U32 buf[2];
fi->seek(p_text->sh_offset + sizeof(stub_armeb_linux_kernel_vmlinux_head) -8, SEEK_SET);
fi->readx(buf, sizeof(buf));
//unsigned const word0 = buf[0];
unsigned const word1 = buf[1];
if (0xeb==(word1>>24)
&& (0x00ffffff& word1)==(0u - 1 + ((3+ ph.c_len)>>2))) {
return true;
}
return false;
}
bool PackVmlinuxI386::has_valid_vmlinux_head() bool PackVmlinuxI386::has_valid_vmlinux_head()
{ {
unsigned char buf[5]; unsigned char buf[5];
@@ -1058,6 +1150,7 @@ Linker* PackVmlinuxAMD64::newLinker() const
// instantiate instances // instantiate instances
template class PackVmlinuxBase<ElfClass_LE32>; template class PackVmlinuxBase<ElfClass_LE32>;
template class PackVmlinuxBase<ElfClass_BE32>;
template class PackVmlinuxBase<ElfClass_LE64>; template class PackVmlinuxBase<ElfClass_LE64>;
+28 -4
View File
@@ -119,14 +119,14 @@ protected:
}; };
class PackVmlinuxARM : public PackVmlinuxBase<ElfClass_LE32> class PackVmlinuxARMEL : public PackVmlinuxBase<ElfClass_LE32>
{ {
typedef PackVmlinuxBase<ElfClass_LE32> super; typedef PackVmlinuxBase<ElfClass_LE32> super;
public: public:
PackVmlinuxARM(InputFile *f) : super(f, Ehdr::EM_ARM, PackVmlinuxARMEL(InputFile *f) : super(f, Ehdr::EM_ARM,
Ehdr::ELFCLASS32, Ehdr::ELFDATA2LSB, "decompress_kernel") { } Ehdr::ELFCLASS32, Ehdr::ELFDATA2LSB, "decompress_kernel") { }
virtual int getFormat() const { return UPX_F_VMLINUX_ARM; } virtual int getFormat() const { return UPX_F_VMLINUX_ARMEL; }
virtual const char *getName() const { return "vmlinux/ARM"; } virtual const char *getName() const { return "vmlinux/armel"; }
virtual const char *getFullName(const options_t *) const { return "arm-linux.kernel.vmlinux"; } virtual const char *getFullName(const options_t *) const { return "arm-linux.kernel.vmlinux"; }
virtual const int *getCompressionMethods(int method, int level) const; virtual const int *getCompressionMethods(int method, int level) const;
virtual const int *getFilters() const; virtual const int *getFilters() const;
@@ -143,6 +143,30 @@ protected:
); );
}; };
class PackVmlinuxARMEB : public PackVmlinuxBase<ElfClass_BE32>
{
typedef PackVmlinuxBase<ElfClass_BE32> super;
public:
PackVmlinuxARMEB(InputFile *f) : super(f, Ehdr::EM_ARM,
Ehdr::ELFCLASS32, Ehdr::ELFDATA2MSB, "decompress_kernel") { }
virtual int getFormat() const { return UPX_F_VMLINUX_ARMEB; }
virtual const char *getName() const { return "vmlinux/armeb"; }
virtual const char *getFullName(const options_t *) const { return "armeb-linux.kernel.vmlinux"; }
virtual const int *getCompressionMethods(int method, int level) const;
virtual const int *getFilters() const;
protected:
virtual void buildLoader(const Filter *ft);
virtual void defineDecompressorSymbols();
virtual Linker* newLinker() const;
virtual bool is_valid_e_entry(Addr);
virtual bool has_valid_vmlinux_head();
virtual unsigned write_vmlinux_head(
OutputFile *const fo,
Shdr *const stxt
);
};
class PackVmlinuxAMD64 : public PackVmlinuxBase<ElfClass_LE64> class PackVmlinuxAMD64 : public PackVmlinuxBase<ElfClass_LE64>
{ {
+5 -1
View File
@@ -607,7 +607,8 @@ void PackW32Pe::pack(OutputFile *fo)
(ih.cpu < 0x14c || ih.cpu > 0x150) (ih.cpu < 0x14c || ih.cpu > 0x150)
|| (ih.opthdrsize != 0xe0) || (ih.opthdrsize != 0xe0)
|| ((ih.flags & EXECUTABLE) == 0) || ((ih.flags & EXECUTABLE) == 0)
|| (ih.subsystem != 2 && ih.subsystem != 3 && ih.subsystem != 1) || (ih.subsystem != 2 && ih.subsystem != 3
&& ih.subsystem != 1 && ih.subsystem != 9)
|| (ih.entry == 0 && !isdll) || (ih.entry == 0 && !isdll)
|| (ih.ddirsentries != 16) || (ih.ddirsentries != 16)
|| IDSIZE(PEDIR_EXCEPTION) // is this used on i386? || IDSIZE(PEDIR_EXCEPTION) // is this used on i386?
@@ -615,6 +616,9 @@ void PackW32Pe::pack(OutputFile *fo)
)) ))
throwCantPack("unexpected value in PE header (try --force)"); throwCantPack("unexpected value in PE header (try --force)");
if (ih.subsystem == 9)
throwCantPack("x86/wince files are not yet supported");
if (IDSIZE(PEDIR_SEC)) if (IDSIZE(PEDIR_SEC))
IDSIZE(PEDIR_SEC) = IDADDR(PEDIR_SEC) = 0; IDSIZE(PEDIR_SEC) = IDADDR(PEDIR_SEC) = 0;
if (IDSIZE(PEDIR_COMRT)) if (IDSIZE(PEDIR_COMRT))
+26 -17
View File
@@ -386,13 +386,16 @@ void Packer::decompress(const upx_bytep in, upx_bytep out,
// overlapping decompression // overlapping decompression
**************************************************************************/ **************************************************************************/
bool ph_testOverlappingDecompression(const PackHeader &ph, const upx_bytep buf, bool ph_testOverlappingDecompression(const PackHeader &ph,
const upx_bytep buf,
const upx_bytep tbuf,
unsigned overlap_overhead) unsigned overlap_overhead)
{ {
if (ph.c_len >= ph.u_len) if (ph.c_len >= ph.u_len)
return false; return false;
assert((int)overlap_overhead >= 0); assert((int) overlap_overhead >= 0);
assert((int) (ph.u_len + overlap_overhead) >= 0);
// Because upx_test_overlap() does not use the asm_fast decompressor // Because upx_test_overlap() does not use the asm_fast decompressor
// we must account for extra 3 bytes that asm_fast does use, // we must account for extra 3 bytes that asm_fast does use,
@@ -406,16 +409,17 @@ bool ph_testOverlappingDecompression(const PackHeader &ph, const upx_bytep buf,
unsigned src_off = ph.u_len + overlap_overhead - ph.c_len; unsigned src_off = ph.u_len + overlap_overhead - ph.c_len;
unsigned new_len = ph.u_len; unsigned new_len = ph.u_len;
int r = upx_test_overlap(buf - src_off, src_off, int r = upx_test_overlap(buf - src_off, tbuf,
ph.c_len, &new_len, ph.method, &ph.compress_result); src_off, ph.c_len, &new_len,
ph.method, &ph.compress_result);
return (r == UPX_E_OK && new_len == ph.u_len); return (r == UPX_E_OK && new_len == ph.u_len);
} }
bool Packer::testOverlappingDecompression(const upx_bytep buf, bool Packer::testOverlappingDecompression(const upx_bytep buf, const upx_bytep tbuf,
unsigned overlap_overhead) const unsigned overlap_overhead) const
{ {
return ph_testOverlappingDecompression(ph, buf, overlap_overhead); return ph_testOverlappingDecompression(ph, buf, tbuf, overlap_overhead);
} }
@@ -474,6 +478,7 @@ void Packer::verifyOverlappingDecompression(upx_bytep o_ptr, unsigned o_size, Fi
**************************************************************************/ **************************************************************************/
unsigned Packer::findOverlapOverhead(const upx_bytep buf, unsigned Packer::findOverlapOverhead(const upx_bytep buf,
const upx_bytep tbuf,
unsigned range, unsigned range,
unsigned upper_limit) const unsigned upper_limit) const
{ {
@@ -481,7 +486,7 @@ unsigned Packer::findOverlapOverhead(const upx_bytep buf,
// prepare to deal with very pessimistic values // prepare to deal with very pessimistic values
unsigned low = 1; unsigned low = 1;
unsigned high = UPX_MIN(ph.u_len / 4 + 512, upper_limit); unsigned high = UPX_MIN(ph.u_len + 512, upper_limit);
// but be optimistic for first try (speedup) // but be optimistic for first try (speedup)
unsigned m = UPX_MIN(16u, high); unsigned m = UPX_MIN(16u, high);
// //
@@ -493,21 +498,23 @@ unsigned Packer::findOverlapOverhead(const upx_bytep buf,
assert(m >= low); assert(m <= high); assert(m >= low); assert(m <= high);
assert(m < overhead || overhead == 0); assert(m < overhead || overhead == 0);
nr++; nr++;
bool success = testOverlappingDecompression(buf, m); bool success = testOverlappingDecompression(buf, tbuf, m);
//printf("testOverlapOverhead: %d %d -> %d\n", nr, m, (int)success); //printf("testOverlapOverhead(%d): %d %d: %d -> %d\n", nr, low, high, m, (int)success);
if (success) if (success)
{ {
overhead = m; overhead = m;
// Succeed early if m lies in [low .. low+range-1], i.e. if // Succeed early if m lies in [low .. low+range-1], i.e. if
// if the range of the current interval is <= range. // if the range of the current interval is <= range.
//if (m <= low + range - 1) // if (m <= low + range - 1)
if (m + 1 <= low + range) // avoid underflow // if (m < low + range)
if (m - low < range) // avoid underflow
break; break;
high = m - 1; high = m - 1;
} }
else else
low = m + 1; low = m + 1;
m = (low + high) / 2; ////m = (low + high) / 2;
m = (low & high) + ((low ^ high) >> 1); // avoid overflow
} }
//printf("findOverlapOverhead: %d (%d tries)\n", overhead, nr); //printf("findOverlapOverhead: %d (%d tries)\n", overhead, nr);
@@ -684,7 +691,7 @@ int Packer::patchPackHeader(void *b, int blen)
} }
bool Packer::getPackHeader(void *b, int blen) bool Packer::getPackHeader(void *b, int blen, bool allow_incompressible)
{ {
if (!ph.fillPackHeader((unsigned char *)b, blen)) if (!ph.fillPackHeader((unsigned char *)b, blen))
return false; return false;
@@ -697,7 +704,9 @@ bool Packer::getPackHeader(void *b, int blen)
if (!testUnpackVersion(ph.version)) if (!testUnpackVersion(ph.version))
return false; return false;
if (ph.c_len >= ph.u_len || (off_t)ph.c_len >= file_size if (ph.c_len > ph.u_len
|| (ph.c_len == ph.u_len && !allow_incompressible)
|| (off_t)ph.c_len >= file_size
|| ph.version <= 0 || ph.version >= 0xff) || ph.version <= 0 || ph.version >= 0xff)
throwCantUnpack("header corrupted"); throwCantUnpack("header corrupted");
else if ((off_t)ph.u_len > ph.u_file_size) else if ((off_t)ph.u_len > ph.u_file_size)
@@ -722,14 +731,14 @@ bool Packer::getPackHeader(void *b, int blen)
} }
bool Packer::readPackHeader(int len) bool Packer::readPackHeader(int len, bool allow_incompressible)
{ {
assert((int)len > 0); assert((int)len > 0);
MemBuffer buf(len); MemBuffer buf(len);
len = fi->read(buf, len); len = fi->read(buf, len);
if (len <= 0) if (len <= 0)
return false; return false;
return getPackHeader(buf, len); return getPackHeader(buf, len, allow_incompressible);
} }
@@ -1409,7 +1418,7 @@ void Packer::compressWithFilters(upx_bytep i_ptr, unsigned i_len,
if (ph.c_len + lsize + hdr_c_len <= best_ph.c_len + best_ph_lsize + best_hdr_c_len) if (ph.c_len + lsize + hdr_c_len <= best_ph.c_len + best_ph_lsize + best_hdr_c_len)
{ {
// get results // get results
ph.overlap_overhead = findOverlapOverhead(o_tmp, overlap_range); ph.overlap_overhead = findOverlapOverhead(o_tmp, i_ptr, overlap_range);
buildLoader(&ft); buildLoader(&ft);
lsize = getLoaderSize(); lsize = getLoaderSize();
assert(lsize > 0); assert(lsize > 0);
+4 -2
View File
@@ -203,9 +203,11 @@ protected:
// util for verifying overlapping decompresion // util for verifying overlapping decompresion
// non-destructive test // non-destructive test
virtual bool testOverlappingDecompression(const upx_bytep buf, virtual bool testOverlappingDecompression(const upx_bytep buf,
const upx_bytep tbuf,
unsigned overlap_overhead) const; unsigned overlap_overhead) const;
// non-destructive find // non-destructive find
virtual unsigned findOverlapOverhead(const upx_bytep buf, virtual unsigned findOverlapOverhead(const upx_bytep buf,
const upx_bytep tbuf,
unsigned range = 0, unsigned range = 0,
unsigned upper_limit = ~0u) const; unsigned upper_limit = ~0u) const;
// destructive decompress + verify // destructive decompress + verify
@@ -214,8 +216,8 @@ protected:
// packheader handling // packheader handling
virtual int patchPackHeader(void *b, int blen); virtual int patchPackHeader(void *b, int blen);
virtual bool getPackHeader(void *b, int blen); virtual bool getPackHeader(void *b, int blen, bool allow_incompressible=false);
virtual bool readPackHeader(int len); virtual bool readPackHeader(int len, bool allow_incompressible=false);
virtual void checkAlreadyPacked(const void *b, int blen); virtual void checkAlreadyPacked(const void *b, int blen);
// loader core // loader core
+8 -6
View File
@@ -208,11 +208,12 @@ const char *Packer::getDecompressorSections() const
if (UPX_F_LINUX_ELF_i386 ==ph.format if (UPX_F_LINUX_ELF_i386 ==ph.format
|| UPX_F_LINUX_ELFI_i386 ==ph.format || UPX_F_LINUX_ELFI_i386 ==ph.format
|| UPX_F_LINUX_ELF64_AMD ==ph.format || UPX_F_LINUX_ELF64_AMD ==ph.format
|| UPX_F_LINUX_ELF32_ARMLE==ph.format || UPX_F_LINUX_ELF32_ARMEL==ph.format
|| UPX_F_LINUX_ELFPPC32 ==ph.format || UPX_F_LINUX_ELFPPC32 ==ph.format
|| UPX_F_LINUX_ELF32_ARMBE==ph.format || UPX_F_LINUX_ELF32_ARMEB==ph.format
|| UPX_F_BSD_ELF_i386 ==ph.format || UPX_F_BSD_ELF_i386 ==ph.format
|| UPX_F_VMLINUX_ARM ==ph.format || UPX_F_VMLINUX_ARMEL ==ph.format
|| UPX_F_VMLINUX_ARMEB ==ph.format
|| UPX_F_MACH_PPC32 ==ph.format || UPX_F_MACH_PPC32 ==ph.format
|| UPX_F_MACH_i386 ==ph.format || UPX_F_MACH_i386 ==ph.format
) { ) {
@@ -244,11 +245,12 @@ void Packer::defineDecompressorSymbols()
if (UPX_F_LINUX_ELF_i386 ==ph.format if (UPX_F_LINUX_ELF_i386 ==ph.format
|| UPX_F_LINUX_ELFI_i386 ==ph.format || UPX_F_LINUX_ELFI_i386 ==ph.format
|| UPX_F_LINUX_ELF64_AMD ==ph.format || UPX_F_LINUX_ELF64_AMD ==ph.format
|| UPX_F_LINUX_ELF32_ARMLE==ph.format || UPX_F_LINUX_ELF32_ARMEL==ph.format
|| UPX_F_LINUX_ELFPPC32 ==ph.format || UPX_F_LINUX_ELFPPC32 ==ph.format
|| UPX_F_LINUX_ELF32_ARMBE==ph.format || UPX_F_LINUX_ELF32_ARMEB==ph.format
|| UPX_F_BSD_ELF_i386 ==ph.format || UPX_F_BSD_ELF_i386 ==ph.format
|| UPX_F_VMLINUX_ARM ==ph.format || UPX_F_VMLINUX_ARMEL ==ph.format
|| UPX_F_VMLINUX_ARMEB ==ph.format
|| UPX_F_MACH_PPC32 ==ph.format || UPX_F_MACH_PPC32 ==ph.format
|| UPX_F_MACH_i386 ==ph.format || UPX_F_MACH_i386 ==ph.format
) { ) {
+3 -1
View File
@@ -192,7 +192,9 @@ Packer* PackMaster::visitAllPackers(visit_func_t func, InputFile *f, const optio
// //
// linux kernel // linux kernel
// //
if ((p = func(new PackVmlinuxARM(f), user)) != NULL) if ((p = func(new PackVmlinuxARMEL(f), user)) != NULL)
return p;
if ((p = func(new PackVmlinuxARMEB(f), user)) != NULL)
return p; return p;
if ((p = func(new PackVmlinuxAMD64(f), user)) != NULL) if ((p = func(new PackVmlinuxAMD64(f), user)) != NULL)
return p; return p;
+26 -2
View File
@@ -18,7 +18,7 @@ empty :=
space := $(empty) $(empty) space := $(empty) $(empty)
tab := $(empty) $(empty) tab := $(empty) $(empty)
ifneq ($(findstring $(firstword $(MAKE_VERSION)),3.79 3.79.1 3.80),) ifneq ($(findstring $(firstword $(MAKE_VERSION)),3.77 3.78 3.78.1 3.79 3.79.1 3.80),)
$(error GNU make 3.81 or better is required) $(error GNU make 3.81 or better is required)
endif endif
@@ -29,7 +29,7 @@ endif
ifndef top_srcdir ifndef top_srcdir
top_srcdir := $(srcdir)/../.. top_srcdir := $(srcdir)/../..
endif endif
-include $(top_srcdir)/Makevars.global ./Makevars.local include $(wildcard $(top_srcdir)/Makevars.global ./Makevars.local)
# update $PATH for our special stub build tools # update $PATH for our special stub build tools
ifneq ($(wildcard $(HOME)/local/bin/bin-upx/.),) ifneq ($(wildcard $(HOME)/local/bin/bin-upx/.),)
@@ -56,6 +56,8 @@ STUBS += arm-linux.kernel.vmlinux.h
STUBS += arm-linux.kernel.vmlinux-head.h STUBS += arm-linux.kernel.vmlinux-head.h
STUBS += armeb-linux.elf-entry.h STUBS += armeb-linux.elf-entry.h
STUBS += armeb-linux.elf-fold.h STUBS += armeb-linux.elf-fold.h
STUBS += armeb-linux.kernel.vmlinux.h
STUBS += armeb-linux.kernel.vmlinux-head.h
STUBS += arm.v4a-wince.pe.h STUBS += arm.v4a-wince.pe.h
STUBS += arm.v4t-wince.pe.h STUBS += arm.v4t-wince.pe.h
STUBS += i086-dos16.com.h STUBS += i086-dos16.com.h
@@ -336,6 +338,28 @@ arm-linux.kernel.vmlinux-head.h : $(srcdir)/src/$$T.S
$(call tc,bin2h) tmp/$T.bin $@ $(call tc,bin2h) tmp/$T.bin $@
# /***********************************************************************
# // armeb-linux.kernel.vmlinux
# // armeb-linux.kernel.vmlinuz
# // armeb-linux.kernel.vmlinux-head
# ************************************************************************/
armeb-linux.kernel.vmlinu%.h : tc_list = armeb-linux.kernel default
armeb-linux.kernel.vmlinu%.h : tc_bfdname = elf32-bigarm
tc.armeb-linux.kernel.gcc = $(tc.arm-linux.elf.gcc) -mbig-endian
armeb-linux.kernel.vmlinu%.h : $(srcdir)/src/$$T.S
$(call tc,gcc) -c -x assembler-with-cpp $< -o tmp/$T.bin
$(call tc,f-embed_objinfo,tmp/$T.bin)
$(call tc,bin2h-c) tmp/$T.bin $@
armeb-linux.kernel.vmlinux-head.h : $(srcdir)/src/$$T.S
$(call tc,gcc) -c -x assembler-with-cpp $< -o tmp/$T.o
$(call tc,objcopy) --output-target binary --only-section .text tmp/$T.o tmp/$T.bin
$(call tc,bin2h) tmp/$T.bin $@
# /*********************************************************************** # /***********************************************************************
# // armeb-linux.elf # // armeb-linux.elf
# ************************************************************************/ # ************************************************************************/
+3 -3
View File
@@ -29,8 +29,8 @@
#define STUB_ARM_LINUX_ELF_ENTRY_SIZE 16296 #define STUB_ARM_LINUX_ELF_ENTRY_SIZE 16296
#define STUB_ARM_LINUX_ELF_ENTRY_ADLER32 0x9b815c2e #define STUB_ARM_LINUX_ELF_ENTRY_ADLER32 0xdf115bee
#define STUB_ARM_LINUX_ELF_ENTRY_CRC32 0x3b801af9 #define STUB_ARM_LINUX_ELF_ENTRY_CRC32 0x8704e1a1
unsigned char stub_arm_linux_elf_entry[16296] = { unsigned char stub_arm_linux_elf_entry[16296] = {
127, 69, 76, 70, 1, 1, 1, 97, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 0 */ 127, 69, 76, 70, 1, 1, 1, 97, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 0 */
@@ -44,7 +44,7 @@ unsigned char stub_arm_linux_elf_entry[16296] = {
254, 1,160,232, 15, 0, 0, 58, 9, 64, 64,224, 80, 80,143,226, /* 0x 80 */ 254, 1,160,232, 15, 0, 0, 58, 9, 64, 64,224, 80, 80,143,226, /* 0x 80 */
0,224,160,225, 4, 80,133,224, 5, 0,160,225, 4, 16,137,224, /* 0x 90 */ 0,224,160,225, 4, 80,133,224, 5, 0,160,225, 4, 16,137,224, /* 0x 90 */
0, 32,160,227, 2, 0,159,239, 0,144,156,229,140,144, 73,226, /* 0x a0 */ 0, 32,160,227, 2, 0,159,239, 0,144,156,229,140,144, 73,226, /* 0x a0 */
9,160, 76,224, 4,160,138,224, 8, 0,219,229, 1, 64, 45,233, /* 0x b0 */ 9,160, 76,224, 4,160,138,224, 8, 0,155,229, 1, 64, 45,233, /* 0x b0 */
0, 48,155,229, 12, 0,139,226, 4, 16,155,229, 14, 32,160,225, /* 0x c0 */ 0, 48,155,229, 12, 0,139,226, 4, 16,155,229, 14, 32,160,225, /* 0x c0 */
8, 48,141,229, 8, 48,141,226, 15,224,160,225, 5,240,160,225, /* 0x d0 */ 8, 48,141,229, 8, 48,141,226, 15,224,160,225, 5,240,160,225, /* 0x d0 */
2,128,189,232,252, 64, 45,233, 0,112,129,224, 0, 80,224,227, /* 0x e0 */ 2,128,189,232,252, 64, 45,233, 0,112,129,224, 0, 80,224,227, /* 0x e0 */
+5 -5
View File
@@ -29,8 +29,8 @@
#define STUB_ARM_LINUX_KERNEL_VMLINUX_SIZE 17091 #define STUB_ARM_LINUX_KERNEL_VMLINUX_SIZE 17091
#define STUB_ARM_LINUX_KERNEL_VMLINUX_ADLER32 0x3d6cea16 #define STUB_ARM_LINUX_KERNEL_VMLINUX_ADLER32 0x2af6ea3d
#define STUB_ARM_LINUX_KERNEL_VMLINUX_CRC32 0xab8eacad #define STUB_ARM_LINUX_KERNEL_VMLINUX_CRC32 0x12d16cc6
unsigned char stub_arm_linux_kernel_vmlinux[17091] = { unsigned char stub_arm_linux_kernel_vmlinux[17091] = {
127, 69, 76, 70, 1, 1, 1, 97, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 0 */ 127, 69, 76, 70, 1, 1, 1, 97, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 0 */
@@ -570,7 +570,7 @@ unsigned char stub_arm_linux_kernel_vmlinux[17091] = {
10, 79, 70, 70, 83, 69, 84, 32, 32, 32, 84, 89, 80, 69, 32, 32, /* 0x2160 */ 10, 79, 70, 70, 83, 69, 84, 32, 32, 32, 84, 89, 80, 69, 32, 32, /* 0x2160 */
32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 86, 65, 76, 85, /* 0x2170 */ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 86, 65, 76, 85, /* 0x2170 */
69, 10, 48, 48, 48, 48, 48, 48, 49, 52, 32, 82, 95, 65, 82, 77, /* 0x2180 */ 69, 10, 48, 48, 48, 48, 48, 48, 49, 52, 32, 82, 95, 65, 82, 77, /* 0x2180 */
95, 65, 66, 83, 56, 32, 32, 32, 32, 32, 32, 32, 32, 77, 69, 84, /* 0x2190 */ 95, 65, 66, 83, 51, 50, 32, 32, 32, 32, 32, 32, 32, 77, 69, 84, /* 0x2190 */
72, 79, 68, 10, 48, 48, 48, 48, 48, 48, 51, 48, 32, 82, 95, 65, /* 0x21a0 */ 72, 79, 68, 10, 48, 48, 48, 48, 48, 48, 51, 48, 32, 82, 95, 65, /* 0x21a0 */
82, 77, 95, 80, 67, 50, 52, 32, 32, 32, 32, 32, 32, 32, 32, 76, /* 0x21b0 */ 82, 77, 95, 80, 67, 50, 52, 32, 32, 32, 32, 32, 32, 32, 32, 76, /* 0x21b0 */
73, 78, 85, 88, 48, 51, 48, 10, 48, 48, 48, 48, 48, 48, 51, 52, /* 0x21c0 */ 73, 78, 85, 88, 48, 51, 48, 10, 48, 48, 48, 48, 48, 48, 51, 52, /* 0x21c0 */
@@ -589,9 +589,9 @@ unsigned char stub_arm_linux_kernel_vmlinux[17091] = {
79, 70, 70, 83, 69, 84, 32, 32, 32, 84, 89, 80, 69, 32, 32, 32, /* 0x2290 */ 79, 70, 70, 83, 69, 84, 32, 32, 32, 84, 89, 80, 69, 32, 32, 32, /* 0x2290 */
32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 86, 65, 76, 85, 69, /* 0x22a0 */ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 86, 65, 76, 85, 69, /* 0x22a0 */
10, 48, 48, 48, 48, 48, 48, 48, 56, 32, 82, 95, 65, 82, 77, 95, /* 0x22b0 */ 10, 48, 48, 48, 48, 48, 48, 48, 56, 32, 82, 95, 65, 82, 77, 95, /* 0x22b0 */
65, 66, 83, 56, 32, 32, 32, 32, 32, 32, 32, 32,102,105,108,116, /* 0x22c0 */ 65, 66, 83, 51, 50, 32, 32, 32, 32, 32, 32, 32,102,105,108,116, /* 0x22c0 */
101,114, 95, 99,116,111, 10, 48, 48, 48, 48, 48, 48, 48, 99, 32, /* 0x22d0 */ 101,114, 95, 99,116,111, 10, 48, 48, 48, 48, 48, 48, 48, 99, 32, /* 0x22d0 */
82, 95, 65, 82, 77, 95, 65, 66, 83, 56, 32, 32, 32, 32, 32, 32, /* 0x22e0 */ 82, 95, 65, 82, 77, 95, 65, 66, 83, 51, 50, 32, 32, 32, 32, 32, /* 0x22e0 */
32, 32,102,105,108,116,101,114, 95,105,100, 10, 48, 48, 48, 48, /* 0x22f0 */ 32, 32,102,105,108,116,101,114, 95,105,100, 10, 48, 48, 48, 48, /* 0x22f0 */
48, 48, 49, 48, 32, 82, 95, 65, 82, 77, 95, 80, 67, 50, 52, 32, /* 0x2300 */ 48, 48, 49, 48, 32, 82, 95, 65, 82, 77, 95, 80, 67, 50, 52, 32, /* 0x2300 */
32, 32, 32, 32, 32, 32, 32, 99,116,111,107, 51, 50, 46, 48, 48, /* 0x2310 */ 32, 32, 32, 32, 32, 32, 32, 99,116,111,107, 51, 50, 46, 48, 48, /* 0x2310 */
+3 -3
View File
@@ -29,8 +29,8 @@
#define STUB_ARMEB_LINUX_ELF_ENTRY_SIZE 16295 #define STUB_ARMEB_LINUX_ELF_ENTRY_SIZE 16295
#define STUB_ARMEB_LINUX_ELF_ENTRY_ADLER32 0x87435b9a #define STUB_ARMEB_LINUX_ELF_ENTRY_ADLER32 0xcad35b5a
#define STUB_ARMEB_LINUX_ELF_ENTRY_CRC32 0x7cf93476 #define STUB_ARMEB_LINUX_ELF_ENTRY_CRC32 0xc07dcf2e
unsigned char stub_armeb_linux_elf_entry[16295] = { unsigned char stub_armeb_linux_elf_entry[16295] = {
127, 69, 76, 70, 1, 2, 1, 97, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 0 */ 127, 69, 76, 70, 1, 2, 1, 97, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 0 */
@@ -44,7 +44,7 @@ unsigned char stub_armeb_linux_elf_entry[16295] = {
232,160, 1,254, 58, 0, 0, 15,224, 64, 64, 9,226,143, 80, 80, /* 0x 80 */ 232,160, 1,254, 58, 0, 0, 15,224, 64, 64, 9,226,143, 80, 80, /* 0x 80 */
225,160,224, 0,224,133, 80, 4,225,160, 0, 5,224,137, 16, 4, /* 0x 90 */ 225,160,224, 0,224,133, 80, 4,225,160, 0, 5,224,137, 16, 4, /* 0x 90 */
227,160, 32, 0,239,159, 0, 2,229,156,144, 0,226, 73,144,140, /* 0x a0 */ 227,160, 32, 0,239,159, 0, 2,229,156,144, 0,226, 73,144,140, /* 0x a0 */
224, 76,160, 9,224,138,160, 4,229,219, 0, 8,233, 45, 64, 1, /* 0x b0 */ 224, 76,160, 9,224,138,160, 4,229,155, 0, 8,233, 45, 64, 1, /* 0x b0 */
229,155, 48, 0,226,139, 0, 12,229,155, 16, 4,225,160, 32, 14, /* 0x c0 */ 229,155, 48, 0,226,139, 0, 12,229,155, 16, 4,225,160, 32, 14, /* 0x c0 */
229,141, 48, 8,226,141, 48, 8,225,160,224, 15,225,160,240, 5, /* 0x d0 */ 229,141, 48, 8,226,141, 48, 8,225,160,224, 15,225,160,240, 5, /* 0x d0 */
232,189,128, 2,233, 45, 64,252,224,129,112, 0,227,224, 80, 0, /* 0x e0 */ 232,189,128, 2,233, 45, 64,252,224,129,112, 0,227,224, 80, 0, /* 0x e0 */
@@ -0,0 +1,37 @@
/* armeb-linux.kernel.vmlinux-head.h
created from armeb-linux.kernel.vmlinux-head.bin, 8 (0x8) bytes
This file is part of the UPX executable compressor.
Copyright (C) 1996-2007 Markus Franz Xaver Johannes Oberhumer
Copyright (C) 1996-2007 Laszlo Molnar
Copyright (C) 2000-2007 John F. Reiser
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
<mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
*/
#define STUB_ARMEB_LINUX_KERNEL_VMLINUX_HEAD_SIZE 8
#define STUB_ARMEB_LINUX_KERNEL_VMLINUX_HEAD_ADLER32 0x19db0637
#define STUB_ARMEB_LINUX_KERNEL_VMLINUX_HEAD_CRC32 0xb5ec5990
unsigned char stub_armeb_linux_kernel_vmlinux_head[8] = {
225,160,192, 14,235,255,255,254 /* 0x 0 */
};
File diff suppressed because it is too large Load Diff
+8 -8
View File
@@ -29,15 +29,15 @@
#define STUB_I386_BSD_ELF_ENTRY_SIZE 37562 #define STUB_I386_BSD_ELF_ENTRY_SIZE 37562
#define STUB_I386_BSD_ELF_ENTRY_ADLER32 0xb6d5917d #define STUB_I386_BSD_ELF_ENTRY_ADLER32 0x0c31915d
#define STUB_I386_BSD_ELF_ENTRY_CRC32 0x57a02d3a #define STUB_I386_BSD_ELF_ENTRY_CRC32 0x68fd1b14
unsigned char stub_i386_bsd_elf_entry[37562] = { unsigned char stub_i386_bsd_elf_entry[37562] = {
127, 69, 76, 70, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 0 */ 127, 69, 76, 70, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 0 */
1, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 10 */ 1, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 10 */
116, 34, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, 0, 0, 40, 0, /* 0x 20 */ 116, 34, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, 0, 0, 40, 0, /* 0x 20 */
243, 0,240, 0,232,123, 0, 0, 0, 96,139,116, 36, 40,139,124, /* 0x 30 */ 243, 0,240, 0,232,123, 0, 0, 0, 96,139,116, 36, 36,139,124, /* 0x 30 */
36, 48,131,205,255,235, 3,164,235, 3,138, 6, 70,136, 7, 71, /* 0x 40 */ 36, 44,131,205,255,235, 3,164,235, 3,138, 6, 70,136, 7, 71, /* 0x 40 */
1,219,117, 7,139, 30,131,238,252, 17,219,114, 1, 49,192, 64, /* 0x 50 */ 1,219,117, 7,139, 30,131,238,252, 17,219,114, 1, 49,192, 64, /* 0x 50 */
138, 7,114,255,184, 1, 0, 0, 0, 1,219,117, 7,139, 30,131, /* 0x 60 */ 138, 7,114,255,184, 1, 0, 0, 0, 1,219,117, 7,139, 30,131, /* 0x 60 */
238,252, 17,219, 17,192, 1,219,117, 7,139, 30,131,238,252, 17, /* 0x 70 */ 238,252, 17,219, 17,192, 1,219,117, 7,139, 30,131,238,252, 17, /* 0x 70 */
@@ -88,10 +88,10 @@ unsigned char stub_i386_bsd_elf_entry[37562] = {
4,119,241, 1,207,233,252,255,255,255,137,229,141,156, 36, 0, /* 0x 340 */ 4,119,241, 1,207,233,252,255,255,255,137,229,141,156, 36, 0, /* 0x 340 */
0, 0, 0, 49,192, 80, 57,220,117,251, 70, 70, 83,104, 0, 0, /* 0x 350 */ 0, 0, 0, 49,192, 80, 57,220,117,251, 70, 70, 83,104, 0, 0, /* 0x 350 */
0, 0, 87,131,195, 4, 83,104, 0, 0, 0, 0, 86,131,195, 4, /* 0x 360 */ 0, 0, 87,131,195, 4, 83,104, 0, 0, 0, 0, 86,131,195, 4, /* 0x 360 */
83, 80,199, 3, 0, 0, 0, 0,137,229,139, 85, 44,172, 74,136, /* 0x 370 */ 83, 80,199, 3, 0, 0, 0, 0,137,229,139, 85, 40,172, 74,136, /* 0x 370 */
193, 36, 7,192,233, 3,187, 0,253,255,255,211,227,141,164, 92, /* 0x 380 */ 193, 36, 7,192,233, 3,187, 0,253,255,255,211,227,141,164, 92, /* 0x 380 */
144,241,255,255,131,228,224,106, 0,106, 0,137,227, 83,131,195, /* 0x 390 */ 144,241,255,255,131,228,224,106, 0,106, 0,137,227, 83,131,195, /* 0x 390 */
4,139, 77, 52,255, 49, 87, 83,131,195, 4,136, 67, 2,172, 74, /* 0x 3a0 */ 4,139, 77, 48,255, 49, 87, 83,131,195, 4,136, 67, 2,172, 74, /* 0x 3a0 */
136,193, 36, 15,136, 3,192,233, 4,136, 75, 1, 82, 86, 83, 80, /* 0x 3b0 */ 136,193, 36, 15,136, 3,192,233, 4,136, 75, 1, 82, 86, 83, 80, /* 0x 3b0 */
85, 87, 86, 83,131,236,124,139,148, 36,144, 0, 0, 0,199, 68, /* 0x 3c0 */ 85, 87, 86, 83,131,236,124,139,148, 36,144, 0, 0, 0,199, 68, /* 0x 3c0 */
36,116, 0, 0, 0, 0,198, 68, 36,115, 0,139,172, 36,156, 0, /* 0x 3d0 */ 36,116, 0, 0, 0, 0,198, 68, 36,115, 0,139,172, 36,156, 0, /* 0x 3d0 */
@@ -431,8 +431,8 @@ unsigned char stub_i386_bsd_elf_entry[37562] = {
148, 36,156, 0, 0, 0,139, 76, 36,116,137, 26,139,156, 36,168, /* 0x18b0 */ 148, 36,156, 0, 0, 0,139, 76, 36,116,137, 26,139,156, 36,168, /* 0x18b0 */
0, 0, 0,137, 11,131,196,124, 91, 94, 95, 93, 3,115,252, 3, /* 0x18c0 */ 0, 0, 0,137, 11,131,196,124, 91, 94, 95, 93, 3,115,252, 3, /* 0x18c0 */
123,248, 49,192,141,140, 36, 0,255,255,255,137,236, 80, 57,204, /* 0x18d0 */ 123,248, 49,192,141,140, 36, 0,255,255,255,137,236, 80, 57,204, /* 0x18d0 */
117,251,137,236, 49,201,139, 84, 36, 40, 3, 84, 36, 44, 57,214, /* 0x18e0 */ 117,251,137,236, 49,201,139, 84, 36, 36, 3, 84, 36, 40, 57,214, /* 0x18e0 */
116, 1, 72, 43,124, 36, 48,139, 84, 36, 52,137, 58,137, 68, 36, /* 0x18f0 */ 116, 1, 72, 43,124, 36, 44,139, 84, 36, 48,137, 58,137, 68, 36, /* 0x18f0 */
28, 97,195,235, 4, 90, 88, 89,151, 96, 49,219,187, 0, 0, 0, /* 0x1900 */ 28, 97,195,235, 4, 90, 88, 89,151, 96, 49,219,187, 0, 0, 0, /* 0x1900 */
0,106, 15, 88,138,100, 36, 32,106, 15, 91,138,124, 36, 32,138, /* 0x1910 */ 0,106, 15, 88,138,100, 36, 32,106, 15, 91,138,124, 36, 32,138, /* 0x1910 */
84, 36, 32,233,252,255,255,255, 15,183, 47, 43,110, 12, 41,221, /* 0x1920 */ 84, 36, 32,233,252,255,255,255, 15,183, 47, 43,110, 12, 41,221, /* 0x1920 */
+3 -3
View File
@@ -29,8 +29,8 @@
#define STUB_I386_DOS32_TMT_SIZE 27032 #define STUB_I386_DOS32_TMT_SIZE 27032
#define STUB_I386_DOS32_TMT_ADLER32 0xe058a94c #define STUB_I386_DOS32_TMT_ADLER32 0x60faa944
#define STUB_I386_DOS32_TMT_CRC32 0x76e13290 #define STUB_I386_DOS32_TMT_CRC32 0x1e38f90e
unsigned char stub_i386_dos32_tmt[27032] = { unsigned char stub_i386_dos32_tmt[27032] = {
127, 69, 76, 70, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 0 */ 127, 69, 76, 70, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 0 */
@@ -444,7 +444,7 @@ unsigned char stub_i386_dos32_tmt[27032] = {
0, 0,235, 30,138, 7,131,199, 1, 60,128,114, 10, 60,143,119, /* 0x1980 */ 0, 0,235, 30,138, 7,131,199, 1, 60,128,114, 10, 60,143,119, /* 0x1980 */
6,128,127,254, 15,116, 5, 44,232, 60, 1,119,255,128, 63, 0, /* 0x1990 */ 6,128,127,254, 15,116, 5, 44,232, 60, 1,119,255,128, 63, 0, /* 0x1990 */
117,255,139, 7,102,193,232, 8,193,192, 16,134,196, 41,248, 1, /* 0x19a0 */ 117,255,139, 7,102,193,232, 8,193,192, 16,134,196, 41,248, 1, /* 0x19a0 */
240,137, 7,131,199, 4,131,233, 4,138, 7,131,199, 1,226, 13, /* 0x19b0 */ 232,137, 7,131,199, 4,131,233, 4,138, 7,131,199, 1,226, 13, /* 0x19b0 */
131,233, 1,127, 6,141,125,252, 49,192,138, 6, 70, 9,192,116, /* 0x19c0 */ 131,233, 1,127, 6,141,125,252, 49,192,138, 6, 70, 9,192,116, /* 0x19c0 */
1, 60,239,119, 17, 1,199,139, 7,134,196,193,192, 16,134,196, /* 0x19d0 */ 1, 60,239,119, 17, 1,199,139, 7,134,196,193,192, 16,134,196, /* 0x19d0 */
1,232,137, 7,235,226, 36, 15,193,224, 16,102,139, 6,131,198, /* 0x19e0 */ 1,232,137, 7,235,226, 36, 15,193,224, 16,102,139, 6,131,198, /* 0x19e0 */
+3 -3
View File
@@ -29,8 +29,8 @@
#define STUB_I386_DOS32_WATCOM_LE_SIZE 27436 #define STUB_I386_DOS32_WATCOM_LE_SIZE 27436
#define STUB_I386_DOS32_WATCOM_LE_ADLER32 0x1fda144c #define STUB_I386_DOS32_WATCOM_LE_ADLER32 0x946d1444
#define STUB_I386_DOS32_WATCOM_LE_CRC32 0xd84b8031 #define STUB_I386_DOS32_WATCOM_LE_CRC32 0x39b33888
unsigned char stub_i386_dos32_watcom_le[27436] = { unsigned char stub_i386_dos32_watcom_le[27436] = {
127, 69, 76, 70, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 0 */ 127, 69, 76, 70, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 0 */
@@ -445,7 +445,7 @@ unsigned char stub_i386_dos32_watcom_le[27436] = {
4,185, 0, 0, 0, 0,235, 30,138, 7,131,199, 1, 60,128,114, /* 0x1990 */ 4,185, 0, 0, 0, 0,235, 30,138, 7,131,199, 1, 60,128,114, /* 0x1990 */
10, 60,143,119, 6,128,127,254, 15,116, 5, 44,232, 60, 1,119, /* 0x19a0 */ 10, 60,143,119, 6,128,127,254, 15,116, 5, 44,232, 60, 1,119, /* 0x19a0 */
255,128, 63, 0,117,255,139, 7,102,193,232, 8,193,192, 16,134, /* 0x19b0 */ 255,128, 63, 0,117,255,139, 7,102,193,232, 8,193,192, 16,134, /* 0x19b0 */
196, 41,248, 1,240,137, 7,131,199, 4,131,233, 4,138, 7,131, /* 0x19c0 */ 196, 41,248, 1,232,137, 7,131,199, 4,131,233, 4,138, 7,131, /* 0x19c0 */
199, 1,226, 13,131,233, 1,127, 6,141,125,252, 49,192,138, 6, /* 0x19d0 */ 199, 1,226, 13,131,233, 1,127, 6,141,125,252, 49,192,138, 6, /* 0x19d0 */
70, 9,192,116, 1, 60,239,119, 17, 1,199,139, 7,134,196,193, /* 0x19e0 */ 70, 9,192,116, 1, 60,239,119, 17, 1,199,139, 7,134,196,193, /* 0x19e0 */
192, 16,134,196, 1,232,137, 7,235,226, 36, 15,193,224, 16,102, /* 0x19f0 */ 192, 16,134,196, 1,232,137, 7,235,226, 36, 15,193,224, 16,102, /* 0x19f0 */
+1320 -1297
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -8,7 +8,7 @@ __dir_list += ../../../../../.. ../../../../../../.. ../../../../../../../..
__dir_search = $(firstword $(foreach v,$1,$(if $(wildcard $v/$2),$v)) $3) __dir_search = $(firstword $(foreach v,$1,$(if $(wildcard $v/$2),$v)) $3)
top_srcdir := $(call __dir_search,$(__dir_list),src/bele.h,NOT_FOUND) top_srcdir := $(call __dir_search,$(__dir_list),src/bele.h,NOT_FOUND)
endif endif
-include $(top_srcdir)/Makevars.global ./Makevars.local include $(wildcard $(top_srcdir)/Makevars.global ./Makevars.local)
vpath %.c $(top_srcdir)/src/stub/src/c vpath %.c $(top_srcdir)/src/stub/src/c
STUBS = STUBS =
+1 -1
View File
@@ -8,7 +8,7 @@ __dir_list += ../../../../../.. ../../../../../../.. ../../../../../../../..
__dir_search = $(firstword $(foreach v,$1,$(if $(wildcard $v/$2),$v)) $3) __dir_search = $(firstword $(foreach v,$1,$(if $(wildcard $v/$2),$v)) $3)
top_srcdir := $(call __dir_search,$(__dir_list),src/bele.h,NOT_FOUND) top_srcdir := $(call __dir_search,$(__dir_list),src/bele.h,NOT_FOUND)
endif endif
-include $(top_srcdir)/Makevars.global ./Makevars.local include $(wildcard $(top_srcdir)/Makevars.global ./Makevars.local)
vpath %.c $(top_srcdir)/src/stub/src/c vpath %.c $(top_srcdir)/src/stub/src/c
STUBS = STUBS =
+1 -1
View File
@@ -8,7 +8,7 @@ __dir_list += ../../../../../.. ../../../../../../.. ../../../../../../../..
__dir_search = $(firstword $(foreach v,$1,$(if $(wildcard $v/$2),$v)) $3) __dir_search = $(firstword $(foreach v,$1,$(if $(wildcard $v/$2),$v)) $3)
top_srcdir := $(call __dir_search,$(__dir_list),src/bele.h,NOT_FOUND) top_srcdir := $(call __dir_search,$(__dir_list),src/bele.h,NOT_FOUND)
endif endif
-include $(top_srcdir)/Makevars.global ./Makevars.local include $(wildcard $(top_srcdir)/Makevars.global ./Makevars.local)
vpath %.c $(top_srcdir)/src/stub/src/c vpath %.c $(top_srcdir)/src/stub/src/c
STUBS = STUBS =
+1 -1
View File
@@ -35,7 +35,7 @@
.endm .endm
.macro loadcon8 reg,val8 .macro loadcon8 reg,val8
.byte \val8, \reg<<4, 0xa0, 0xe3 /* mov \reg,#\val8 */ .long (0xe3<<24)|(0xa0<<16)|((\reg<<4)<<8)+(\val8) /* mov \reg,#\val8 */
.endm .endm
// vi:ts=8:et:nowrap // vi:ts=8:et:nowrap
+1 -1
View File
@@ -14,7 +14,7 @@ __dir_list += ../../../../../.. ../../../../../../.. ../../../../../../../..
__dir_search = $(firstword $(foreach v,$1,$(if $(wildcard $v/$2),$v)) $3) __dir_search = $(firstword $(foreach v,$1,$(if $(wildcard $v/$2),$v)) $3)
top_srcdir := $(call __dir_search,$(__dir_list),src/bele.h,NOT_FOUND) top_srcdir := $(call __dir_search,$(__dir_list),src/bele.h,NOT_FOUND)
endif endif
-include $(top_srcdir)/Makevars.global ./Makevars.local include $(wildcard $(top_srcdir)/Makevars.global ./Makevars.local)
vpath %.c $(top_srcdir)/src/stub/src/c vpath %.c $(top_srcdir)/src/stub/src/c
STUBS = STUBS =
+1 -1
View File
@@ -8,7 +8,7 @@ __dir_list += ../../../../../.. ../../../../../../.. ../../../../../../../..
__dir_search = $(firstword $(foreach v,$1,$(if $(wildcard $v/$2),$v)) $3) __dir_search = $(firstword $(foreach v,$1,$(if $(wildcard $v/$2),$v)) $3)
top_srcdir := $(call __dir_search,$(__dir_list),src/bele.h,NOT_FOUND) top_srcdir := $(call __dir_search,$(__dir_list),src/bele.h,NOT_FOUND)
endif endif
-include $(top_srcdir)/Makevars.global ./Makevars.local include $(wildcard $(top_srcdir)/Makevars.global ./Makevars.local)
vpath %.c $(top_srcdir)/src/stub/src/c vpath %.c $(top_srcdir)/src/stub/src/c
STUBS = STUBS =
+7 -1
View File
@@ -300,8 +300,10 @@ ctend:
// 2nd param: where is cto8 (dl, bl, or literal) // 2nd param: where is cto8 (dl, bl, or literal)
section ctok32.00 section ctok32.00
.ifnc \addvalue, 0
.ifc \addvalue, edi .ifc \addvalue, edi
mov esi, \addvalue mov esi, edi
.endif
.endif .endif
jmps ckstart jmps ckstart
ckloop3: ckloop3:
@@ -333,7 +335,11 @@ ckmark:
sub eax, edi sub eax, edi
.ifnc \addvalue, 0 .ifnc \addvalue, 0
.ifc \addvalue, edi
add eax, esi add eax, esi
.else
add eax, \addvalue
.endif
.endif .endif
mov [edi], eax mov [edi], eax
add edi, 4 add edi, 4
+1 -1
View File
@@ -8,7 +8,7 @@ __dir_list += ../../../../../.. ../../../../../../.. ../../../../../../../..
__dir_search = $(firstword $(foreach v,$1,$(if $(wildcard $v/$2),$v)) $3) __dir_search = $(firstword $(foreach v,$1,$(if $(wildcard $v/$2),$v)) $3)
top_srcdir := $(call __dir_search,$(__dir_list),src/bele.h,NOT_FOUND) top_srcdir := $(call __dir_search,$(__dir_list),src/bele.h,NOT_FOUND)
endif endif
-include $(top_srcdir)/Makevars.global ./Makevars.local include $(wildcard $(top_srcdir)/Makevars.global ./Makevars.local)
vpath %.c $(top_srcdir)/src/stub/src/c vpath %.c $(top_srcdir)/src/stub/src/c
STUBS = STUBS =
+1 -1
View File
@@ -8,7 +8,7 @@ __dir_list += ../../../../../.. ../../../../../../.. ../../../../../../../..
__dir_search = $(firstword $(foreach v,$1,$(if $(wildcard $v/$2),$v)) $3) __dir_search = $(firstword $(foreach v,$1,$(if $(wildcard $v/$2),$v)) $3)
top_srcdir := $(call __dir_search,$(__dir_list),src/bele.h,NOT_FOUND) top_srcdir := $(call __dir_search,$(__dir_list),src/bele.h,NOT_FOUND)
endif endif
-include $(top_srcdir)/Makevars.global ./Makevars.local include $(wildcard $(top_srcdir)/Makevars.global ./Makevars.local)
vpath %.c $(top_srcdir)/src/stub/src/c vpath %.c $(top_srcdir)/src/stub/src/c
STUBS = STUBS =
@@ -8,7 +8,7 @@ __dir_list += ../../../../../.. ../../../../../../.. ../../../../../../../..
__dir_search = $(firstword $(foreach v,$1,$(if $(wildcard $v/$2),$v)) $3) __dir_search = $(firstword $(foreach v,$1,$(if $(wildcard $v/$2),$v)) $3)
top_srcdir := $(call __dir_search,$(__dir_list),src/bele.h,NOT_FOUND) top_srcdir := $(call __dir_search,$(__dir_list),src/bele.h,NOT_FOUND)
endif endif
-include $(top_srcdir)/Makevars.global ./Makevars.local include $(wildcard $(top_srcdir)/Makevars.global ./Makevars.local)
vpath %.c $(top_srcdir)/src/stub/src/c vpath %.c $(top_srcdir)/src/stub/src/c
STUBS = STUBS =
+214 -77
View File
@@ -34,11 +34,15 @@
#ifndef _MR3K_STD_CONF_ #ifndef _MR3K_STD_CONF_
#define _MR3K_STD_CONF_ #define _MR3K_STD_CONF_
#define JOHN 1
#define ALT_SMALL 1
;////////////////////////////////////// ;//////////////////////////////////////
;// register defines ;// register defines
;////////////////////////////////////// ;//////////////////////////////////////
#if 1
#define tmp at #define tmp at
#define dst t0 #define dst t0
@@ -58,6 +62,31 @@
#define m_off t7 #define m_off t7
#define m_pos t7 #define m_pos t7
#else
.print "\nwarning redefined src / dst\n"
#define tmp v1
#define src a0
#define dst a1
#define pc v0
#define cnt a2
#define src_ilen src
#define bb t1
#define ilen t2
#define last_m_off t3
#define m_len t4
#define bc t5
#define var t6
#define m_off t7
#define m_pos t7
#endif
;////////////////////////////////////// ;//////////////////////////////////////
;// init bitaccess ;// init bitaccess
@@ -89,12 +118,32 @@
.macro init .macro init
init_sz = .
.if (JOHN == 0)
move bc,zero move bc,zero
.else // John's method
.if (UCL_SMALL == 1)
.if (ALT_SMALL == 1)
lui bc,1 << (31 - 16)
move bb,bc
.else
move bc,zero
.endif
.else
lui bc,1 << (31 - 16)
move bb,bc
.endif
.endif
li last_m_off,1 li last_m_off,1
.if (src != src_ilen) .if (src != src_ilen)
move src_ilen,src move src_ilen,src
.endif .endif
init_sz = . - init_sz
.endm .endm
@@ -104,6 +153,7 @@
.macro ADDBITS .macro ADDBITS
.if (JOHN == 0)
.if (UCL_SMALL == 1) .if (UCL_SMALL == 1)
addiu bc, -1 addiu bc, -1
bltz bc, 2b bltz bc, 2b
@@ -112,32 +162,92 @@
addiu bc, -1 addiu bc, -1
.endif .endif
.else // John's method
.if (UCL_SMALL == 1)
.if (ALT_SMALL == 1)
beq bc,bb,2b # detect flag bit [empty]
.else
addiu bc,-1
bltz bc,2b
.endif
.else
srl var,bb,31 # var= most significant bit of bb
bne bc,bb,2f # detect flag bit [empty]
sll bb,1
.endif
.endif
.endm .endm
.macro ADDBITS_DONE .macro ADDBITS_DONE
.if (JOHN == 0)
srlv var,bb,bc srlv var,bb,bc
.if (UCL_SMALL == 1) .if (UCL_SMALL == 1)
jr ra jr ra
.endif .endif
andi var,0x0001 andi var,0x0001
.else // John's method
.if (UCL_SMALL == 1)
.if (ALT_SMALL == 1)
srl var,bb,31 # var= most significant bit of bb
jr ra
sll bb,1
.else
srlv var,bb,bc
jr ra
andi var,0x0001
.endif
.else
.if (UCL_NRV_BB == 8)
sll bb,1
addiu bb,1 # the flag bit
srl var,bb,8 # var= most significant bit of bb
sll bb,24 # left-justify in register
.else
srl var,bb,31 # var= most significant bit of bb
sll bb,1
addiu bb,1
.endif
.endif
.endif
.endm .endm
.macro FILLBYTES_8 .macro FILLBYTES_8
.if (UCL_SMALL == 1) .if (JOHN == 0)
li bc,8
.else
li bc,7 li bc,7
.endif
lbu bb,0(src_ilen) lbu bb,0(src_ilen)
addiu src_ilen,1 addiu src_ilen,1
.else // John's method
.if (ALT_SMALL == 0)
.if (UCL_SMALL == 1)
li bc,8
.endif
.endif
lbu bb,0(src_ilen)
addiu src_ilen,1
.if ((ALT_SMALL == 1) && (UCL_SMALL == 1))
sll bb,1
addiu bb,1 # the flag bit
sll bb,24-1 # left-justify in register
.endif
.endif
.endm .endm
.macro FILLBYTES_32 .macro FILLBYTES_32
.if (JOHN == 0)
.if (UCL_SMALL == 1) .if (UCL_SMALL == 1)
li bc,32 li bc,32
.else .else
@@ -147,9 +257,27 @@
lwl bb,3(src_ilen) lwl bb,3(src_ilen)
addiu src_ilen,4 addiu src_ilen,4
.else // John's method
.if (ALT_SMALL == 0)
.if (UCL_SMALL == 1)
li bc,32
.endif
.endif
lwr bb,0(src_ilen)
lwl bb,3(src_ilen)
addiu src_ilen,4
.if ((ALT_SMALL == 1) && (UCL_SMALL == 1))
srl var,bb,31 # var= most significant bit of bb
sll bb,1
jr ra
addiu bb,1
.endif
.endif
.endm .endm
.macro FILLBYTES .macro FILLBITS
.if (UCL_NRV_BB == 8) .if (UCL_NRV_BB == 8)
FILLBYTES_8 FILLBYTES_8
@@ -159,79 +287,29 @@
.endm .endm
// This alternate for UCL_SMALL is 1 cycle faster for most getbit
// at a cost of 1 cycle (32 bits) or 3 cycles (8 bits) during refill.
// [Refill could save 1 cycle if MIPS had "set CarryIn" for ADD or SHIFT.]
// Call 'getbit'; it returns the next bit (0 or 1), in register 'var'.
// Register 'bb' is the bit buffer; register 'bc' contains the 'empty' value.
// The cases for widths 8 and 32 are not as similar as before,
// and 64-bit registers would require other code.
// But it is 1 cycle faster 31/32 of the time.
// [Indentation after control transfer emphasizes delay slot.]
//
//init:
// lui bc,1<<(31 - 16) # 1<<31 the flag bit
// lui bb,1<<(31 - 16) # 1<<31 empty
//--
// .if (8==UCL_NRV_BB)
//refill:
// lbu bb,0(src_ilen)
// addiu src_len,1
// sll bb,1
// ori bb,1 # the flag bit
// sll bb,24-1 # left-justify in register
// // falling through the 'beq' below saves 3 words of space
// .endif
//getbit:
// beq bc,bb,refill # detect flag bit [empty]
// srl var,bb,31 # var= most significant bit of bb
// jr ra
// sll bb,1
// .if (32==UCL_NRV_BB)
//refill:
// lwr bb,0(src_ilen)
// lwl bb,3(src_ilen)
// addiu src_ilen,4
// srl var,bb,31 # var= most significant bit of bb
// sll bb,1
// jr ra
// ori bb,1 # the flag bit
// .endif
// 2006-09-06 Faster by 3 cycles for inline expansion:
// beq bc,bb,7f # detect flag bit [empty]
// srl var,bb,31 # var= most significant bit of bb
// sll bb,1
//6:
// .subsection 1 # somewhere out-of-line
//7:
// b refill
// addi ra,r_bd_base,6b - bd_base # return past the 'sll' above
// .subsection 0 # return to main in-line code
//
// which is 3 cycles usually, +2 cycles for entering refill,
// +8 bytes (2 instructions) per getbit [7 in nrv2b, 9 in nrv2e]
// and requires another register r_bd_base which holds a handy
// address within +/- 32KB of the returns from refill.
//
.macro GBIT .macro GBIT
.if (UCL_SMALL == 1) .if (UCL_SMALL == 1)
2: 2:
FILLBYTES FILLBITS
1: 1:
ADDBITS ADDBITS
ADDBITS_DONE ADDBITS_DONE
.else .else
ADDBITS ADDBITS
FILLBYTES FILLBITS
.if (JOHN == 1)
ADDBITS_DONE
2:
.else
2: 2:
ADDBITS_DONE ADDBITS_DONE
.endif
.endif .endif
.endm .endm
;////////////////////////////////////// ;//////////////////////////////////////
;// getbit call macro for SMALL version ;// getbit call macro for SMALL version
;////////////////////////////////////// ;//////////////////////////////////////
@@ -247,8 +325,23 @@
.ifb p1 .ifb p1
bal t // gb_sub bal t // gb_sub
.else .else
.if (JOHN == 0)
bal t+4 // gb_sub+4 bal t+4 // gb_sub+4
addiu bc,-1 addiu bc,-1
.else // John's method
.if (UCL_SMALL == 1)
.if (ALT_SMALL == 0)
bal t+4 // gb_sub+4
addiu bc,-1
.else
bal t // gb_sub+4
nop
.endif
.endif
.endif
.endif .endif
.else .else
GBIT GBIT
@@ -271,20 +364,20 @@
.endif .endif
\type decomp_done \type decomp_done
.if (UCL_SMALL == 1) .if (UCL_SMALL == 1)
WITHOUT_SUB = 0
GBIT GBIT
.endif .endif
.else .else
.ifc "\option", "sub_only" .ifc "\option", "sub_only"
2: 2:
FILLBYTES FILLBITS
.ifnb label .ifnb label
.global \label .global \label
\label: \label:
.endif .endif
ADDBITS ADDBITS
ADDBITS_DONE ADDBITS_DONE
.else .else
.ifc "\option", "without_sub" .ifc "\option", "without_sub"
.if (UCL_SMALL == 1) .if (UCL_SMALL == 1)
@@ -309,12 +402,12 @@
.macro uclmcpy ret .macro uclmcpy ret
local wordchk, bcpy local wordchk, prepbcpy
local bcpy_chk, skip local bcopy, skip
.if (UCL_FAST == 1) .if (UCL_FAST == 1)
slti var,m_off,4 slti var,m_off,4
bnez var,bcpy bnez var,prepbcpy
subu m_pos,dst,m_off subu m_pos,dst,m_off
wordchk: wordchk:
slti var,m_len,4 slti var,m_len,4
@@ -327,22 +420,66 @@ wordchk:
addiu m_pos,4 addiu m_pos,4
bnez m_len,wordchk bnez m_len,wordchk
addiu dst,4 addiu dst,4
.if (UCL_SMALL == 1)
.if (WITHOUT_SUB == 1)
t = gb_e
.else
t = 1f
.endif
.if (1 == 1)
b \ret b \ret
nop nop
.else .else
subu m_pos,dst,m_off bal t
addiu ra, (\ret + 4) - (. + 4)
.endif .endif
bcpy_chk: .else
beqz m_len,\ret .if (JOHN == 0)
bcpy: b \ret
nop
.else
b \ret + 4
srl var,bb,31 # var= most significant bit of bb
.endif
.endif
prepbcpy:
.else
subu m_pos,dst,m_off
.endif
bcopy:
lbu var,0(m_pos) lbu var,0(m_pos)
skip: skip:
addiu m_len,-1 addiu m_len,-1
sb var,0(dst)
addiu m_pos,1 addiu m_pos,1
b bcpy_chk
addiu dst,1 addiu dst,1
bnez m_len,bcopy
sb var,-1(dst)
.if (UCL_SMALL == 1)
.if (WITHOUT_SUB == 1)
t = gb_e
.else
t = 1f
.endif
.if (1 == 1)
b \ret
nop
.else
bal t
addiu ra, (\ret + 4) - (. + 4)
.endif
.else
.if (JOHN == 0)
b \ret
nop
.else
b \ret + 4
srl var,bb,31 # var= most significant bit of bb
.endif
.endif
.endm .endm
#endif //_MR3K_STD_CONF_ #endif //_MR3K_STD_CONF_
+1 -1
View File
@@ -8,7 +8,7 @@ __dir_list += ../../../../../.. ../../../../../../.. ../../../../../../../..
__dir_search = $(firstword $(foreach v,$1,$(if $(wildcard $v/$2),$v)) $3) __dir_search = $(firstword $(foreach v,$1,$(if $(wildcard $v/$2),$v)) $3)
top_srcdir := $(call __dir_search,$(__dir_list),src/bele.h,NOT_FOUND) top_srcdir := $(call __dir_search,$(__dir_list),src/bele.h,NOT_FOUND)
endif endif
-include $(top_srcdir)/Makevars.global ./Makevars.local include $(wildcard $(top_srcdir)/Makevars.global ./Makevars.local)
vpath %.c $(top_srcdir)/src/stub/src/c vpath %.c $(top_srcdir)/src/stub/src/c
STUBS = STUBS =
+1 -1
View File
@@ -103,7 +103,7 @@ copy:
sub r10,r12,r9 // &b_info sub r10,r12,r9 // &b_info
add r10,r10,r4 // relocated &b_info add r10,r10,r4 // relocated &b_info
ldrb r0,[r11,# b_method ] // 5th param ldr r0,[r11,# b_method ] // 5th param (whole word: endian issues!)
stmdb sp!,{r0,lr} stmdb sp!,{r0,lr}
ldr r3,[r11,# sz_unc] ldr r3,[r11,# sz_unc]
add r0, r11,# sz_b_info add r0, r11,# sz_b_info
@@ -0,0 +1,30 @@
/*
; armeb-linux.kernel.vmlinux-head.S -- set up stack for vmlinux/armeb format
;
; This file is part of the UPX executable compressor.
;
; Copyright (C) 2006-2007 John Reiser
; 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.
;
; John Reiser
; <jreiser@users.sourceforge.net>
*/
#include "arm-linux.kernel.vmlinux-head.S"
// vi:ts=8:et:nowrap
+35
View File
@@ -0,0 +1,35 @@
/*
; armeb-linux.kernel.vmlinux.S -- loader & decompressor for the vmlinux/armeb format
;
; This file is part of the UPX executable compressor.
;
; Copyright (C) 1996-2007 Markus Franz Xaver Johannes Oberhumer
; Copyright (C) 1996-2007 Laszlo Molnar
; Copyright (C) 2004-2007 John Reiser
; 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
; <mfx@users.sourceforge.net> <ml1050@users.sourceforge.net>
;
; John Reiser
; <jreiser@users.sourceforge.net>
*/
#include "arm-linux.kernel.vmlinux.S"
// vi:ts=8:et:nowrap
+6 -6
View File
@@ -67,12 +67,12 @@ decompress:
// // C callable decompressor // // C callable decompressor
// **************************************************************************/ // **************************************************************************/
// /* Offsets to parameters, allowing for {push + pusha + call} */ // /* Offsets to parameters, allowing for {pusha + call} */
#define O_INP (4+ 8*4 +1*4) #define O_INP (8*4 +1*4)
#define O_INS (4+ 8*4 +2*4) #define O_INS (8*4 +2*4)
#define O_OUTP (4+ 8*4 +3*4) #define O_OUTP (8*4 +3*4)
#define O_OUTS (4+ 8*4 +4*4) #define O_OUTS (8*4 +4*4)
#define O_PARAM (4+ 8*4 +5*4) #define O_PARAM (8*4 +5*4)
#define INP dword ptr [esp+O_INP] #define INP dword ptr [esp+O_INP]
#define INS dword ptr [esp+O_INS] #define INS dword ptr [esp+O_INS]
+3 -3
View File
@@ -237,13 +237,13 @@ section con.exit
section bss.cdb.start.lzma section bss.cdb.start.lzma
la t0,PSVR // prepare to compute value la t0,PSVR // prepare to compute value
subu t0,s0,t0 // get stored header offset in mem subu t0,s0,t0 // get stored header offset in mem
lui var,%hi(wrkmem-REG_SZ) // size of decomp. routine la var,wrkmem-REG_SZ
jr t0 jr t0
addiu var,%lo(wrkmem-REG_SZ) // adjust the stack with this size move tmp,sp
section bss.cdb.entry.lzma section bss.cdb.entry.lzma
move tmp,sp
push 1,var // push used regs push 1,var // push used regs
move sp,var
addiu src,t0,lzma_cpr // compressed lzma decoder offset addiu src,t0,lzma_cpr // compressed lzma decoder offset
addiu dst,sp,REG_SZ addiu dst,sp,REG_SZ
@@ -46,7 +46,7 @@ SYMBOL TABLE:
RELOCATION RECORDS FOR [LINUX000]: RELOCATION RECORDS FOR [LINUX000]:
OFFSET TYPE VALUE OFFSET TYPE VALUE
00000014 R_ARM_ABS8 METHOD 00000014 R_ARM_ABS32 METHOD
00000030 R_ARM_PC24 LINUX030 00000030 R_ARM_PC24 LINUX030
00000034 R_ARM_PC24 LINUX000 00000034 R_ARM_PC24 LINUX000
00000038 R_ARM_ABS32 COMPRESSED_LENGTH 00000038 R_ARM_ABS32 COMPRESSED_LENGTH
@@ -55,8 +55,8 @@ OFFSET TYPE VALUE
RELOCATION RECORDS FOR [LINUX010]: RELOCATION RECORDS FOR [LINUX010]:
OFFSET TYPE VALUE OFFSET TYPE VALUE
00000008 R_ARM_ABS8 filter_cto 00000008 R_ARM_ABS32 filter_cto
0000000c R_ARM_ABS8 filter_id 0000000c R_ARM_ABS32 filter_id
00000010 R_ARM_PC24 ctok32.00 00000010 R_ARM_PC24 ctok32.00
RELOCATION RECORDS FOR [ctok32.10]: RELOCATION RECORDS FOR [ctok32.10]:
@@ -0,0 +1,289 @@
tmp/armeb-linux.kernel.vmlinux.bin: file format elf32-bigarm
Sections:
Idx Name Size VMA LMA File off Algn Flags
0 LINUX000 00000048 00000000 00000000 00000034 2**0 CONTENTS, RELOC, READONLY
1 LINUX010 00000014 00000000 00000000 0000007c 2**0 CONTENTS, RELOC, READONLY
2 LINUX020 0000000c 00000000 00000000 00000090 2**0 CONTENTS, READONLY
3 ctok32.00 00000004 00000000 00000000 0000009c 2**0 CONTENTS, READONLY
4 ctok32.50 00000004 00000000 00000000 000000a0 2**0 CONTENTS, READONLY
5 ctok32.51 00000004 00000000 00000000 000000a4 2**0 CONTENTS, READONLY
6 ctok32.10 00000044 00000000 00000000 000000a8 2**0 CONTENTS, RELOC, READONLY
7 LINUX030 00000000 00000000 00000000 000000ec 2**0 CONTENTS, READONLY
8 NRV2B 000000c4 00000000 00000000 000000ec 2**0 CONTENTS, RELOC, READONLY
9 NRV2D 00000100 00000000 00000000 000001b0 2**0 CONTENTS, RELOC, READONLY
10 NRV2E 00000114 00000000 00000000 000002b0 2**0 CONTENTS, RELOC, READONLY
11 LZMA_ELF00 0000008c 00000000 00000000 000003c4 2**0 CONTENTS, RELOC, READONLY
12 LZMA_DEC10 00000938 00000000 00000000 00000450 2**0 CONTENTS, RELOC, READONLY
13 LZMA_DEC20 00000938 00000000 00000000 00000d88 2**0 CONTENTS, RELOC, READONLY
14 LZMA_DEC30 00000000 00000000 00000000 000016c0 2**0 CONTENTS, READONLY
15 UPX1HEAD 00000020 00000000 00000000 000016c0 2**0 CONTENTS, READONLY
SYMBOL TABLE:
00000000 l d LINUX000 00000000 LINUX000
00000000 l d ctok32.00 00000000 ctok32.00
00000000 l d ctok32.10 00000000 ctok32.10
00000000 l d LINUX030 00000000 LINUX030
00000000 l d NRV2B 00000000 NRV2B
00000000 l d NRV2D 00000000 NRV2D
00000000 l d NRV2E 00000000 NRV2E
00000000 l d LZMA_ELF00 00000000 LZMA_ELF00
00000000 l d LZMA_DEC10 00000000 LZMA_DEC10
00000000 l d LZMA_DEC20 00000000 LZMA_DEC20
00000000 l d LZMA_DEC30 00000000 LZMA_DEC30
00000000 l d LINUX010 00000000 LINUX010
00000000 l d LINUX020 00000000 LINUX020
00000000 l d ctok32.50 00000000 ctok32.50
00000000 l d ctok32.51 00000000 ctok32.51
00000000 l d UPX1HEAD 00000000 UPX1HEAD
00000000 *UND* 00000000 METHOD
00000000 *UND* 00000000 COMPRESSED_LENGTH
00000000 *UND* 00000000 UNCOMPRESSED_LENGTH
00000000 *UND* 00000000 filter_cto
00000000 *UND* 00000000 filter_id
00000000 g F NRV2B 000000c4 ucl_nrv2b_decompress_8
00000000 g F NRV2D 00000100 ucl_nrv2d_decompress_8
00000000 g F NRV2E 00000114 ucl_nrv2e_decompress_8
RELOCATION RECORDS FOR [LINUX000]:
OFFSET TYPE VALUE
00000014 R_ARM_ABS32 METHOD
00000030 R_ARM_PC24 LINUX030
00000034 R_ARM_PC24 LINUX000
00000038 R_ARM_ABS32 COMPRESSED_LENGTH
0000003c R_ARM_ABS32 UNCOMPRESSED_LENGTH
00000044 R_ARM_PC24 LINUX000
RELOCATION RECORDS FOR [LINUX010]:
OFFSET TYPE VALUE
00000008 R_ARM_ABS32 filter_cto
0000000c R_ARM_ABS32 filter_id
00000010 R_ARM_PC24 ctok32.00
RELOCATION RECORDS FOR [ctok32.10]:
OFFSET TYPE VALUE
00000020 R_ARM_PC24 ctok32.10
0000003c R_ARM_PC24 ctok32.10
RELOCATION RECORDS FOR [NRV2B]:
OFFSET TYPE VALUE
00000010 R_ARM_PC24 NRV2B
00000048 R_ARM_PC24 NRV2B
00000050 R_ARM_PC24 NRV2B
00000054 R_ARM_PC24 NRV2B
00000064 R_ARM_PC24 NRV2B
00000068 R_ARM_PC24 NRV2B
0000006c R_ARM_PC24 NRV2B
00000078 R_ARM_PC24 NRV2B
00000088 R_ARM_PC24 NRV2B
0000008c R_ARM_PC24 NRV2B
00000094 R_ARM_PC24 NRV2B
0000009c R_ARM_PC24 NRV2B
000000a0 R_ARM_PC24 NRV2B
000000bc R_ARM_PC24 NRV2B
000000c0 R_ARM_PC24 NRV2B
RELOCATION RECORDS FOR [NRV2D]:
OFFSET TYPE VALUE
00000010 R_ARM_PC24 NRV2D
00000044 R_ARM_PC24 NRV2D
00000048 R_ARM_PC24 NRV2D
00000050 R_ARM_PC24 NRV2D
0000005c R_ARM_PC24 NRV2D
00000068 R_ARM_PC24 NRV2D
00000074 R_ARM_PC24 NRV2D
00000078 R_ARM_PC24 NRV2D
00000084 R_ARM_PC24 NRV2D
00000094 R_ARM_PC24 NRV2D
0000009c R_ARM_PC24 NRV2D
000000a4 R_ARM_PC24 NRV2D
000000b0 R_ARM_PC24 NRV2D
000000b8 R_ARM_PC24 NRV2D
000000c4 R_ARM_PC24 NRV2D
000000d0 R_ARM_PC24 NRV2D
000000d4 R_ARM_PC24 NRV2D
000000f8 R_ARM_PC24 NRV2D
000000fc R_ARM_PC24 NRV2D
RELOCATION RECORDS FOR [NRV2E]:
OFFSET TYPE VALUE
00000010 R_ARM_PC24 NRV2E
00000044 R_ARM_PC24 NRV2E
00000048 R_ARM_PC24 NRV2E
00000050 R_ARM_PC24 NRV2E
0000005c R_ARM_PC24 NRV2E
00000068 R_ARM_PC24 NRV2E
00000074 R_ARM_PC24 NRV2E
00000078 R_ARM_PC24 NRV2E
00000084 R_ARM_PC24 NRV2E
00000094 R_ARM_PC24 NRV2E
0000009c R_ARM_PC24 NRV2E
000000a0 R_ARM_PC24 NRV2E
000000a8 R_ARM_PC24 NRV2E
000000ac R_ARM_PC24 NRV2E
000000b8 R_ARM_PC24 NRV2E
000000bc R_ARM_PC24 NRV2E
000000c4 R_ARM_PC24 NRV2E
000000d0 R_ARM_PC24 NRV2E
000000d4 R_ARM_PC24 NRV2E
000000dc R_ARM_PC24 NRV2E
000000e4 R_ARM_PC24 NRV2E
0000010c R_ARM_PC24 NRV2E
00000110 R_ARM_PC24 NRV2E
RELOCATION RECORDS FOR [LZMA_ELF00]:
OFFSET TYPE VALUE
00000008 R_ARM_PC24 LZMA_DEC30
0000004c R_ARM_PC24 LZMA_ELF00
00000080 R_ARM_PC24 LZMA_ELF00
RELOCATION RECORDS FOR [LZMA_DEC10]:
OFFSET TYPE VALUE
00000074 R_ARM_PC24 LZMA_DEC10
00000090 R_ARM_PC24 LZMA_DEC10
000000b8 R_ARM_PC24 LZMA_DEC10
000000cc R_ARM_PC24 LZMA_DEC10
000000f4 R_ARM_PC24 LZMA_DEC10
00000100 R_ARM_PC24 LZMA_DEC10
00000108 R_ARM_PC24 LZMA_DEC10
00000144 R_ARM_PC24 LZMA_DEC10
00000190 R_ARM_PC24 LZMA_DEC10
000001cc R_ARM_PC24 LZMA_DEC10
000001d8 R_ARM_PC24 LZMA_DEC10
00000204 R_ARM_PC24 LZMA_DEC10
00000218 R_ARM_PC24 LZMA_DEC10
00000220 R_ARM_PC24 LZMA_DEC10
00000234 R_ARM_PC24 LZMA_DEC10
0000023c R_ARM_PC24 LZMA_DEC10
00000240 R_ARM_PC24 LZMA_DEC10
0000024c R_ARM_PC24 LZMA_DEC10
00000258 R_ARM_PC24 LZMA_DEC10
000002a4 R_ARM_PC24 LZMA_DEC10
000002c8 R_ARM_PC24 LZMA_DEC10
000002e8 R_ARM_PC24 LZMA_DEC10
00000304 R_ARM_PC24 LZMA_DEC10
0000030c R_ARM_PC24 LZMA_DEC10
0000033c R_ARM_PC24 LZMA_DEC10
00000388 R_ARM_PC24 LZMA_DEC10
000003a0 R_ARM_PC24 LZMA_DEC10
000003a8 R_ARM_PC24 LZMA_DEC10
000003cc R_ARM_PC24 LZMA_DEC10
000003e0 R_ARM_PC24 LZMA_DEC10
000003e8 R_ARM_PC24 LZMA_DEC10
00000424 R_ARM_PC24 LZMA_DEC10
00000438 R_ARM_PC24 LZMA_DEC10
0000046c R_ARM_PC24 LZMA_DEC10
00000484 R_ARM_PC24 LZMA_DEC10
0000048c R_ARM_PC24 LZMA_DEC10
000004b0 R_ARM_PC24 LZMA_DEC10
000004d4 R_ARM_PC24 LZMA_DEC10
000004ec R_ARM_PC24 LZMA_DEC10
000004f4 R_ARM_PC24 LZMA_DEC10
00000518 R_ARM_PC24 LZMA_DEC10
0000053c R_ARM_PC24 LZMA_DEC10
00000598 R_ARM_PC24 LZMA_DEC10
000005a0 R_ARM_PC24 LZMA_DEC10
000005c0 R_ARM_PC24 LZMA_DEC10
000005e4 R_ARM_PC24 LZMA_DEC10
000005fc R_ARM_PC24 LZMA_DEC10
00000604 R_ARM_PC24 LZMA_DEC10
00000624 R_ARM_PC24 LZMA_DEC10
00000648 R_ARM_PC24 LZMA_DEC10
00000680 R_ARM_PC24 LZMA_DEC10
0000068c R_ARM_PC24 LZMA_DEC10
000006d0 R_ARM_PC24 LZMA_DEC10
000006ec R_ARM_PC24 LZMA_DEC10
0000071c R_ARM_PC24 LZMA_DEC10
00000728 R_ARM_PC24 LZMA_DEC10
0000076c R_ARM_PC24 LZMA_DEC10
0000077c R_ARM_PC24 LZMA_DEC10
0000079c R_ARM_PC24 LZMA_DEC10
000007b8 R_ARM_PC24 LZMA_DEC10
000007c4 R_ARM_PC24 LZMA_DEC10
000007d0 R_ARM_PC24 LZMA_DEC10
000007f4 R_ARM_PC24 LZMA_DEC10
00000820 R_ARM_PC24 LZMA_DEC10
0000082c R_ARM_PC24 LZMA_DEC10
0000087c R_ARM_PC24 LZMA_DEC10
00000888 R_ARM_PC24 LZMA_DEC10
000008a0 R_ARM_PC24 LZMA_DEC10
000008e8 R_ARM_PC24 LZMA_DEC10
000008f4 R_ARM_PC24 LZMA_DEC10
000008fc R_ARM_PC24 LZMA_DEC10
00000904 R_ARM_PC24 LZMA_DEC10
00000928 R_ARM_PC24 LZMA_DEC10
RELOCATION RECORDS FOR [LZMA_DEC20]:
OFFSET TYPE VALUE
00000074 R_ARM_PC24 LZMA_DEC20
00000090 R_ARM_PC24 LZMA_DEC20
000000b8 R_ARM_PC24 LZMA_DEC20
000000cc R_ARM_PC24 LZMA_DEC20
000000f4 R_ARM_PC24 LZMA_DEC20
00000100 R_ARM_PC24 LZMA_DEC20
00000108 R_ARM_PC24 LZMA_DEC20
00000144 R_ARM_PC24 LZMA_DEC20
00000190 R_ARM_PC24 LZMA_DEC20
000001cc R_ARM_PC24 LZMA_DEC20
000001d8 R_ARM_PC24 LZMA_DEC20
00000204 R_ARM_PC24 LZMA_DEC20
00000218 R_ARM_PC24 LZMA_DEC20
00000220 R_ARM_PC24 LZMA_DEC20
00000234 R_ARM_PC24 LZMA_DEC20
0000023c R_ARM_PC24 LZMA_DEC20
00000240 R_ARM_PC24 LZMA_DEC20
0000024c R_ARM_PC24 LZMA_DEC20
00000258 R_ARM_PC24 LZMA_DEC20
000002a4 R_ARM_PC24 LZMA_DEC20
000002c8 R_ARM_PC24 LZMA_DEC20
000002e8 R_ARM_PC24 LZMA_DEC20
00000304 R_ARM_PC24 LZMA_DEC20
0000030c R_ARM_PC24 LZMA_DEC20
0000033c R_ARM_PC24 LZMA_DEC20
00000388 R_ARM_PC24 LZMA_DEC20
000003a0 R_ARM_PC24 LZMA_DEC20
000003a8 R_ARM_PC24 LZMA_DEC20
000003cc R_ARM_PC24 LZMA_DEC20
000003e0 R_ARM_PC24 LZMA_DEC20
000003e8 R_ARM_PC24 LZMA_DEC20
00000424 R_ARM_PC24 LZMA_DEC20
00000438 R_ARM_PC24 LZMA_DEC20
0000046c R_ARM_PC24 LZMA_DEC20
00000484 R_ARM_PC24 LZMA_DEC20
0000048c R_ARM_PC24 LZMA_DEC20
000004b0 R_ARM_PC24 LZMA_DEC20
000004d4 R_ARM_PC24 LZMA_DEC20
000004ec R_ARM_PC24 LZMA_DEC20
000004f4 R_ARM_PC24 LZMA_DEC20
00000518 R_ARM_PC24 LZMA_DEC20
0000053c R_ARM_PC24 LZMA_DEC20
00000598 R_ARM_PC24 LZMA_DEC20
000005a0 R_ARM_PC24 LZMA_DEC20
000005c0 R_ARM_PC24 LZMA_DEC20
000005e4 R_ARM_PC24 LZMA_DEC20
000005fc R_ARM_PC24 LZMA_DEC20
00000604 R_ARM_PC24 LZMA_DEC20
00000624 R_ARM_PC24 LZMA_DEC20
00000648 R_ARM_PC24 LZMA_DEC20
00000680 R_ARM_PC24 LZMA_DEC20
0000068c R_ARM_PC24 LZMA_DEC20
000006d0 R_ARM_PC24 LZMA_DEC20
000006ec R_ARM_PC24 LZMA_DEC20
0000071c R_ARM_PC24 LZMA_DEC20
00000728 R_ARM_PC24 LZMA_DEC20
0000076c R_ARM_PC24 LZMA_DEC20
0000077c R_ARM_PC24 LZMA_DEC20
0000079c R_ARM_PC24 LZMA_DEC20
000007b8 R_ARM_PC24 LZMA_DEC20
000007c4 R_ARM_PC24 LZMA_DEC20
000007d0 R_ARM_PC24 LZMA_DEC20
000007f4 R_ARM_PC24 LZMA_DEC20
00000820 R_ARM_PC24 LZMA_DEC20
0000082c R_ARM_PC24 LZMA_DEC20
0000087c R_ARM_PC24 LZMA_DEC20
00000888 R_ARM_PC24 LZMA_DEC20
000008a0 R_ARM_PC24 LZMA_DEC20
000008e8 R_ARM_PC24 LZMA_DEC20
000008f4 R_ARM_PC24 LZMA_DEC20
000008fc R_ARM_PC24 LZMA_DEC20
00000904 R_ARM_PC24 LZMA_DEC20
00000928 R_ARM_PC24 LZMA_DEC20
+59 -59
View File
@@ -18,29 +18,29 @@ Idx Name Size VMA LMA File off Algn Flags
13 dec.ptr.hi 00000008 00000000 00000000 00000138 2**0 CONTENTS, RELOC, READONLY 13 dec.ptr.hi 00000008 00000000 00000000 00000138 2**0 CONTENTS, RELOC, READONLY
14 con.entry 00000000 00000000 00000000 00000140 2**0 CONTENTS, READONLY 14 con.entry 00000000 00000000 00000000 00000140 2**0 CONTENTS, READONLY
15 con.exit 0000002c 00000000 00000000 00000140 2**0 CONTENTS, RELOC, READONLY 15 con.exit 0000002c 00000000 00000000 00000140 2**0 CONTENTS, RELOC, READONLY
16 bss.cdb.start.lzma 00000018 00000000 00000000 0000016c 2**0 CONTENTS, RELOC, READONLY 16 bss.cdb.start.lzma 0000001c 00000000 00000000 0000016c 2**0 CONTENTS, RELOC, READONLY
17 bss.cdb.entry.lzma 00000024 00000000 00000000 00000184 2**0 CONTENTS, RELOC, READONLY 17 bss.cdb.entry.lzma 00000024 00000000 00000000 00000188 2**0 CONTENTS, RELOC, READONLY
18 bss.con.start 00000038 00000000 00000000 000001a8 2**0 CONTENTS, RELOC, READONLY 18 bss.con.start 00000038 00000000 00000000 000001ac 2**0 CONTENTS, RELOC, READONLY
19 bss.exit 0000002c 00000000 00000000 000001e0 2**0 CONTENTS, RELOC, READONLY 19 bss.exit 0000002c 00000000 00000000 000001e4 2**0 CONTENTS, RELOC, READONLY
20 memset.short 00000014 00000000 00000000 0000020c 2**0 CONTENTS, RELOC, READONLY 20 memset.short 00000014 00000000 00000000 00000210 2**0 CONTENTS, RELOC, READONLY
21 memset.long 00000018 00000000 00000000 00000220 2**0 CONTENTS, RELOC, READONLY 21 memset.long 00000018 00000000 00000000 00000224 2**0 CONTENTS, RELOC, READONLY
22 nrv2b.8bit 000001ac 00000000 00000000 00000238 2**0 CONTENTS, RELOC, READONLY 22 nrv2b.8bit 000001ec 00000000 00000000 0000023c 2**0 CONTENTS, RELOC, READONLY
23 nrv2d.8bit 000001e0 00000000 00000000 000003e4 2**0 CONTENTS, RELOC, READONLY 23 nrv2d.8bit 00000228 00000000 00000000 00000428 2**0 CONTENTS, RELOC, READONLY
24 nrv2e.8bit 00000200 00000000 00000000 000005c4 2**0 CONTENTS, RELOC, READONLY 24 nrv2e.8bit 00000250 00000000 00000000 00000650 2**0 CONTENTS, RELOC, READONLY
25 nrv2b.32bit 000001c8 00000000 00000000 000007c4 2**0 CONTENTS, RELOC, READONLY 25 nrv2b.32bit 000001ec 00000000 00000000 000008a0 2**0 CONTENTS, RELOC, READONLY
26 nrv2d.32bit 00000200 00000000 00000000 0000098c 2**0 CONTENTS, RELOC, READONLY 26 nrv2d.32bit 00000228 00000000 00000000 00000a8c 2**0 CONTENTS, RELOC, READONLY
27 nrv2e.32bit 00000224 00000000 00000000 00000b8c 2**0 CONTENTS, RELOC, READONLY 27 nrv2e.32bit 00000250 00000000 00000000 00000cb4 2**0 CONTENTS, RELOC, READONLY
28 8bit.sub 00000020 00000000 00000000 00000db0 2**0 CONTENTS, READONLY 28 8bit.sub 00000024 00000000 00000000 00000f04 2**0 CONTENTS, READONLY
29 32bit.sub 00000024 00000000 00000000 00000dd0 2**0 CONTENTS, READONLY 29 32bit.sub 0000002c 00000000 00000000 00000f28 2**0 CONTENTS, READONLY
30 nrv2b.small 000000d0 00000000 00000000 00000df4 2**0 CONTENTS, RELOC, READONLY 30 nrv2b.small 000000d8 00000000 00000000 00000f54 2**0 CONTENTS, RELOC, READONLY
31 nrv2d.small 000000e8 00000000 00000000 00000ec4 2**0 CONTENTS, RELOC, READONLY 31 nrv2d.small 000000f0 00000000 00000000 0000102c 2**0 CONTENTS, RELOC, READONLY
32 nrv2e.small 000000f8 00000000 00000000 00000fac 2**0 CONTENTS, RELOC, READONLY 32 nrv2e.small 00000100 00000000 00000000 0000111c 2**0 CONTENTS, RELOC, READONLY
33 nrv.done 00000000 00000000 00000000 000010a4 2**0 CONTENTS, READONLY 33 nrv.done 00000000 00000000 00000000 0000121c 2**0 CONTENTS, READONLY
34 decompressor.start 00000000 00000000 00000000 000010a4 2**0 CONTENTS, READONLY 34 decompressor.start 00000000 00000000 00000000 0000121c 2**0 CONTENTS, READONLY
35 lzma.init 00000050 00000000 00000000 000010a4 2**0 CONTENTS, RELOC, READONLY 35 lzma.init 00000050 00000000 00000000 0000121c 2**0 CONTENTS, RELOC, READONLY
36 LZMA_DEC10 00000ad8 00000000 00000000 000010f4 2**0 CONTENTS, READONLY 36 LZMA_DEC10 00000ad8 00000000 00000000 0000126c 2**0 CONTENTS, READONLY
37 LZMA_DEC20 00000ad8 00000000 00000000 00001bcc 2**0 CONTENTS, READONLY 37 LZMA_DEC20 00000ad8 00000000 00000000 00001d44 2**0 CONTENTS, READONLY
38 UPX1HEAD 00000020 00000000 00000000 000026a4 2**0 CONTENTS, READONLY 38 UPX1HEAD 00000020 00000000 00000000 0000281c 2**0 CONTENTS, READONLY
SYMBOL TABLE: SYMBOL TABLE:
00000000 l d nrv.done 00000000 nrv.done 00000000 l d nrv.done 00000000 nrv.done
00000000 l d decompressor.start 00000000 decompressor.start 00000000 l d decompressor.start 00000000 decompressor.start
@@ -92,8 +92,8 @@ SYMBOL TABLE:
00000000 *UND* 00000000 PAD 00000000 *UND* 00000000 PAD
00000000 *UND* 00000000 wrkmem 00000000 *UND* 00000000 wrkmem
00000000 *UND* 00000000 SC 00000000 *UND* 00000000 SC
0000000c g O 8bit.sub 00000000 gb8_e 00000014 g O 8bit.sub 00000000 gb8_e
00000010 g O 32bit.sub 00000000 gb32_e 0000001c g O 32bit.sub 00000000 gb32_e
00000000 *UND* 00000000 gb_e 00000000 *UND* 00000000 gb_e
00000000 *UND* 00000000 lzma_stack_adjust 00000000 *UND* 00000000 lzma_stack_adjust
00000000 *UND* 00000000 lzma_c_len 00000000 *UND* 00000000 lzma_c_len
@@ -174,7 +174,7 @@ OFFSET TYPE VALUE
00000000 R_MIPS_HI16 PSVR 00000000 R_MIPS_HI16 PSVR
00000004 R_MIPS_LO16 PSVR 00000004 R_MIPS_LO16 PSVR
0000000c R_MIPS_HI16 wrkmem 0000000c R_MIPS_HI16 wrkmem
00000014 R_MIPS_LO16 wrkmem 00000010 R_MIPS_LO16 wrkmem
RELOCATION RECORDS FOR [bss.cdb.entry.lzma]: RELOCATION RECORDS FOR [bss.cdb.entry.lzma]:
OFFSET TYPE VALUE OFFSET TYPE VALUE
@@ -201,63 +201,63 @@ OFFSET TYPE VALUE
RELOCATION RECORDS FOR [nrv2b.8bit]: RELOCATION RECORDS FOR [nrv2b.8bit]:
OFFSET TYPE VALUE OFFSET TYPE VALUE
000000a8 R_MIPS_PC16 nrv.done 000000c4 R_MIPS_PC16 nrv.done
RELOCATION RECORDS FOR [nrv2d.8bit]: RELOCATION RECORDS FOR [nrv2d.8bit]:
OFFSET TYPE VALUE OFFSET TYPE VALUE
000000f0 R_MIPS_PC16 nrv.done 0000011c R_MIPS_PC16 nrv.done
RELOCATION RECORDS FOR [nrv2e.8bit]: RELOCATION RECORDS FOR [nrv2e.8bit]:
OFFSET TYPE VALUE OFFSET TYPE VALUE
000000f0 R_MIPS_PC16 nrv.done 0000011c R_MIPS_PC16 nrv.done
RELOCATION RECORDS FOR [nrv2b.32bit]: RELOCATION RECORDS FOR [nrv2b.32bit]:
OFFSET TYPE VALUE OFFSET TYPE VALUE
000000b4 R_MIPS_PC16 nrv.done 000000c4 R_MIPS_PC16 nrv.done
RELOCATION RECORDS FOR [nrv2d.32bit]: RELOCATION RECORDS FOR [nrv2d.32bit]:
OFFSET TYPE VALUE OFFSET TYPE VALUE
00000104 R_MIPS_PC16 nrv.done 0000011c R_MIPS_PC16 nrv.done
RELOCATION RECORDS FOR [nrv2e.32bit]: RELOCATION RECORDS FOR [nrv2e.32bit]:
OFFSET TYPE VALUE OFFSET TYPE VALUE
00000104 R_MIPS_PC16 nrv.done 0000011c R_MIPS_PC16 nrv.done
RELOCATION RECORDS FOR [nrv2b.small]: RELOCATION RECORDS FOR [nrv2b.small]:
OFFSET TYPE VALUE OFFSET TYPE VALUE
00000008 R_MIPS_PC16 gb_e 0000000c R_MIPS_PC16 gb_e
00000028 R_MIPS_PC16 gb_e 0000002c R_MIPS_PC16 gb_e
00000030 R_MIPS_PC16 gb_e 00000034 R_MIPS_PC16 gb_e
00000060 R_MIPS_PC16 nrv.done 00000064 R_MIPS_PC16 nrv.done
0000006c R_MIPS_PC16 gb_e 00000070 R_MIPS_PC16 gb_e
00000078 R_MIPS_PC16 gb_e 0000007c R_MIPS_PC16 gb_e
00000090 R_MIPS_PC16 gb_e 00000094 R_MIPS_PC16 gb_e
00000098 R_MIPS_PC16 gb_e 0000009c R_MIPS_PC16 gb_e
RELOCATION RECORDS FOR [nrv2d.small]: RELOCATION RECORDS FOR [nrv2d.small]:
OFFSET TYPE VALUE OFFSET TYPE VALUE
00000008 R_MIPS_PC16 gb_e 0000000c R_MIPS_PC16 gb_e
00000028 R_MIPS_PC16 gb_e 0000002c R_MIPS_PC16 gb_e
00000030 R_MIPS_PC16 gb_e 00000034 R_MIPS_PC16 gb_e
00000040 R_MIPS_PC16 gb_e 00000044 R_MIPS_PC16 gb_e
00000058 R_MIPS_PC16 gb_e 0000005c R_MIPS_PC16 gb_e
00000078 R_MIPS_PC16 nrv.done 0000007c R_MIPS_PC16 nrv.done
00000090 R_MIPS_PC16 gb_e 00000094 R_MIPS_PC16 gb_e
000000a8 R_MIPS_PC16 gb_e 000000ac R_MIPS_PC16 gb_e
000000b0 R_MIPS_PC16 gb_e 000000b4 R_MIPS_PC16 gb_e
RELOCATION RECORDS FOR [nrv2e.small]: RELOCATION RECORDS FOR [nrv2e.small]:
OFFSET TYPE VALUE OFFSET TYPE VALUE
00000008 R_MIPS_PC16 gb_e 0000000c R_MIPS_PC16 gb_e
00000028 R_MIPS_PC16 gb_e 0000002c R_MIPS_PC16 gb_e
00000030 R_MIPS_PC16 gb_e 00000034 R_MIPS_PC16 gb_e
00000040 R_MIPS_PC16 gb_e 00000044 R_MIPS_PC16 gb_e
00000058 R_MIPS_PC16 gb_e 0000005c R_MIPS_PC16 gb_e
00000078 R_MIPS_PC16 nrv.done 0000007c R_MIPS_PC16 nrv.done
00000090 R_MIPS_PC16 gb_e 00000094 R_MIPS_PC16 gb_e
000000a8 R_MIPS_PC16 gb_e 000000ac R_MIPS_PC16 gb_e
000000b8 R_MIPS_PC16 gb_e 000000bc R_MIPS_PC16 gb_e
000000c0 R_MIPS_PC16 gb_e 000000c4 R_MIPS_PC16 gb_e
RELOCATION RECORDS FOR [lzma.init]: RELOCATION RECORDS FOR [lzma.init]:
OFFSET TYPE VALUE OFFSET TYPE VALUE
+5 -5
View File
@@ -1,6 +1,6 @@
#define UPX_VERSION_HEX 0x029300 /* 02.93.00 */ #define UPX_VERSION_HEX 0x030000 /* 03.00.00 */
#define UPX_VERSION_STRING "2.93 beta" #define UPX_VERSION_STRING "3.00"
#define UPX_VERSION_STRING4 "2.93" #define UPX_VERSION_STRING4 "3.00"
#define UPX_VERSION_DATE "Mar 8th 2007" #define UPX_VERSION_DATE "Apr 27th 2007"
#define UPX_VERSION_DATE_ISO "2007-03-08" #define UPX_VERSION_DATE_ISO "2007-04-27"
#define UPX_VERSION_YEAR "2007" #define UPX_VERSION_YEAR "2007"
+9 -5
View File
@@ -58,12 +58,13 @@
void do_one_file(const char *iname, char *oname) void do_one_file(const char *iname, char *oname)
{ {
int r;
struct stat st; struct stat st;
memset(&st, 0, sizeof(st)); memset(&st, 0, sizeof(st));
#if defined(HAVE_LSTAT) #if defined(HAVE_LSTAT)
int r = lstat(iname,&st); r = lstat(iname,&st);
#else #else
int r = stat(iname,&st); r = stat(iname,&st);
#endif #endif
if (r != 0) if (r != 0)
@@ -211,15 +212,18 @@ void do_one_file(const char *iname, char *oname)
struct utimbuf u; struct utimbuf u;
u.actime = st.st_atime; u.actime = st.st_atime;
u.modtime = st.st_mtime; u.modtime = st.st_mtime;
(void) ::utime(name,&u); r = utime(name, &u);
UNUSED(r);
#endif #endif
#if defined(HAVE_CHMOD) #if defined(HAVE_CHMOD)
// copy permissions // copy permissions
(void) ::chmod(name, st.st_mode); r = chmod(name, st.st_mode);
UNUSED(r);
#endif #endif
#if defined(HAVE_CHOWN) #if defined(HAVE_CHOWN)
// copy the ownership // copy the ownership
(void) ::chown(name, st.st_uid, st.st_gid); r = chown(name, st.st_uid, st.st_gid);
UNUSED(r);
#endif #endif
} }