diff --git a/src/stub/Makefile b/src/stub/Makefile index 9e43613a..daf08a4b 100644 --- a/src/stub/Makefile +++ b/src/stub/Makefile @@ -9,10 +9,12 @@ MAKEFLAGS += -rR .SUFFIXES: +.SECONDEXPANSION: export SHELL = /bin/sh -# GNU make 3.81 -.SECONDEXPANSION: +ifneq ($(findstring $(firstword $(MAKE_VERSION)),3.79 3.79.1 3.80),) +$(error GNU make 3.81 or better is required) +endif # update $PATH for our special stub build tools ifneq ($(wildcard $(HOME)/local/bin/bin-upx),) @@ -125,14 +127,14 @@ tc.i386.app-nasm = perl -w $(srcdir)/src/arch/i386/app-nasm.pl # slightly tricky make stuff follows +# enumerate the names of all variables that will get tested (from basename and $(tc_list)) +__tc_varlist = tc.$(basename $(notdir $@)).$1 $(foreach __tc_varlist_tmp,$(tc_list),tc.$(__tc_varlist_tmp).$1) +# return the name of the first variable that is not empty +__tc_varsearch = $(firstword $(foreach __tc_varsearch_tmp,$1,$(if $($(__tc_varsearch_tmp)),$(__tc_varsearch_tmp),))) # error sentinel for missing commands __tc_FALSE = false tc_FALSE: '$1' '$@' '$<' -# enumerate all variables that will get tested (from basename and $(tc_list)) -__tc_varlist = tc.$(basename $(notdir $@)).$1 $(foreach __tc_varlist_tmp,$(tc_list),tc.$(__tc_varlist_tmp).$1) -# return the _name_ of the first variable that is not empty -__tc_varsearch = $(firstword $(foreach __tc_varsearch_tmp,$2,$(if $($(__tc_varsearch_tmp)),$(__tc_varsearch_tmp),)) $3) # expand the first variable that is not empty -tc = $($(call __tc_varsearch,$1,$(call __tc_varlist,$1),__tc_FALSE)) +tc = $($(call __tc_varsearch,$(call __tc_varlist,$1) __tc_FALSE)) # clear some vars, just in case @@ -523,7 +525,7 @@ mipsel.r3000-ps1-console.h: IDENT_NAME = nrv_con_loader powerpc-linux.elf% : tc_list = powerpc-linux.elf default -tc.powerpc-linux.elf.gcc = powerpc-750-linux-gnu-gcc-3.4.4 -mcpu=750 -nostdinc -MMD +tc.powerpc-linux.elf.gcc = powerpc-750-linux-gnu-gcc-3.4.4 -mcpu=405 -nostdinc -MMD tc.powerpc-linux.elf.gcc += -fno-exceptions -fno-asynchronous-unwind-tables tc.powerpc-linux.elf.gcc += -Wall -W -Wcast-align -Wcast-qual -Wwrite-strings -Werror tc.powerpc-linux.elf.ld = powerpc-750-linux-gnu-ld @@ -538,7 +540,7 @@ powerpc-linux.elf-entry.h : $(srcdir)/src/$$T.S powerpc-linux.elf-fold.h : tmp/$$T.o tmp/powerpc-linux.elf-main.o $(call tc,ld) -T $(srcdir)/src/$T.lds -Map tmp/$T.map -o tmp/$T.bin --strip-all $(filter %.o,$^) -## $(call tc,sstrip) tmp/$T.bin ## FIXME / TODO + $(call tc,sstrip) tmp/$T.bin $(call tc,bin2h) --ident=linux_elfppc32_fold tmp/$T.bin $@ tmp/powerpc-linux.elf-fold.o : $(srcdir)/src/$$T.S @@ -554,6 +556,7 @@ tmp/powerpc-linux.elf-main.o : $(srcdir)/src/$$T.c # // powerpc-darwin.macho # ************************************************************************/ +# info: we use the tc settings from powerpc-linux.elf powerpc-darwin.macho% : tc_list = powerpc-linux.elf default powerpc-darwin.macho-entry.h : $(srcdir)/src/$$T.S @@ -564,7 +567,6 @@ powerpc-darwin.macho-entry.h : $(srcdir)/src/$$T.S powerpc-darwin.macho-fold.h : tmp/$$T.o tmp/powerpc-darwin.macho-main.o $(call tc,ld) --oformat binary -Map tmp/$T.map -o tmp/$T.bin --strip-all $(filter %.o,$^) -## $(call tc,sstrip) tmp/$T.bin ## FIXME / TODO $(call tc,bin2h) --ident=fold_machppc32 tmp/$T.bin $@ tmp/powerpc-darwin.macho-fold.o : $(srcdir)/src/$$T.S @@ -586,51 +588,4 @@ tmp/powerpc-darwin.macho-main.o : $(srcdir)/src/$$T.c -include tmp/*.d -# /*********************************************************************** -# // debug -# ************************************************************************/ - -define debug-diff - -diff $(HOME)/p/compress/upx/680c27309177-upx.hg/src/stub/$2 $1 -endef - -debug-diff: all - $(call debug-diff,amd64-linux.elf-entry.h,l_lx_elf64amd.h) - $(call debug-diff,amd64-linux.elf-fold.h,fold_elf64amd.h) - $(call debug-diff,arm-linux.elf-entry.h,l_lx_elf32arm.h) - $(call debug-diff,arm-linux.elf-fold.h,fold_elf32arm.h) - $(call debug-diff,arm.v4a-wince.pe.h,l_armpea.h) - $(call debug-diff,arm.v4t-wince.pe.h,l_armpet.h) - $(call debug-diff,i086-dos16.com.h,l_com.h) - $(call debug-diff,i086-dos16.exe.h,l_exe.h) - $(call debug-diff,i086-dos16.sys.h,l_sys.h) - $(call debug-diff,i386-dos32.djgpp2.h,l_djgpp2.h) - $(call debug-diff,i386-dos32.djgpp2-stubify.h,stubify.h) - $(call debug-diff,i386-dos32.tmt.h,l_tmt.h) - $(call debug-diff,i386-dos32.watcom.le.h,l_wcle.h) - $(call debug-diff,i386-linux.elf-entry.h,l_lx_elf86.h) - $(call debug-diff,i386-linux.elf-fold.h,fold_elf86.h) - $(call debug-diff,i386-linux.elf.execve-entry.h,l_lx_exec86.h) - $(call debug-diff,i386-linux.elf.execve-fold.h,fold_exec86.h) - $(call debug-diff,i386-linux.elf.interp-entry.h,l_lx_pti86.h) - $(call debug-diff,i386-linux.elf.interp-fold.h,fold_pti86.h) - $(call debug-diff,i386-linux.elf.shell-entry.h,l_lx_sh86.h) - $(call debug-diff,i386-linux.elf.shell-fold.h,fold_sh86.h) - $(call debug-diff,i386-linux.kernel.vmlinux.h,l_vmlinx.h) - $(call debug-diff,i386-linux.kernel.vmlinuz.h,l_vmlinz.h) - $(call debug-diff,i386-win32.pe.h,l_w32pe.h) - $(call debug-diff,m68k-atari.tos-nrv2b.h,l_t_n2b.h) - $(call debug-diff,m68k-atari.tos-nrv2b.small.h,l_t_n2bs.h) - $(call debug-diff,m68k-atari.tos-nrv2d.h,l_t_n2d.h) - $(call debug-diff,m68k-atari.tos-nrv2d.small.h,l_t_n2ds.h) - $(call debug-diff,m68k-atari.tos-nrv2e.h,l_t_n2e.h) - $(call debug-diff,m68k-atari.tos-nrv2e.small.h,l_t_n2es.h) - $(call debug-diff,mipsel.r3000-ps1-boot.h,l_ps1b.h) - $(call debug-diff,mipsel.r3000-ps1-console.h,l_ps1c.h) - $(call debug-diff,powerpc-darwin.macho-entry.h,l_mac_ppc32.h) - $(call debug-diff,powerpc-darwin.macho-fold.h,fold_machppc32.h) - $(call debug-diff,powerpc-linux.elf-entry.h,l_lx_elfppc32.h) - $(call debug-diff,powerpc-linux.elf-fold.h,fold_elfppc32.h) - - # vi:ts=8:nowrap diff --git a/src/stub/powerpc-darwin.macho-fold.h b/src/stub/powerpc-darwin.macho-fold.h index d1777121..eaa37aa8 100644 --- a/src/stub/powerpc-darwin.macho-fold.h +++ b/src/stub/powerpc-darwin.macho-fold.h @@ -1,4 +1,4 @@ -/* powerpc-darwin.macho-fold.h -- created from powerpc-darwin.macho-fold.bin, 1648 (0x670) bytes +/* powerpc-darwin.macho-fold.h -- created from powerpc-darwin.macho-fold.bin, 1656 (0x678) bytes This file is part of the UPX executable compressor. @@ -27,11 +27,11 @@ */ -#define FOLD_MACHPPC32_SIZE 1648 -#define FOLD_MACHPPC32_ADLER32 0x16162538 -#define FOLD_MACHPPC32_CRC32 0x67f187d4 +#define FOLD_MACHPPC32_SIZE 1656 +#define FOLD_MACHPPC32_ADLER32 0xd5122682 +#define FOLD_MACHPPC32_CRC32 0x79ba857a -unsigned char fold_machppc32[1648] = { +unsigned char fold_machppc32[1656] = { 72, 0, 0,105, 40, 6, 0,208, 76,130, 0, 32, 84,132,240,191, /* 0x 0 */ 77,130, 0, 32, 60, 0, 0, 16,124, 4, 0, 64, 65,128, 0, 8, /* 0x 10 */ 124, 4, 3,120, 56,165, 1, 32,124,103, 27,120, 56, 99,255,252, /* 0x 20 */ @@ -56,11 +56,11 @@ unsigned char fold_machppc32[1648] = { 75,255,255,185, 47,133, 0, 0, 65,158, 0, 28,124,169, 3,166, /* 0x 150 */ 136, 9, 0, 0, 57, 41, 0, 1,152, 4, 0, 0, 56,132, 0, 1, /* 0x 160 */ 66, 0,255,240,128, 3, 0, 0,129, 35, 0, 4,124, 5, 0, 80, /* 0x 170 */ -144, 3, 0, 0,125, 41, 42, 20,128, 1, 0, 20, 56, 33, 0, 16, /* 0x 180 */ -145, 35, 0, 4,124, 8, 3,166, 78,128, 0, 32,124, 8, 2,166, /* 0x 190 */ -148, 33,255,192,191,129, 0, 48,124,159, 35,120,124,126, 27,120, /* 0x 1a0 */ -124,188, 43,120,144, 1, 0, 68,124,221, 51,120,128, 4, 0, 0, /* 0x 1b0 */ - 47,128, 0, 0, 65,158, 1, 32, 56,160, 0, 12,127,195,243,120, /* 0x 1c0 */ +144, 3, 0, 0,128, 1, 0, 20,125, 41, 42, 20,124, 8, 3,166, /* 0x 180 */ + 56, 33, 0, 16,145, 35, 0, 4, 78,128, 0, 32,124, 8, 2,166, /* 0x 190 */ +148, 33,255,192,144, 1, 0, 68,128, 4, 0, 0,191,129, 0, 48, /* 0x 1a0 */ + 47,128, 0, 0,124,159, 35,120,124,126, 27,120,124,188, 43,120, /* 0x 1b0 */ +124,221, 51,120, 65,158, 1, 32, 56,160, 0, 12,127,195,243,120, /* 0x 1c0 */ 56,129, 0, 16, 75,255,255, 93,129, 33, 0, 16,128,161, 0, 20, /* 0x 1d0 */ 47,137, 0, 0, 64,190, 0, 36, 60, 0, 33, 88, 96, 0, 80, 85, /* 0x 1e0 */ 127,133, 0, 0, 64,190, 0, 28,128, 30, 0, 0, 47,128, 0, 0, /* 0x 1f0 */ @@ -72,31 +72,31 @@ unsigned char fold_machppc32[1648] = { 47,131, 0, 0, 64,190,255,188,128,129, 0, 32,128, 1, 0, 16, /* 0x 250 */ 127,132, 0, 0, 64,190,255,172,136,193, 0, 25, 49, 61,255,255, /* 0x 260 */ 124, 9,233, 16,125, 38, 0,208, 85, 41, 15,254,125, 43, 0, 57, /* 0x 270 */ - 65,162, 0, 20,128,127, 0, 4,127,168, 3,166,136,161, 0, 26, /* 0x 280 */ + 65,162, 0, 20,128,127, 0, 4,136,161, 0, 26,127,168, 3,166, /* 0x 280 */ 78,128, 0, 33,128, 30, 0, 4,129, 97, 0, 20,129, 62, 0, 0, /* 0x 290 */ 124, 0, 90, 20,125, 43, 72, 80,144, 30, 0, 4,145, 62, 0, 0, /* 0x 2a0 */ 72, 0, 0, 16,124, 4, 3,120,127,195,243,120, 75,255,254,117, /* 0x 2b0 */ 129, 97, 0, 16,129, 63, 0, 0,128, 31, 0, 4,125, 43, 72, 80, /* 0x 2c0 */ 47,137, 0, 0,124, 0, 90, 20,144, 31, 0, 4,145, 63, 0, 0, /* 0x 2d0 */ - 75,255,254,228,128, 1, 0, 68,187,129, 0, 48, 56, 33, 0, 64, /* 0x 2e0 */ -124, 8, 3,166, 78,128, 0, 32,124, 8, 2,166,148, 33,255,176, /* 0x 2f0 */ -190, 65, 0, 24,125,128, 0, 38, 58,224, 0, 0,124,122, 27,120, /* 0x 300 */ -144, 1, 0, 84,124,146, 35,120,128, 3, 0, 16,124,187, 43,120, /* 0x 310 */ -145,129, 0, 20,124,211, 51,120,127,151, 0, 64,124,244, 59,120, /* 0x 320 */ + 75,255,254,228,128, 1, 0, 68,187,129, 0, 48,124, 8, 3,166, /* 0x 2e0 */ + 56, 33, 0, 64, 78,128, 0, 32,124, 8, 2,166,148, 33,255,176, /* 0x 2f0 */ +144, 1, 0, 84,128, 3, 0, 16,190, 65, 0, 24, 58,224, 0, 0, /* 0x 300 */ +125,128, 0, 38,127,151, 0, 64,145,129, 0, 20,124,122, 27,120, /* 0x 310 */ +124,146, 35,120,124,187, 43,120,124,211, 51,120,124,244, 59,120, /* 0x 320 */ 125, 21, 67,120,125, 54, 75,120, 59,195, 0, 28, 59, 0, 0, 0, /* 0x 330 */ 64,156, 1,124,129, 62, 0, 0, 47,137, 0, 1, 64,190, 1, 48, /* 0x 340 */ -129, 62, 0, 24,129,126, 0, 36, 85, 61, 5, 62,128, 30, 0, 28, /* 0x 350 */ -127,139,234, 20,145, 97, 0, 8, 46, 28, 0, 0,127, 41, 2, 20, /* 0x 360 */ +129, 62, 0, 24,129,126, 0, 36, 85, 61, 5, 62,127,139,234, 20, /* 0x 350 */ + 46, 28, 0, 0,128, 30, 0, 28,145, 97, 0, 8,127, 41, 2, 20, /* 0x 360 */ 145, 33, 0, 12,127,253, 72, 80, 65,146, 0, 76, 47,155, 0, 0, /* 0x 370 */ 64,190, 0, 16, 47,139, 0, 0, 56,192, 0, 18, 64,158, 0, 8, /* 0x 380 */ 56,192, 16, 18, 47,139, 0, 0,126,103,155,120, 64,158, 0, 8, /* 0x 390 */ - 56,224,255,255,129, 30, 0, 32,127,227,251,120,127,132,227,120, /* 0x 3a0 */ - 56,160, 0, 3,125, 8,146, 20, 75,255,253, 57,127,159, 24, 0, /* 0x 3b0 */ + 56,224,255,255,129, 30, 0, 32,127,227,251,120,125, 8,146, 20, /* 0x 3a0 */ +127,132,227,120, 56,160, 0, 3, 75,255,253, 57,127,159, 24, 0, /* 0x 3b0 */ 64,158, 0,124, 47,155, 0, 0, 65,158, 0, 52,128, 30, 0, 36, /* 0x 3c0 */ 47,128, 0, 0, 65,158, 0, 40,128, 30, 0, 32, 47,128, 0, 0, /* 0x 3d0 */ 64,158, 0, 8,147,244, 0, 0,127, 99,219,120, 56,129, 0, 8, /* 0x 3e0 */ 126,165,171,120,126,198,179,120, 75,255,253,165,124, 28, 0,208, /* 0x 3f0 */ -125, 63,226, 20,112, 29, 15,255, 65,130, 0, 24,127,169, 3,166, /* 0x 400 */ +112, 29, 15,255,125, 63,226, 20, 65,130, 0, 24,127,169, 3,166, /* 0x 400 */ 56, 0, 0, 0,152, 9, 0, 0, 57, 41, 0, 1, 66, 0,255,248, /* 0x 410 */ 65,178, 0, 36,128,190, 0, 44,127,227,251,120,127,132,227,120, /* 0x 420 */ 75,255,252,249, 47,131, 0, 0, 65,190, 0, 12, 56, 96, 0,127, /* 0x 430 */ @@ -108,31 +108,32 @@ unsigned char fold_machppc32[1648] = { 64,190, 0, 20,128, 30, 0, 12, 47,128, 0, 40, 64,190, 0, 8, /* 0x 490 */ 58,254, 0, 16,128, 26, 0, 16, 59, 24, 0, 1,127,152, 0, 64, /* 0x 4a0 */ 128, 30, 0, 4,127,222, 2, 20, 75,255,254,136,128, 1, 0, 84, /* 0x 4b0 */ -126,227,187,120,129,129, 0, 20,186, 65, 0, 24,124, 8, 3,166, /* 0x 4c0 */ - 56, 33, 0, 80,125,128,129, 32, 78,128, 0, 32,148, 33,255,192, /* 0x 4d0 */ -124, 8, 2,166,144,129, 0, 8,191, 97, 0, 44,129, 97, 0, 8, /* 0x 4e0 */ -124,191, 43,120,144, 1, 0, 68, 56, 3, 0, 24, 57,107,255,232, /* 0x 4f0 */ -144, 1, 0, 20,145, 97, 0, 16,125, 27, 67,120,128, 3, 0, 24, /* 0x 500 */ -125, 60, 75,120,200, 1, 0, 16,124,253, 59,120,124,229, 59,120, /* 0x 510 */ - 56, 97, 0, 16, 56,129, 0, 24,124,222, 51,120, 56,192, 0, 0, /* 0x 520 */ -144, 1, 0, 24,216, 1, 0, 32,147,225, 0, 28, 75,255,252, 97, /* 0x 530 */ -127,105,219,120,127,135,227,120,127,227,251,120,127,168,235,120, /* 0x 540 */ - 56,128, 0, 0, 56,161, 0, 32, 56,192,255,255, 59, 96, 0, 0, /* 0x 550 */ - 75,255,253,153,129, 95, 0, 16, 57, 96, 0, 0,124,124, 27,120, /* 0x 560 */ -127,139, 80, 64, 57, 63, 0, 28, 64,156, 0,224,128, 9, 0, 0, /* 0x 570 */ - 57,107, 0, 1,127, 11, 80, 64, 47,128, 0, 14, 64,190, 0,192, /* 0x 580 */ -128,105, 0, 8, 56,128, 0, 0, 56,160, 0, 0,124,105, 26, 20, /* 0x 590 */ - 75,255,251,121,124,125, 27,121, 65,128, 0, 32,127,163,235,120, /* 0x 5a0 */ -127,228,251,120,127,197,243,120,127,102,219,120, 75,255,251, 37, /* 0x 5b0 */ -127,158, 24, 0, 65,190, 0, 20, 56, 96, 0,127, 75,255,251, 61, /* 0x 5c0 */ -131,105, 0, 8, 75,255,255,216,128, 31, 0, 0, 61, 32,202,254, /* 0x 5d0 */ - 97, 41,186,190,127,128, 72, 0, 64,158, 0, 52,129, 95, 0, 4, /* 0x 5e0 */ - 57, 96, 0, 0, 57, 63, 0, 8,127,139, 80, 64, 64,156, 0, 32, /* 0x 5f0 */ -128, 9, 0, 0, 57,107, 0, 1,127, 11, 80, 64, 47,128, 0, 18, /* 0x 600 */ - 65,190,255,192, 57, 41, 0, 20, 65,152,255,232,127,227,251,120, /* 0x 610 */ -127,100,219,120, 56,160, 0, 0,127,166,235,120, 56,224, 0, 0, /* 0x 620 */ - 57, 0, 0, 0, 57, 32, 0, 0, 75,255,252,193,124,124, 27,120, /* 0x 630 */ -127,163,235,120, 75,255,250,221, 72, 0, 0, 16,128, 9, 0, 4, /* 0x 640 */ -125, 41, 2, 20, 65,152,255, 40,128, 1, 0, 68,127,131,227,120, /* 0x 650 */ -187, 97, 0, 44, 56, 33, 0, 64,124, 8, 3,166, 78,128, 0, 32 /* 0x 660 */ +129,129, 0, 20,126,227,187,120,124, 8, 3,166,186, 65, 0, 24, /* 0x 4c0 */ +125,128,129, 32, 56, 33, 0, 80, 78,128, 0, 32,148, 33,255,192, /* 0x 4d0 */ +144,129, 0, 8,124, 8, 2,166,129, 97, 0, 8,144, 1, 0, 68, /* 0x 4e0 */ + 57,107,255,232, 56, 3, 0, 24,145, 97, 0, 16,144, 1, 0, 20, /* 0x 4f0 */ +191, 97, 0, 44,128, 3, 0, 24,129, 65, 0, 20,125, 60, 75,120, /* 0x 500 */ +129, 33, 0, 16,124,191, 43,120,125, 27, 67,120,124,253, 59,120, /* 0x 510 */ +124,229, 59,120, 56, 97, 0, 16, 56,129, 0, 24,124,222, 51,120, /* 0x 520 */ + 56,192, 0, 0,145, 65, 0, 36,144, 1, 0, 24,145, 33, 0, 32, /* 0x 530 */ +147,225, 0, 28, 75,255,252, 89,127,105,219,120,127,135,227,120, /* 0x 540 */ +127,227,251,120,127,168,235,120, 56,128, 0, 0, 56,161, 0, 32, /* 0x 550 */ + 56,192,255,255, 75,255,253,149,129, 95, 0, 16, 57, 96, 0, 0, /* 0x 560 */ +127,139, 80, 64,124,124, 27,120, 59, 96, 0, 0, 57, 63, 0, 28, /* 0x 570 */ + 64,156, 0,224,128, 9, 0, 0, 57,107, 0, 1, 47,128, 0, 14, /* 0x 580 */ +127, 11, 80, 64, 64,190, 0,192,128,105, 0, 8, 56,128, 0, 0, /* 0x 590 */ +124,105, 26, 20, 56,160, 0, 0, 75,255,251,113,124,125, 27,121, /* 0x 5a0 */ + 65,128, 0, 32,127,163,235,120,127,228,251,120,127,197,243,120, /* 0x 5b0 */ +127,102,219,120, 75,255,251, 29,127,158, 24, 0, 65,190, 0, 20, /* 0x 5c0 */ + 56, 96, 0,127, 75,255,251, 53,131,105, 0, 8, 75,255,255,216, /* 0x 5d0 */ +128, 31, 0, 0, 61, 32,202,254, 97, 41,186,190,127,128, 72, 0, /* 0x 5e0 */ + 64,158, 0, 52,129, 95, 0, 4, 57, 96, 0, 0,127,139, 80, 64, /* 0x 5f0 */ + 57, 63, 0, 8, 64,156, 0, 32,128, 9, 0, 0, 57,107, 0, 1, /* 0x 600 */ + 47,128, 0, 18,127, 11, 80, 64, 65,190,255,192, 57, 41, 0, 20, /* 0x 610 */ + 65,152,255,232,127,227,251,120,127,100,219,120, 56,160, 0, 0, /* 0x 620 */ +127,166,235,120, 56,224, 0, 0, 57, 0, 0, 0, 57, 32, 0, 0, /* 0x 630 */ + 75,255,252,185,124,124, 27,120,127,163,235,120, 75,255,250,213, /* 0x 640 */ + 72, 0, 0, 16,128, 9, 0, 4,125, 41, 2, 20, 65,152,255, 40, /* 0x 650 */ +128, 1, 0, 68,127,131,227,120,124, 8, 3,166,187, 97, 0, 44, /* 0x 660 */ + 56, 33, 0, 64, 78,128, 0, 32 /* 0x 670 */ }; diff --git a/src/stub/powerpc-linux.elf-fold.h b/src/stub/powerpc-linux.elf-fold.h index da2522ef..47b93458 100644 --- a/src/stub/powerpc-linux.elf-fold.h +++ b/src/stub/powerpc-linux.elf-fold.h @@ -1,4 +1,4 @@ -/* powerpc-linux.elf-fold.h -- created from powerpc-linux.elf-fold.bin, 2260 (0x8d4) bytes +/* powerpc-linux.elf-fold.h -- created from powerpc-linux.elf-fold.bin, 1932 (0x78c) bytes This file is part of the UPX executable compressor. @@ -27,18 +27,18 @@ */ -#define LINUX_ELFPPC32_FOLD_SIZE 2260 -#define LINUX_ELFPPC32_FOLD_ADLER32 0x6c8685d0 -#define LINUX_ELFPPC32_FOLD_CRC32 0xa1bffc23 +#define LINUX_ELFPPC32_FOLD_SIZE 1932 +#define LINUX_ELFPPC32_FOLD_ADLER32 0x32046fba +#define LINUX_ELFPPC32_FOLD_CRC32 0x61fd184e -unsigned char linux_elfppc32_fold[2260] = { +unsigned char linux_elfppc32_fold[1932] = { 127, 69, 76, 70, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 0 */ 0, 2, 0, 20, 0, 0, 0, 1, 0, 16, 0,128, 0, 0, 0, 52, /* 0x 10 */ - 0, 0, 7,188, 0, 0, 0, 0, 0, 52, 0, 32, 0, 2, 0, 40, /* 0x 20 */ - 0, 7, 0, 6, 0, 0, 0, 1, 0, 0, 0, 0, 0, 16, 0, 0, /* 0x 30 */ - 0, 16, 0, 0, 0, 0, 7,132, 0, 0, 7,132, 0, 0, 0, 5, /* 0x 40 */ - 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 7,132, 0, 16, 7,132, /* 0x 50 */ - 0, 16, 7,132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, /* 0x 60 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 32, 0, 2, 0, 0, /* 0x 20 */ + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 16, 0, 0, /* 0x 30 */ + 0, 16, 0, 0, 0, 0, 7,140, 0, 0, 7,140, 0, 0, 0, 5, /* 0x 40 */ + 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 7,140, 0, 16, 7,140, /* 0x 50 */ + 0, 16, 7,140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, /* 0x 60 */ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 70 */ 72, 0, 0,125, 40, 6, 0,208, 76,130, 0, 32, 84,132,240,191, /* 0x 80 */ 77,130, 0, 32, 60, 0, 0, 16,124, 4, 0, 64, 65,128, 0, 8, /* 0x 90 */ @@ -63,10 +63,10 @@ unsigned char linux_elfppc32_fold[2260] = { 47,133, 0, 0, 65,158, 0, 28,124,169, 3,166,136, 9, 0, 0, /* 0x 1c0 */ 57, 41, 0, 1,152, 4, 0, 0, 56,132, 0, 1, 66, 0,255,240, /* 0x 1d0 */ 128, 3, 0, 0,129, 35, 0, 4,124, 5, 0, 80,144, 3, 0, 0, /* 0x 1e0 */ -125, 41, 42, 20,128, 1, 0, 20, 56, 33, 0, 16,145, 35, 0, 4, /* 0x 1f0 */ -124, 8, 3,166, 78,128, 0, 32,124, 8, 2,166,148, 33,255,192, /* 0x 200 */ -191,129, 0, 48,124,159, 35,120,124,126, 27,120,124,188, 43,120, /* 0x 210 */ -144, 1, 0, 68,124,221, 51,120,128, 4, 0, 0, 47,128, 0, 0, /* 0x 220 */ +128, 1, 0, 20,125, 41, 42, 20,124, 8, 3,166, 56, 33, 0, 16, /* 0x 1f0 */ +145, 35, 0, 4, 78,128, 0, 32,124, 8, 2,166,148, 33,255,192, /* 0x 200 */ +144, 1, 0, 68,128, 4, 0, 0,191,129, 0, 48, 47,128, 0, 0, /* 0x 210 */ +124,159, 35,120,124,126, 27,120,124,188, 43,120,124,221, 51,120, /* 0x 220 */ 65,158, 1, 32, 56,160, 0, 12,127,195,243,120, 56,129, 0, 16, /* 0x 230 */ 75,255,255, 93,129, 33, 0, 16,128,161, 0, 20, 47,137, 0, 0, /* 0x 240 */ 64,190, 0, 36, 60, 0, 33, 88, 96, 0, 80, 85,127,133, 0, 0, /* 0x 250 */ @@ -79,44 +79,44 @@ unsigned char linux_elfppc32_fold[2260] = { 64,190,255,188,128,129, 0, 32,128, 1, 0, 16,127,132, 0, 0, /* 0x 2c0 */ 64,190,255,172,136,193, 0, 25, 49, 61,255,255,124, 9,233, 16, /* 0x 2d0 */ 125, 38, 0,208, 85, 41, 15,254,125, 43, 0, 57, 65,162, 0, 20, /* 0x 2e0 */ -128,127, 0, 4,127,168, 3,166,136,161, 0, 26, 78,128, 0, 33, /* 0x 2f0 */ +128,127, 0, 4,136,161, 0, 26,127,168, 3,166, 78,128, 0, 33, /* 0x 2f0 */ 128, 30, 0, 4,129, 97, 0, 20,129, 62, 0, 0,124, 0, 90, 20, /* 0x 300 */ 125, 43, 72, 80,144, 30, 0, 4,145, 62, 0, 0, 72, 0, 0, 16, /* 0x 310 */ 124, 4, 3,120,127,195,243,120, 75,255,254,117,129, 97, 0, 16, /* 0x 320 */ 129, 63, 0, 0,128, 31, 0, 4,125, 43, 72, 80, 47,137, 0, 0, /* 0x 330 */ 124, 0, 90, 20,144, 31, 0, 4,145, 63, 0, 0, 75,255,254,228, /* 0x 340 */ -128, 1, 0, 68,187,129, 0, 48, 56, 33, 0, 64,124, 8, 3,166, /* 0x 350 */ +128, 1, 0, 68,187,129, 0, 48,124, 8, 3,166, 56, 33, 0, 64, /* 0x 350 */ 78,128, 0, 32, 44, 3, 0, 0, 77,130, 0, 32, 48, 4,255,255, /* 0x 360 */ 125, 96, 33, 16,128, 3, 0, 0,127,128, 32, 0,104, 9, 0, 1, /* 0x 370 */ 33, 73, 0, 0,125, 42, 73, 20,125, 42, 88, 57, 65,158, 0, 8, /* 0x 380 */ 65,162, 0, 16,144,163, 0, 4,144,131, 0, 0, 78,128, 0, 32, /* 0x 390 */ 56, 99, 0, 8, 75,255,255,208,124, 8, 2,166,148, 33,255,160, /* 0x 3a0 */ -125,128, 0, 38,190, 65, 0, 40,124,121, 27,120,124,151, 35,120, /* 0x 3b0 */ -144, 1, 0,100,124,178, 43,120,161, 67, 0, 44,124,211, 51,120, /* 0x 3c0 */ -160, 3, 0, 16,124,244, 59,120, 53, 74,255,255,129, 35, 0, 28, /* 0x 3d0 */ -104, 0, 0, 3,145,129, 0, 36,124, 0, 0,208,127,163, 74, 20, /* 0x 3e0 */ - 84, 3, 46,246,125, 21, 67,120, 56, 99, 8, 34,127,171,235,120, /* 0x 3f0 */ +144, 1, 0,100,160, 3, 0, 16,161, 67, 0, 44,125,128, 0, 38, /* 0x 3b0 */ +129, 35, 0, 28,104, 0, 0, 3, 53, 74,255,255,124, 0, 0,208, /* 0x 3c0 */ +190, 65, 0, 40,127,163, 74, 20,124,121, 27,120, 84, 3, 46,246, /* 0x 3d0 */ +145,129, 0, 36,124,151, 35,120,124,178, 43,120,124,211, 51,120, /* 0x 3e0 */ +124,244, 59,120,125, 21, 67,120, 56, 99, 8, 34,127,171,235,120, /* 0x 3f0 */ 59,224,255,255, 59,192, 0, 0, 65,128, 0, 68, 57, 74, 0, 1, /* 0x 400 */ 125, 73, 3,166,128, 11, 0, 0, 47,128, 0, 1, 64,190, 0, 40, /* 0x 410 */ 129, 43, 0, 8,127,137,248, 64, 64,156, 0, 8,125, 63, 75,120, /* 0x 420 */ 128, 11, 0, 20,124, 0, 74, 20,127,158, 0, 64, 64,156, 0, 8, /* 0x 430 */ 124, 30, 3,120, 57,107, 0, 32, 66, 0,255,204, 87,255, 0, 38, /* 0x 440 */ -124,102, 27,120,125, 63,240, 80,127,227,251,120, 57, 41, 15,255, /* 0x 450 */ - 56,160, 0, 0, 85, 62, 0, 38, 56,224,255,255,127,196,243,120, /* 0x 460 */ +125, 63,240, 80, 57, 41, 15,255, 85, 62, 0, 38,124,102, 27,120, /* 0x 450 */ +127,196,243,120,127,227,251,120, 56,160, 0, 0, 56,224,255,255, /* 0x 460 */ 57, 0, 0, 0, 75,255,252,221,160, 25, 0, 44, 58,192, 0, 0, /* 0x 470 */ -127, 31, 24, 80,127,150, 0, 0,124, 3,242, 20,144, 1, 0, 8, /* 0x 480 */ +127,150, 0, 0,124, 3,242, 20,144, 1, 0, 8,127, 31, 24, 80, /* 0x 480 */ 64,156, 1,128, 46, 23, 0, 0, 65,146, 0, 40,128, 29, 0, 0, /* 0x 490 */ 47,128, 0, 6, 64,190, 0, 28,128,189, 0, 8,126, 99,155,120, /* 0x 4a0 */ - 56,128, 0, 3,124,165,194, 20, 75,255,254,173, 72, 0, 1, 64, /* 0x 4b0 */ +124,165,194, 20, 56,128, 0, 3, 75,255,254,173, 72, 0, 1, 64, /* 0x 4b0 */ 128, 29, 0, 0, 47,128, 0, 1, 64,190, 1, 52,128, 29, 0, 24, /* 0x 4c0 */ - 61, 32,115, 81,129, 93, 0, 8, 97, 41, 98, 64, 84, 0, 22,250, /* 0x 4d0 */ +129, 93, 0, 8, 61, 32,115, 81, 84, 0, 22,250, 97, 41, 98, 64, /* 0x 4d0 */ 129,125, 0, 20,125, 41, 4, 48, 85, 94, 5, 62, 48, 23,255,255, /* 0x 4e0 */ 124,160,185, 16,128, 29, 0, 16, 85, 58, 7,126,127,106, 90, 20, /* 0x 4f0 */ - 84,165, 8, 60,127,254, 80, 80,144, 1, 0, 16,127,128,242, 20, /* 0x 500 */ -145, 65, 0, 20,127,255,194, 20,127,123,194, 20,124,165,211,120, /* 0x 510 */ + 84,165, 8, 60,127,254, 80, 80,144, 1, 0, 16,145, 65, 0, 20, /* 0x 500 */ +127,128,242, 20,127,255,194, 20,127,123,194, 20,124,165,211,120, /* 0x 510 */ 65,146, 0, 12, 56,192, 0, 50, 72, 0, 0, 8, 56,192, 0, 18, /* 0x 520 */ 64,146, 0, 12,126, 71,147,120, 72, 0, 0, 8, 56,224,255,255, /* 0x 530 */ -129, 29, 0, 4,127,227,251,120,127,132,227,120,125, 30, 64, 80, /* 0x 540 */ +129, 29, 0, 4,127,227,251,120,125, 30, 64, 80,127,132,227,120, /* 0x 540 */ 75,255,252, 1,127,159, 24, 0, 64,158, 0,104, 65,178, 0, 24, /* 0x 550 */ 126,227,187,120, 56,129, 0, 16,126,133,163,120,126,166,171,120, /* 0x 560 */ 75,255,252,153,115, 64, 0, 2,124, 28, 0,208, 84, 30, 5, 62, /* 0x 570 */ @@ -128,50 +128,29 @@ unsigned char linux_elfppc32_fold[2260] = { 127,159,216, 64, 64,188, 0, 40,124,159,216, 80,127, 69,211,120, /* 0x 5d0 */ 127,227,251,120, 56,192, 0, 50, 56,224,255,255, 57, 0, 0, 0, /* 0x 5e0 */ 75,255,251, 97,127,159, 24, 0, 64,190,255,200,160, 25, 0, 44, /* 0x 5f0 */ - 58,214, 0, 1, 59,189, 0, 32,127,150, 0, 0, 75,255,254,132, /* 0x 600 */ + 58,214, 0, 1,127,150, 0, 0, 59,189, 0, 32, 75,255,254,132, /* 0x 600 */ 128,121, 0, 24,128, 1, 0,100,129,129, 0, 36,124, 99,194, 20, /* 0x 610 */ 124, 8, 3,166,186, 65, 0, 40,125,128,129, 32, 56, 33, 0, 96, /* 0x 620 */ - 78,128, 0, 32,124, 8, 2,166,148, 33,255,192, 56,132,255,232, /* 0x 630 */ -191, 97, 0, 44,144,129, 0, 8,124,191, 43,120,144, 1, 0, 68, /* 0x 640 */ - 56, 3, 0, 24,144, 1, 0, 12,124,229, 59,120,128, 3, 0, 24, /* 0x 650 */ - 56,192, 0, 0,200, 1, 0, 8, 56, 97, 0, 8, 56,129, 0, 16, /* 0x 660 */ - 59,223, 0, 52,125, 61, 75,120,124,251, 59,120,144, 1, 0, 16, /* 0x 670 */ -125, 28, 67,120,216, 1, 0, 24,147,225, 0, 20, 75,255,251,125, /* 0x 680 */ -128,190, 0, 8,127,163,235,120, 56,128, 0, 3, 56,165, 0, 52, /* 0x 690 */ - 75,255,252,197,160,191, 0, 44,127,163,235,120, 56,128, 0, 5, /* 0x 6a0 */ - 75,255,252,181,128,191, 0, 24,127,163,235,120, 56,128, 0, 9, /* 0x 6b0 */ - 75,255,252,165,127,103,219,120,127,136,227,120,127,227,251,120, /* 0x 6c0 */ -127,166,235,120, 56,129, 0, 24, 56,160, 0, 0, 59, 96, 0, 0, /* 0x 6d0 */ - 75,255,252,201,160, 31, 0, 44,124,124, 27,120,127,155, 0, 0, /* 0x 6e0 */ - 64,156, 0,124,128, 30, 0, 0, 59,123, 0, 1, 56,128, 0, 0, /* 0x 6f0 */ - 56,160, 0, 0, 47,128, 0, 3, 64,190, 0, 88,128,126, 0, 8, /* 0x 700 */ - 75,255,250,101,127,228,251,120,124,125, 27,121, 56,160, 2, 0, /* 0x 710 */ - 65,128, 0, 40, 75,255,250, 73, 56,128, 0, 0, 47,131, 2, 0, /* 0x 720 */ -127,165,235,120,127,227,251,120, 56,192, 0, 0, 56,224, 0, 0, /* 0x 730 */ - 57, 0, 0, 0, 65,190, 0, 12, 56, 96, 0,127, 75,255,250, 25, /* 0x 740 */ - 75,255,252, 89,124,124, 27,120,127,163,235,120, 75,255,250, 33, /* 0x 750 */ -160, 31, 0, 44, 59,222, 0, 32, 75,255,255,132,128, 1, 0, 68, /* 0x 760 */ -127,131,227,120,187, 97, 0, 44, 56, 33, 0, 64,124, 8, 3,166, /* 0x 770 */ - 78,128, 0, 32, 0, 46,115,104,115,116,114,116, 97, 98, 0, 46, /* 0x 780 */ -116,101,120,116, 0, 46, 98,115,115, 0, 46,115,100, 97,116, 97, /* 0x 790 */ - 0, 46,115,100, 97,116, 97, 50, 0, 46,110,111,116,101, 46, 71, /* 0x 7a0 */ - 78, 85, 45,115,116, 97, 99,107, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 7b0 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 7c0 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 7d0 */ - 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 1, 0, 0, 0, 6, /* 0x 7e0 */ - 0, 16, 0,128, 0, 0, 0,128, 0, 0, 7, 4, 0, 0, 0, 0, /* 0x 7f0 */ - 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 17, /* 0x 800 */ - 0, 0, 0, 8, 0, 0, 0, 3, 0, 16, 7,132, 0, 0, 7,132, /* 0x 810 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, /* 0x 820 */ - 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 1, 0, 0, 0, 3, /* 0x 830 */ - 0, 16, 7,132, 0, 0, 7,132, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 840 */ - 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 29, /* 0x 850 */ - 0, 0, 0, 1, 0, 0, 0, 2, 0, 16, 7,132, 0, 0, 7,132, /* 0x 860 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, /* 0x 870 */ - 0, 0, 0, 0, 0, 0, 0, 37, 0, 0, 0, 7, 0, 0, 0, 0, /* 0x 880 */ - 0, 0, 0, 0, 0, 0, 7,132, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 890 */ - 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, /* 0x 8a0 */ - 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7,132, /* 0x 8b0 */ - 0, 0, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, /* 0x 8c0 */ - 0, 0, 0, 0 /* 0x 8d0 */ + 78,128, 0, 32,124, 8, 2,166,148, 33,255,192,144, 1, 0, 68, /* 0x 630 */ + 56,132,255,232, 56, 3, 0, 24,144, 1, 0, 12,144,129, 0, 8, /* 0x 640 */ +128, 3, 0, 24,191, 97, 0, 44,129, 97, 0, 8,124,191, 43,120, /* 0x 650 */ +129,129, 0, 12,124,229, 59,120, 56,192, 0, 0, 56, 97, 0, 8, /* 0x 660 */ + 56,129, 0, 16, 59,223, 0, 52,125, 61, 75,120,124,251, 59,120, /* 0x 670 */ +144, 1, 0, 16,125, 28, 67,120,145, 97, 0, 24,145,129, 0, 28, /* 0x 680 */ +147,225, 0, 20, 75,255,251,117,128,190, 0, 8,127,163,235,120, /* 0x 690 */ + 56,165, 0, 52, 56,128, 0, 3, 75,255,252,189,160,191, 0, 44, /* 0x 6a0 */ +127,163,235,120, 56,128, 0, 5, 75,255,252,173,128,191, 0, 24, /* 0x 6b0 */ +127,163,235,120, 56,128, 0, 9, 75,255,252,157,127,103,219,120, /* 0x 6c0 */ +127,136,227,120,127,227,251,120,127,166,235,120, 56,129, 0, 24, /* 0x 6d0 */ + 56,160, 0, 0, 75,255,252,197,160, 31, 0, 44,124,124, 27,120, /* 0x 6e0 */ + 59, 96, 0, 0,127,155, 0, 0, 64,156, 0,124,128, 30, 0, 0, /* 0x 6f0 */ + 59,123, 0, 1, 47,128, 0, 3, 56,128, 0, 0, 56,160, 0, 0, /* 0x 700 */ + 64,190, 0, 88,128,126, 0, 8, 75,255,250, 93,124,125, 27,121, /* 0x 710 */ +127,228,251,120, 56,160, 2, 0, 65,128, 0, 40, 75,255,250, 65, /* 0x 720 */ + 47,131, 2, 0, 56,128, 0, 0,127,227,251,120,127,165,235,120, /* 0x 730 */ + 56,192, 0, 0, 56,224, 0, 0, 57, 0, 0, 0, 65,190, 0, 12, /* 0x 740 */ + 56, 96, 0,127, 75,255,250, 17, 75,255,252, 81,124,124, 27,120, /* 0x 750 */ +127,163,235,120, 75,255,250, 25,160, 31, 0, 44, 59,222, 0, 32, /* 0x 760 */ + 75,255,255,132,128, 1, 0, 68,127,131,227,120,124, 8, 3,166, /* 0x 770 */ +187, 97, 0, 44, 56, 33, 0, 64, 78,128, 0, 32 /* 0x 780 */ };