From 7271ae9611cb1e8dd829c95d28a0b9b9e66b31bb Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Tue, 23 Jan 2007 13:50:39 +0100 Subject: [PATCH] Small updates. --- NEWS | 5 ++++- src/compress_lzma.cpp | 2 +- src/linker.cpp | 12 ++++++++++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index d6c1ef82..eaf8ee09 100644 --- a/NEWS +++ b/NEWS @@ -2,8 +2,11 @@ User visible changes for UPX ================================================================== -Changes in 2.92 beta (XX XXX 2007): +Changes in 2.92 beta (XX Jan 2007): * new option '--ultra-brute' which tries even more variants + * slightly improved compression ratio for some files when + using '--brute' or '--ultra-brute' + * bug fixes Changes in 2.91 beta (29 Nov 2006): * assorted bug fixes diff --git a/src/compress_lzma.cpp b/src/compress_lzma.cpp index ffd3baa5..25c253e3 100644 --- a/src/compress_lzma.cpp +++ b/src/compress_lzma.cpp @@ -371,7 +371,7 @@ int upx_lzma_compress ( const upx_bytep src, unsigned src_len, rh = enc.Code(&is, &os, NULL, NULL, &progress); #ifndef _NO_EXCEPTIONS - } catch(...) { return UPX_E_OUT_OF_MEMORY; } + } catch (...) { rh = E_OUTOFMEMORY; } #endif assert(is.b_pos <= src_len); diff --git a/src/linker.cpp b/src/linker.cpp index 587b1b62..dd09cbe5 100644 --- a/src/linker.cpp +++ b/src/linker.cpp @@ -619,7 +619,11 @@ void ElfLinkerAMD64::relocate1(const Relocation *rel, upx_byte *location, if (strcmp(type, "8") == 0) { +#if (ACC_CC_PGI) + int displ = * (signed char *) location + (int) value; // CBUG +#else int displ = (signed char) *location + (int) value; +#endif if (displ < -128 || displ > 127) { printf("target out of range (%d) in reloc %s:%x\n", @@ -823,10 +827,14 @@ void ElfLinkerX86::relocate1(const Relocation *rel, upx_byte *location, if (strcmp(type, "8") == 0) { +#if (ACC_CC_PGI) + int displ = * (signed char *) location + (int) value; // CBUG +#else int displ = (signed char) *location + (int) value; +#endif if (range_check && (displ < -128 || displ > 127)) { - printf("target out of range (%d) in reloc %s:%x\n", - displ, rel->section->name, rel->offset); + printf("target out of range (%d,%d,%d) in reloc %s:%x\n", + displ, *location, value, rel->section->name, rel->offset); abort(); } *location += value;