Merge branch 'devel' of https://github.com/upx/upx into devel

This commit is contained in:
John Reiser
2016-09-24 06:44:19 -07:00
8 changed files with 260 additions and 84 deletions
+7 -11
View File
@@ -4,12 +4,10 @@
# Copyright (C) 1996-2016 Markus Franz Xaver Johannes Oberhumer
#
# In GNU Make 4.0 this "MAKEFLAGS += -rR" is not executed immediately.
# Instead, it is executed later, and we cannot rely on sequentiality
# with respect to builtin variables. So if we want to have no
# dependencies on the default values of builtin variables,
# then we cannot use builtin variables at all.
# See: http://lists.gnu.org/archive/html/help-make/2016-08/msg00011.html
# build configuration options
#USE_DEBUG = 1
#USE_SANITIZE = 1
MAKEFLAGS += -r
ifneq ($(upx_CXX),)
CXX = $(upx_CXX)
@@ -20,10 +18,6 @@ else
CXXLD = $(CXX)
endif
# build configuration options
#USE_DEBUG = 1
#USE_SANITIZE = 1
.SUFFIXES:
export SHELL = /bin/sh
override e = $($1) $(EXTRA_$1) $(upx_$1) $($(basename $(notdir $@)).$1)
@@ -104,7 +98,7 @@ ifeq (1,1)
@echo "Updating $@"
@$(strip $(CXX) $(call e,CPPFLAGS) -MM) $(filter %.cpp,$^) > $@
else
touch $@
@echo "timestamp" > $@
endif
@@ -137,3 +131,5 @@ CLANG_FORMAT_FILES += ui.cpp ui.h util.h
clang-format:
$(top_srcdir)/src/stub/scripts/upx-clang-format -i $(addprefix $(top_srcdir)/src/,$(CLANG_FORMAT_FILES))
.PHONY: clang-format
# vim:set ts=8 sw=8 noet:
+1 -12
View File
@@ -66,11 +66,6 @@
#define ACC_WANT_ACC_LIB_H 1
#define ACC_WANT_ACC_CXX_H 1
#include "miniacc.h"
#if (ACC_OS_CYGWIN || ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_EMX || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
# if defined(INVALID_HANDLE_VALUE) || defined(MAKEWORD) || defined(RT_CURSOR)
# error "something pulled in <windows.h>"
# endif
#endif
/* intergral types */
typedef acc_int8_t upx_int8_t;
@@ -89,7 +84,7 @@ typedef acc_uintptr_t upx_uintptr_t;
#define UPX_INT64_C ACC_INT64_C
#define UPX_UINT64_C ACC_UINT64_C
#define upx_byte unsigned char
typedef unsigned char upx_byte;
#define upx_bytep upx_byte *
@@ -615,9 +610,6 @@ struct upx_compress_result_t
**************************************************************************/
#include "snprintf.h"
#if defined(__cplusplus)
#include "stdcxx.h"
#include "options.h"
#include "except.h"
@@ -707,9 +699,6 @@ int upx_test_overlap ( const upx_bytep buf,
const upx_compress_result_t *cresult );
#endif /* __cplusplus */
#if (ACC_OS_CYGWIN || ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_EMX || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
# if defined(INVALID_HANDLE_VALUE) || defined(MAKEWORD) || defined(RT_CURSOR)
# error "something pulled in <windows.h>"
+12 -10
View File
@@ -1116,27 +1116,29 @@ void Packer::initLoader(const void *pdata, int plen, int small)
#define C const char *
#define N ACC_STATIC_CAST(void *, 0)
void Packer::addLoader(C a)
{ addLoaderVA(a, NULL); }
{ addLoaderVA(a, N); }
void Packer::addLoader(C a, C b)
{ addLoaderVA(a, b, NULL); }
{ addLoaderVA(a, b, N); }
void Packer::addLoader(C a, C b, C c)
{ addLoaderVA(a, b, c, NULL); }
{ addLoaderVA(a, b, c, N); }
void Packer::addLoader(C a, C b, C c, C d)
{ addLoaderVA(a, b, c, d, NULL); }
{ addLoaderVA(a, b, c, d, N); }
void Packer::addLoader(C a, C b, C c, C d, C e)
{ addLoaderVA(a, b, c, d, e, NULL); }
{ addLoaderVA(a, b, c, d, e, N); }
void Packer::addLoader(C a, C b, C c, C d, C e, C f)
{ addLoaderVA(a, b, c, d, e, f, NULL); }
{ addLoaderVA(a, b, c, d, e, f, N); }
void Packer::addLoader(C a, C b, C c, C d, C e, C f, C g)
{ addLoaderVA(a, b, c, d, e, f, g, NULL); }
{ addLoaderVA(a, b, c, d, e, f, g, N); }
void Packer::addLoader(C a, C b, C c, C d, C e, C f, C g, C h)
{ addLoaderVA(a, b, c, d, e, f, g, h, NULL); }
{ addLoaderVA(a, b, c, d, e, f, g, h, N); }
void Packer::addLoader(C a, C b, C c, C d, C e, C f, C g, C h, C i)
{ addLoaderVA(a, b, c, d, e, f, g, h, i, NULL); }
{ addLoaderVA(a, b, c, d, e, f, g, h, i, N); }
void Packer::addLoader(C a, C b, C c, C d, C e, C f, C g, C h, C i, C j)
{ addLoaderVA(a, b, c, d, e, f, g, h, i, j, NULL); }
{ addLoaderVA(a, b, c, d, e, f, g, h, i, j, N); }
#undef C
#undef N
void __acc_cdecl_va Packer::addLoaderVA(const char *s, ...)
{
+2 -4
View File
@@ -35,10 +35,10 @@ endif
include $(wildcard $(top_srcdir)/Makevars.global ./Makevars.local)
# update $PATH for our special stub build tools
ifneq ($(wildcard $(HOME)/local/bin/bin-upx/.),)
ifneq ($(wildcard $(HOME)/local/bin/bin-upx/upx-stubtools-check-version),)
export PATH := $(HOME)/local/bin/bin-upx:$(PATH)
endif
ifneq ($(wildcard $(HOME)/bin/bin-upx/.),)
ifneq ($(wildcard $(HOME)/bin/bin-upx/upx-stubtools-check-version),)
export PATH := $(HOME)/bin/bin-upx:$(PATH)
endif
@@ -1317,9 +1317,7 @@ powerpc64le-darwin.macho-entry.h : $(srcdir)/src/$$T.S
$(call tc,bin2h) tmp/$T.bin $@
powerpc64le-darwin.macho-fold.h : tmp/$$T.o tmp/powerpc64le-darwin.macho-main.o
# FIXME: undefined reference to `_savegpr0_28' etc.
$(call tc,ld) --no-warn-mismatch --strip-all --oformat binary -Map tmp/$T.map $(filter %.o,$^) -o tmp/$T.bin
# echo "FIXME" > tmp/$T.bin
chmod a-x tmp/$T.bin
$(call tc,bin2h) tmp/$T.bin $@
Binary file not shown.