John Reiser
404da18aed
IPTR_I_D: 'import' buffer is a subset of ibuf
2015-05-15 20:42:18 -07:00
John Reiser
330fca722a
too large: blocksize > 1024*1024*1024 [corrupted]
2015-05-15 05:36:21 -07:00
John Reiser
8939cd120b
too small: (st.st_size < 512)
2015-05-15 05:32:52 -07:00
László Molnár
63afeb7373
added a check for corrupted packheader
2015-05-14 21:48:16 +02:00
László Molnár
6ba68a6455
PE related fixes for CERT-FI 829767
2015-05-14 21:46:52 +02:00
John Reiser
1579c74302
canPack() requires 0 < nfat
2015-05-10 14:01:48 -07:00
John Reiser
373ca15c71
size < 1024 is too short
2015-05-10 14:01:08 -07:00
John Reiser
a8a3caed1c
Check blocksize
2015-05-09 20:29:56 -07:00
John Reiser
cb35ba4543
At ::unpack much of decompressed Mach_header must match outer Mach_header
2015-05-09 20:14:32 -07:00
John Reiser
cdd152d015
Detect (int)blocksize < 0
2015-05-09 20:13:30 -07:00
John Reiser
83ce7dc62f
Must not compare orig_file_size with fi->st_size() during ::unpack
2015-05-09 17:47:17 -07:00
John Reiser
b182b50f24
Distinguish corruption of p_info, b_info
2015-05-09 10:13:13 -07:00
John Reiser
71a9941b84
Check getImageSize(). CERT-FI 829767
...
id:000058,sig:06,src:000001,op:havoc,rep:64
2015-05-09 07:29:26 -07:00
John Reiser
c777da263e
Check blocksize. CERT-FI 829767
...
id:000053,sig:06,src:000000,op:arith8,pos:10440,val:+20
2015-05-09 07:25:25 -07:00
John Reiser
2cb7b56a41
Check ph.c_len; CERT-FI 829767
...
id:000023,sig:06,src:000000,op:flip2,pos:10440
2015-05-09 07:18:54 -07:00
John Reiser
52f9ef14b9
Check ph.c_len; CERT-FI 829767
...
id:000010,sig:06,src:000000,op:flip1,pos:11584
2015-05-09 07:13:47 -07:00
John Reiser
8d6c594240
Check ph.c_len; CERT-FI 829767
...
id:000008,sig:06,src:000000,op:flip1,pos:205
2015-05-09 07:05:17 -07:00
John Reiser
7ad77ff540
Check blocksize. CERT-FI 829767
...
id:000005,sig:06,src:000000,op:havoc,rep:16
2015-05-09 06:56:32 -07:00
John Reiser
acede72e9b
Check ph.c_len. CERT-FI 829767
...
id:000002,sig:06,src:000000,op:havoc,rep:1
2015-05-09 06:49:45 -07:00
John Reiser
771fd732d1
Check e_phentsize; CERT-FI 829767
...
id:000064,sig:06,sync:upx-macho-crash-2,src:000096
2015-05-09 05:31:36 -07:00
John Reiser
2a79a69f59
PackUnix::unpack() is non-Elf. CERT-FI 829767
...
id:000057,sig:11,sync:upx-macho-crash-2,src:000108
id:000058,sig:11,sync:upx-macho-crash-2,src:000107
id:000059,sig:06,sync:upx-macho-crash-2,src:000106
id:000060,sig:06,sync:upx-macho-crash-2,src:000103
2015-05-09 05:14:12 -07:00
John Reiser
8c0321697f
Check PackHeader before decompress; CERT-FI id:000002,sig:06,src:000000,op:flip1,pos:4629
2015-05-08 20:13:44 -07:00
John Reiser
0151b3f9b3
Validate Mach_segment_command.cmdsize; CERT-FI id:000000,sig:11,src:000000,op:havoc,rep:2
2015-05-08 19:45:05 -07:00
John Reiser
82a51f35ea
Validate header CERT_FI id:000000,sig:11,src:000000,op:flip1,pos:1
2015-05-08 19:22:24 -07:00
John Reiser
35944cbfc1
Validate fat_head; CERT-FI id:000000,sig:06,src:000000,op:flip1,pos:7
2015-05-08 18:32:42 -07:00
John Reiser
f0aef9b28b
Check input data; CERT-FI upx-crashes-elf id:000000,sig:11,src:000000,op:flip1,pos:0
2015-05-08 17:04:16 -07:00
John Reiser
ae37c3902c
Apple codesign requires a different secTEXT.size
2015-03-27 20:41:00 -07:00
John Reiser
d612585582
C/7zTypes.h #if (WITH_LZMA >= 0x938)
2015-03-15 10:30:55 -07:00
John Reiser
7ca14d209c
Use upx_uint64_t instead of "unsigned long".
2015-01-10 12:26:35 -08:00
Markus F.X.J. Oberhumer
c37f582c10
Merge.
2015-01-04 11:11:05 +01:00
John Reiser
6272fb3822
ARM --lzma && is_big: stub mmap must allow for cpr0.sz_unc [How did this ever work before?]
2015-01-02 17:36:26 -08:00
Markus F.X.J. Oberhumer
2582fbac59
Update src/Makefile to use more conservative gcc optimization settings.
2015-01-03 01:55:51 +01:00
Markus F.X.J. Oberhumer
5abb578e47
p_djgpp2.{cpp,h}: remove usage of "long".
2015-01-03 01:12:46 +01:00
Markus F.X.J. Oberhumer
015ebf89a5
lefile.h: remove usage of "long".
2015-01-03 01:04:41 +01:00
Markus F.X.J. Oberhumer
c6724968f1
pefile.cpp: work around a gcc-3.4 limitation.
2015-01-03 00:40:28 +01:00
Markus F.X.J. Oberhumer
9fa1772ae4
Merge.
2015-01-03 00:34:42 +01:00
Markus F.X.J. Oberhumer
4551937812
Bump version year.
2015-01-03 00:26:48 +01:00
John Reiser
51ee664cae
PackLinuxElf32help1 refuses if e_ident[EI_DATA] mismatches bele policy
2015-01-02 15:25:29 -08:00
Markus F.X.J. Oberhumer
fb611a98f9
Welcome 2015.
2015-01-03 00:24:07 +01:00
Markus F.X.J. Oberhumer
a3d5face38
Fix a comment.
2015-01-03 00:21:51 +01:00
László Molnár
424cd497d3
pe64: saved a few bytes in the nrv decompressors
2014-03-18 23:35:30 +01:00
László Molnár
6520f2061e
arm/pe: thumb mode stub hopefully fixed
2014-03-10 21:44:23 +01:00
László Molnár
5d93f86b4b
armpe_tester: better import handling
2014-03-10 21:42:11 +01:00
László Molnár
b3f63ce7ae
pe: fix a bug in pack0() for arm
2014-03-09 23:55:28 +01:00
László Molnár
56de770682
armpe_tester now works on android
2014-03-09 23:42:41 +01:00
László Molnár
940341bc9d
arm/pe: import handling updates (untested)
2014-03-08 18:59:26 +01:00
László Molnár
804a0ce601
merge
2014-03-06 22:38:15 +01:00
László Molnár
41054a4c56
handle duplicates in ImportLinker
2014-03-06 22:26:41 +01:00
László Molnár
7b8e5d4180
pe: remove some dead code
2014-03-05 23:59:53 +01:00
László Molnár
ca2369f1c1
pe: win32/win64 pack/unpack seems to work again
2014-03-05 23:40:24 +01:00
László Molnár
129cb0b3cd
pe: packing of pe64 starts to work again
2014-03-04 23:51:59 +01:00
László Molnár
632b2ae1ba
pe: pack() logic moved to PeFile
2014-03-02 22:34:52 +01:00
László Molnár
18e55061e1
pepfile.* disabled; PeFile64 class introduced
2014-02-20 00:10:18 +01:00
László Molnár
e49b65723f
pe: canUnpack moved to PeFile
2014-02-19 23:27:41 +01:00
László Molnár
8e52894763
pe: loadconf handling moved to PeFile
2014-02-19 21:45:24 +01:00
László Molnár
07cba6c774
pe32: tls refactoring
2014-02-18 00:23:42 +01:00
László Molnár
9cb639b505
pe32: refactoring of import handling and unpacking continues
2014-02-16 23:04:39 +01:00
John Reiser
c0f692792f
2014
2014-01-10 19:23:41 -08:00
John Reiser
bd77e0945b
more LC_* constants
2014-01-10 19:22:30 -08:00
Markus F.X.J. Oberhumer
f0eb171b2a
Strip trailing whitespace.
2014-01-07 23:09:11 +01:00
Markus F.X.J. Oberhumer
fb93662b5c
Bump version for next release.
2014-01-07 23:08:00 +01:00
Markus F.X.J. Oberhumer
a26c982e93
Welcome 2014.
2014-01-07 23:05:10 +01:00
Markus F.X.J. Oberhumer
7db3e98944
Small cleanups.
2014-01-07 23:03:16 +01:00
Markus F.X.J. Oberhumer
4a87834e04
New ACC version.
2014-01-07 19:15:57 +00:00
Markus F.X.J. Oberhumer
bf6ecaeeb9
stub: minor cosmetic cleanups.
2013-12-02 19:37:28 +01:00
Markus F.X.J. Oberhumer
f70ef86dfa
help.cpp: add a missing con_fg() call.
2013-12-02 19:23:06 +01:00
John Reiser
cd3132667a
ARM shlib escape hatch moves to just beyond .text.
...
https://sourceforge.net/p/upx/bugs/223/
2013-11-22 19:26:19 -08:00
John Reiser
1c459a7bea
Sync stubs.
2013-11-16 14:29:52 -08:00
John Reiser
4f0bfeab4c
Round down unfilter length to a multiple of 4.
...
https://sourceforge.net/p/upx/bugs/223
2013-11-16 14:28:59 -08:00
John Reiser
c5c9921b59
Unpack detects is_shlib more robustly. Dispute .e_shoff.
2013-11-16 14:25:53 -08:00
John Reiser
6b63aba1fc
Disable jni_onload_*
2013-11-09 16:06:41 -08:00
John Reiser
382331fb11
e_phoff and e_shoff are 32/64 specific
2013-10-28 07:11:40 -07:00
John Reiser
caf9af7ae4
JNI_OnLoad is a pre-DT_INIT in a shared library.
2013-10-26 09:51:25 -07:00
John Reiser
45d2adeb9c
Android < 4.1 (kernel < 3.0.31) often has PT_INTERP of /system/bin/linker
...
with bad PT_LOAD[0]. https://sourceforge.net/p/upx/bugs/221
2013-10-21 07:27:53 -07:00
László Molnár
96708d7592
ImportLinker copied into PeFile
2013-10-12 16:48:56 +02:00
John Reiser
13090d1219
ARM close /proc/self/exe after mmap
2013-10-06 19:56:14 -07:00
László Molnár
8ab229cca9
pe: refactoring started
2013-10-06 22:57:20 +02:00
John Reiser
583cd078dc
ARM elf-fold: preserve /proc/self/exe by mmap of one page into stack
2013-10-06 13:22:05 -07:00
László Molnár
aa2ac1bbb8
pe: ImportLinker introduced
2013-10-04 22:48:21 +02:00
Markus F.X.J. Oberhumer
6766b14415
Prepare release.
2013-09-30 14:21:37 +02:00
John Reiser
9d0f9e967f
Avoid stmdb with write-back register in stored list,
...
even when stored value is don't care.
2013-09-21 09:52:21 -07:00
John Reiser
d7609088e5
Silence "warning: cannot find entry symbol _start"
2013-09-21 08:39:15 -07:00
Markus F.X.J. Oberhumer
b2643b6926
Start using the new intergral type names.
2013-09-20 08:19:18 +02:00
Markus F.X.J. Oberhumer
07b65ca069
Introduce integral type names using <stdint.h> terminology like "upx_uint64_t".
2013-09-20 08:16:37 +02:00
Markus F.X.J. Oberhumer
25727f7f99
Minor portability fixes.
2013-09-20 07:48:29 +02:00
Markus F.X.J. Oberhumer
880ae89307
Bump version and tentative release date.
2013-09-20 07:19:06 +02:00
Markus F.X.J. Oberhumer
1496df1989
New ACC version.
2013-09-20 07:09:35 +02:00
Markus F.X.J. Oberhumer
7d8ae6b4b1
Make amd64-win64.pep.S compile with current upx stubtools.
2013-09-20 07:08:09 +02:00
Markus F.X.J. Oberhumer
312d4cccaf
stub: start using stubtools bin-upx-20130920.
2013-09-20 06:59:27 +02:00
Markus F.X.J. Oberhumer
ce5f9f95ea
stub: fix i386 syntax for current gas versions, and add some explicit
...
alignments at the end of the file so that we do not depend on gas defaults.
2013-09-20 06:15:46 +02:00
Markus F.X.J. Oberhumer
d9bf8a76d9
Protect against changes from future gas versions in amd64-linux.elf-entry.S.
2013-09-20 05:22:05 +02:00
Markus F.X.J. Oberhumer
f7a35fb9fe
stub: save 1 byte in amd64-darwin.{dylib,macho}-entry.S.
2013-09-20 04:20:23 +02:00
Markus F.X.J. Oberhumer
3ba691ded5
Remove trailing whitespace.
2013-09-20 03:25:59 +02:00
Markus F.X.J. Oberhumer
7a7277d56f
Use correct "movzwl" opcode in src/stub/src/arch/i386/macros.S.
2013-09-20 03:18:19 +02:00
László Molnár
76be5dd1d3
linker: Section::offset should be u64
2013-09-01 21:38:44 +02:00
László Molnár
53dc63f3bc
linker: a small 64-bit relocation support related fix
2013-09-01 11:15:30 +02:00
László Molnár
80da0bc9d5
pepfile: infoWarning about unsupported relocation types fixed
2013-08-28 22:33:39 +02:00
László Molnár
bce7af4e11
fixed 8 bit range checking in ElfLinkerAMD64::relocate1
2013-08-28 22:31:40 +02:00
László Molnár
9da09b51ed
win64/pe: tls callback assembly improvements + misc cleanups
2013-08-28 21:53:23 +02:00
László Molnár
86392f197f
win64/pe: lzma support added
2013-08-28 00:24:54 +02:00
László Molnár
1c13046297
win64/pe: added nrv2b and nrv2d support
2013-08-27 22:06:52 +02:00
László Molnár
fbc756b531
win64/pe: filter support added
2013-08-27 21:22:21 +02:00
László Molnár
6c64b06453
win64/pe: uncompression seems to work; tls handling improvement
2013-08-26 22:07:55 +02:00
László Molnár
241834029a
64 relocation handling added; basic DLL support works
2013-08-25 23:54:13 +02:00
László Molnár
5b8a9c0b47
basic win64 PE support added
2013-08-22 22:01:09 +02:00
László Molnár
037c29d24a
added full support for 64-bit relocations
2013-08-22 21:43:11 +02:00
László Molnár
893f26ac9a
fix wcle fixup unpacking segfault (sf.net bug 220)
2013-08-19 13:39:44 +02:00
John Reiser
d43f8e3100
Alignment bug in test or decompress of shared library;
...
sourceforge.net/p/upx/bugs/218/
2013-07-06 13:50:15 -07:00
John Reiser
2b42acf7b8
ARM heuristic dcache flush by sweeping 1/2 MB
2013-06-10 14:20:59 -07:00
John Reiser
f65b80ed42
ARM remember readlink("/proc/self/exe",) as environment variable " =" (3 spaces)
2013-06-09 20:33:59 -07:00
John Reiser
e84abbdc82
ARM __clear_cache() has bugs
...
Linux hostname 3.0.8-482645-user #1 SMP PREEMPT Mon Apr 30 19:43:45 KST 2012 armv7l GNU/Linux
Processor : ARMv7 Processor rev 3 (v7l)
processor : 0
BogoMIPS : 597.12
processor : 1
BogoMIPS : 597.12
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x1
CPU part : 0xc09
CPU revision : 3
Hardware : Espresso10
Revision : 000a
2013-06-09 13:03:06 -07:00
John Reiser
66269eabe9
ARM Try a hole so that kernel does not extend brk(0)
2013-06-08 08:39:08 -07:00
John Reiser
36c0928483
ARM __clear_cache() on escape hatch; http://sourceforge.net/p/upx/bugs/214/
2013-06-07 07:08:03 -07:00
John Reiser
9237e15adc
Fix ARM compress shared library.
2013-05-10 16:20:52 -07:00
Markus F.X.J. Oberhumer
0d3a2072b2
Add some more sanity checks in pefile.cpp.
2013-04-04 14:30:52 +02:00
Markus F.X.J. Oberhumer
aa2ee5dfc2
New ACC version.
2013-03-20 16:48:27 +00:00
John Reiser
b515fa39ec
Apple codesign follies: need more flags
2013-03-07 19:47:44 -08:00
Markus F.X.J. Oberhumer
76e3f4eb92
Post-release version bump.
2013-02-20 13:50:12 +01:00
Markus F.X.J. Oberhumer
7082594bbc
Prepare release.
2013-02-18 11:03:33 +01:00
Markus F.X.J. Oberhumer
36dd35f238
Silence some compilation warnings.
2013-02-18 11:01:30 +01:00
John Reiser
9c9fb6a485
DEBUG-only bug in decimal()
2013-02-15 16:35:45 -08:00
John Reiser
5438a4837b
more AT_PHDR trouble
2013-02-15 16:32:51 -08:00
Markus F.X.J. Oberhumer
84996e8cb6
Bump tentative release date.
2013-02-12 10:32:11 +01:00
Markus F.X.J. Oberhumer
87a368a857
Welcome 2013.
2013-02-12 10:14:03 +01:00
Markus F.X.J. Oberhumer
21412d93dd
New ACC version.
2013-02-12 08:16:44 +00:00
John Reiser
0b11ff22b4
internal documentation: pointer to source for Apple codesign
2013-02-03 11:27:02 -08:00
John Reiser
8fafa78796
sync stubs
2013-01-31 12:33:16 -08:00
John Reiser
c43158f8a2
find PT_LOAD in case ARM PT_EXIDX is first
2013-01-31 12:21:51 -08:00
John Reiser
92ad524947
clear registers at user entry (paranoia)
2013-01-31 12:20:42 -08:00
John Reiser
b362a61863
fix for user brk() on ARM with static linking
2013-01-31 12:19:35 -08:00
John Reiser
468fec38d7
Fix .e_ident[EI_OSABI] for Debian armhf.
2013-01-30 13:31:35 -08:00
John Reiser
89830a5ae0
Mac OS X codesign disallows overhang of vmsize.
2013-01-25 15:58:25 -08:00
John Reiser
5977c296bd
Fix codesign for Mac OS X.
2013-01-24 15:28:21 -08:00
Markus F.X.J. Oberhumer
25d706a913
Whitespace cleanup.
2012-10-31 15:50:52 +01:00
John Reiser
048236aaaa
Isolate change to p_mach.cpp of previous revision
...
(p_lx_elf.cpp and p_lx_elf.h were included by mistake.)
2012-10-10 08:58:15 -07:00
John Reiser
d442c58fd1
MachO no longer needs contiguous LC_SEGMENT (SourceForge bug 3308161)
2012-10-10 08:51:52 -07:00
John Reiser
f890f6bb09
ignore another .vmsize==0; fix unfold which needs another page
2012-08-23 14:26:42 -07:00
John Reiser
036d466790
allow 3-byte decompressor overrun; fix DEBUG decimal(); unify with i386
2012-08-23 14:25:32 -07:00
John Reiser
dee47ba2d8
implement DEBUG
2012-08-23 14:22:55 -07:00
John Reiser
be96c28b77
fix DEBUG decimal() of negative number
2012-08-23 12:37:44 -07:00
John Reiser
ad1c0f578e
fix DEBUG decimal() of negative number
2012-08-23 07:31:30 -07:00
John Reiser
c8f7b1b72c
MacOSX launcher gets SIGBUS when it cannot find mapped Mach_header.
...
Add segZERO, segMHDR, secMHDR.
2012-08-22 20:46:35 -07:00
John Reiser
c89702ae84
skip 0==.vmsize; also DEBUG, DPRINTF
2012-08-22 20:43:00 -07:00
John Reiser
2d29a82250
PackMachBase<T>::pack1() segTEXT.vmaddr must ignore zero-length segments
2012-08-20 20:02:26 -07:00
John Reiser
b36c65e654
fix Mac OS X code signing; also leave room for LC_UUID
2012-08-04 16:44:21 -07:00
John Reiser
09b072b908
Leave space for code signing on Mac OS X.
2012-08-03 13:28:33 -07:00
John Reiser
0ae9fee350
Mach_linkedit_data_command
2012-08-03 13:20:00 -07:00
John Reiser
1579182ed9
PackUnix::canUnpack() allows zero-filled last page
2012-08-03 13:19:28 -07:00
John Reiser
074671aa71
::unpack "if (fo)"; also "delete []" (SourceForge bug 3545609)
2012-07-19 20:11:44 -07:00
John Reiser
36b7c47247
__DWARF LC_SEGMENT_64 with .vmsize==0 (SourceForge bug 3308161)
2012-07-18 15:37:41 -07:00
John Reiser
8a5d352733
Portability: fix "EOFException: premature end of file" doing ELF on Windows.
...
OutputFile::read() was bad news; fsync() should work, but was missing.
2012-07-12 14:25:28 -07:00
John Reiser
f383629282
compressWithFilters(..., inhibit_compression_check=0) // SourceForge bug 3541020
...
Not good to check compression ratio on every block when blocksize < file_size,
as when --force_execve of Elf > 0x80000 bytes.
2012-07-12 07:04:56 -07:00
John Reiser
a6d717cb04
big endian, too: ARM Linux EABI version 4 and 5 is a mess
2012-07-07 07:45:51 -07:00
Markus F.X.J. Oberhumer
84a5753301
New ACC version.
2012-05-31 16:08:14 +00:00
Markus F.X.J. Oberhumer
5d2d9c7e81
Update .hgignore. Update valgrind macros.
2012-04-26 09:05:35 +02:00
Markus F.X.J. Oberhumer
82801d1411
Fix some typos in documentation and comments.
2012-03-27 02:14:03 +02:00
John Reiser
340c3963d8
MIPS mmap_privanon in .S in case gcc learns how to 'bal'.
2012-03-14 08:24:04 -07:00
John Reiser
ef15cf9847
merge
2012-03-13 19:56:30 -07:00
John Reiser
4d613ccfa7
MIPS mmap_privanon() forgot to set syscall number; also gcc __asm__() problems.
...
[Sourceforge upx-Bugs-3503753]
2012-03-13 19:54:47 -07:00
Markus F.X.J. Oberhumer
43ce34d547
Welcome 2012.
2012-01-01 22:35:11 +01:00
Markus F.X.J. Oberhumer
eda074cd80
New ACC version.
2012-01-01 21:18:43 +00:00
Markus F.X.J. Oberhumer
a38721db93
Remove meaningless "const" from casts.
2011-12-14 06:05:41 +01:00
Markus F.X.J. Oberhumer
a06e811717
Remove extra semicolons.
2011-12-14 06:05:08 +01:00
Markus F.X.J. Oberhumer
86e534ff75
Remove trailing whitespace. Remove hard tabs.
2011-12-14 06:03:08 +01:00
John Reiser
640d5b2dec
Option --preserve-build-id for Gnu ELF; contributed by Nicholas Twerdochlib
...
(SourceForge [ upx-Patches-3413335 ])
2011-12-13 17:26:03 -08:00
Markus F.X.J. Oberhumer
cf28306997
Post-release version bump.
2011-12-13 01:30:00 +01:00
Markus F.X.J. Oberhumer
fed3ed9f9a
Prepare release.
2011-12-12 11:55:45 +01:00
Markus F.X.J. Oberhumer
260138ba11
Silence some compilation warnings.
2011-12-12 11:30:02 +01:00
John Reiser
d4a22c7851
Sync stub for amd64-darwin.macho-entry.
2011-12-06 07:03:53 -08:00
John Reiser
06cf986490
overlap unfolded stub on Mach-O amd64 [SourceForge upx-Bugs-3447184]
2011-12-02 22:01:13 -08:00
John Reiser
adf9aa04ce
overlap unfolded stub on Mach-O i386 [SourceForge upx-Bugs-3447184]
2011-12-02 20:51:13 -08:00
John Reiser
69f66fbe52
rebuild using broader dependencies of previous commit
2011-11-23 13:25:25 -08:00
John Reiser
d061005c89
propagate dependency on i386-linux.elf-main.c by hand
2011-11-23 13:23:11 -08:00
John Reiser
f6ee8b9f04
MSVC++ disallows zero-length array in struct
2011-11-23 13:05:00 -08:00
John Reiser
31af22c2ff
ARM_is_QNX looks for PT_INTERP containing "ldqnx"
2011-10-16 15:04:18 -07:00
John Reiser
c421e3f243
ARM stub: fix editing mistake
2011-10-16 13:40:21 -07:00
John Reiser
6e92902407
ARM_is_QNX() heuristic
2011-10-16 13:11:03 -07:00
John Reiser
6256381dc3
mmap_privanon() in stub for arm,i386,mips eases QNX
2011-10-16 11:39:46 -07:00
John Reiser
b247b051ea
QNX on armel (experimental)
2011-10-15 19:49:37 -07:00
Markus F.X.J. Oberhumer
afbd553622
Silence some compilation warnings.
2011-08-30 03:40:53 +02:00
John Reiser
36bc14e884
fix PackMachFat::unpack for test mode ("-t"): fo==NULL
2011-07-11 14:37:40 -07:00
John Reiser
9c5d0ff2ff
PeFile::processRelocs() defends itself against corrupt PE header
2011-06-08 10:06:42 -07:00
John Reiser
cfa6c8ddf6
Fix ::pack3 for shared library.
2011-06-06 20:00:43 -07:00
John Reiser
21924bf022
move stub escape hatch for shared library to end of .text [glibc-2.13.90]
2011-06-02 07:18:50 -07:00
John Reiser
eea33f6019
Document copy ONLY for old_dtinit, .e_shoff in compressed shared library.
2011-05-31 11:01:40 -07:00
John Reiser
66d48ae808
MH_BUNDLE enum
2011-05-30 07:22:31 -07:00
John Reiser
de9b9fd0b1
more messages in PackLinuxElf32::canPack
2011-05-30 07:21:51 -07:00
John Reiser
ece7384be4
fpad4 from st_size(), not from getBytesWritten()
2011-05-28 12:18:27 -07:00
John Reiser
0c052e4506
amd64 output PT_LOAD[0] ends after loader
2011-05-20 10:29:04 -07:00
John Reiser
1996a0a3d6
32-bit shared libraries on i386 only (SourceForge bug 3286178)
2011-04-14 09:39:55 -07:00
László Molnár
679ad9b8c6
fixed computing of tls data end (sf.net bug 3256788)
2011-03-29 15:49:20 +02:00
John Reiser
d4983731e7
More l_info.l_lszie and .l_checksum TargetEndian.
2011-03-28 11:11:05 -07:00
John Reiser
4fec3c8f34
Merge.
2011-03-28 10:45:47 -07:00
John Reiser
836fd2565f
Place loader immediately after compressed PT_LOADs, in "middle" of file.
...
This moves compressed gaps and debuginfo out of compressed PT_LOADs,
and fixes a bug where large debuginfo would cause first mmap
at runtime to erase the loader (SourceForge bug 3239079).
2011-03-28 10:44:23 -07:00
John Reiser
54618064a1
l_info.l_lsize and .l_checksum are TargetEndian
2011-03-28 10:14:06 -07:00
John Reiser
519e3e01ae
OutputFile implements read() and readx(); beware --stdout.
2011-03-28 10:12:36 -07:00
László Molnár
aec8f81358
fixed a warning (sf.net bug 3241423)
2011-03-25 12:02:22 +01:00
John Reiser
c1d6bf4366
avoid .so with DT_TEXTREL; SourceForge bug 3190915
2011-02-24 09:38:17 -08:00
Markus F.X.J. Oberhumer
9bf2b79d9e
Enter 2011.
2011-01-03 08:49:23 +01:00
Markus F.X.J. Oberhumer
4d98408995
Remove trailing whitespace.
2010-12-29 15:46:55 +01:00
Markus F.X.J. Oberhumer
7b466388f9
Detabify.
2010-12-29 15:46:34 +01:00
Markus F.X.J. Oberhumer
b926fb3c66
Fix __cdecl syntax error.
2010-12-24 10:38:30 +01:00
László Molnár
6c8d5c0d0e
replaced abort() with internal_error() (sf.net bug 3101319)
2010-12-21 10:28:36 +01:00
László Molnár
5a1d234260
merge
2010-12-21 09:40:16 +01:00
John Reiser
fd6d42c297
i386-linux.shlib-init needs empty LEXECDYN (sourceforge 3101319)
2010-12-20 10:20:10 -08:00
László Molnár
7310ad6e92
align TLS callbacks to 4 byte boundary
2010-12-20 14:57:24 +01:00
László Molnár
7e47b1348d
fixed a typo
2010-12-20 10:51:29 +01:00
László Molnár
1e3555a6b7
added some input validity checks (for sf.net bug 3122661)
2010-12-20 00:35:57 +01:00
László Molnár
9a67ce5968
do not skip dlls with no imports from the preprocessed import data (sf.net bug 3125753)
2010-12-19 23:22:58 +01:00
Markus F.X.J. Oberhumer
279d7955f8
Keep entries sorted in Makefiles.
2010-12-03 01:04:16 +01:00
Markus F.X.J. Oberhumer
db977c0bf5
Add a .dump file to repo.
2010-11-29 15:28:35 +01:00
John Reiser
6e8be0578c
improve PIC_STRING
2010-11-18 08:23:08 -08:00
John Reiser
92f7d16b5e
more flexible labels on trace output
2010-11-18 08:22:36 -08:00
John Reiser
40bb3c2f5e
better PIC_STRING for __mips__
2010-11-17 20:45:39 -08:00
John Reiser
56a6096221
better PIC_STRING for __mips__
2010-11-17 20:42:01 -08:00
John Reiser
ee37b42a91
DEBUG for MIPS i386-linux.elf-main.c
2010-11-17 20:21:41 -08:00
John Reiser
0806e61df4
move DEBUG_STRCON adjacent to uses
2010-11-17 15:17:03 -08:00
John Reiser
279ffeeefa
unify DEBUG STR_* into i386-linux.elf-main.c from *.elf-fold.S
2010-11-17 14:32:24 -08:00
John Reiser
80c5ee2479
use up4()
2010-11-17 14:28:00 -08:00
John Reiser
16208544e5
ELFOSABI_NETBSD
2010-11-17 14:27:00 -08:00
John Reiser
6afeb24fdb
use brand_netbsd
2010-11-17 12:49:29 -08:00
John Reiser
e6357b81eb
NetBSD version 5 requires PT_NOTE for PaX. Also adjust other *BSD and PT_NOTE.
...
[Tested OK on FreeBSD 8.1, NetBSD 5.1, OpenBSD 4.8. Cleanup needed.]
2010-11-16 21:13:42 -08:00
John Reiser
dfc2efe8a6
make_hatch_arm() needs sys_munmap; also fix ARM div10.
2010-11-15 11:51:46 -08:00
John Reiser
f28b96f431
Stand-alone tracing for ARM stub; "#define DEBUG 1" then re-compile.
...
https://sourceforge.net/tracker/?func=detail&atid=102331&aid=3105926&group_id=2331
2010-11-13 21:30:34 -08:00
John Reiser
a10293f8f7
ARM copy .e_flags from input to output to preserve soft_FP flag, etc.
2010-11-09 11:05:55 -08:00
John Reiser
b1f02f91d7
NetBSD 5.0 wants PT_NOTE and branded executables
2010-11-09 10:47:53 -08:00
Markus F.X.J. Oberhumer
e76fa45d86
Small upx_sanity_check() update.
2010-11-08 23:59:34 +01:00
Markus F.X.J. Oberhumer
06f43892a5
Set sane abort() default behaviour when using msvcrt.
2010-11-08 20:48:50 +01:00
Markus F.X.J. Oberhumer
a094332b0d
Silence some compilation warnings.
2010-10-23 11:40:41 +02:00
Markus F.X.J. Oberhumer
7b8779f534
Portability updates.
2010-10-20 01:46:38 +02:00
Markus F.X.J. Oberhumer
371bf20d19
New ACC version.
2010-10-17 10:10:23 +02:00
Markus F.X.J. Oberhumer
0f633ddd15
Bump version for next release.
2010-09-08 18:04:39 +02:00
Markus F.X.J. Oberhumer
9b4c11954d
Prepare release.
2010-09-08 16:56:49 +02:00
László Molnár
7c3b2fb9cc
relocation entry for TLS callbacks is only needed when we do have TLS callbacks
2010-09-08 15:06:56 +02:00
Markus F.X.J. Oberhumer
acef68d67e
Bump version for next release.
2010-09-04 20:23:02 +02:00
Markus F.X.J. Oberhumer
955c31b165
Prepare release.
2010-09-04 13:11:59 +02:00
Markus F.X.J. Oberhumer
e8ba14a2c1
Silence some compilation warnings.
2010-09-01 14:49:26 +02:00
Markus F.X.J. Oberhumer
9670d3341c
Makefiles: sort result from wildcard, needed for unwise GNU make 3.82 change.
2010-09-01 14:10:14 +02:00
John Reiser
7451db4a68
merge
2010-08-17 11:32:02 -07:00
John Reiser
e31777ec53
ARM ELF EABI version 5
...
https://sourceforge.net/tracker/?func=detail&atid=102331&aid=3040129&group_id=2331
2010-08-17 11:30:17 -07:00
László Molnár
7aa0b3dc7a
merge
2010-08-16 13:49:54 +02:00
László Molnár
e7b2d5dc01
coding style updates - only whitespace changes
2010-08-16 13:36:10 +02:00
László Molnár
47d728667d
merge
2010-08-16 13:20:28 +02:00
László Molnár
e1f8989d54
removed dosish file endings
2010-08-16 13:09:27 +02:00
Stefan Widmann
1d8cb47830
TLS handling updated to v2, ASLR fix in unpacking
2010-08-13 17:44:21 +02:00
Markus F.X.J. Oberhumer
faaa7c37a9
Remove duplicate file.
2010-08-08 16:32:59 +02:00
Markus F.X.J. Oberhumer
0aff9d8df4
Use consistent syntax for boolean preprocessor expressions.
2010-08-08 16:20:16 +02:00
Markus F.X.J. Oberhumer
30c3f8c1ac
New ACC version.
2010-08-08 16:10:30 +02:00
John Reiser
bcd2469e01
merge
2010-08-06 13:31:54 -07:00
John Reiser
983c6ae73d
amd64 stub: relocate ADRX and ADRU after copy
2010-08-06 13:29:32 -07:00
Markus F.X.J. Oberhumer
6d8e1fe776
Start using acc_getopt.
2010-08-05 15:08:06 +02:00
Markus F.X.J. Oberhumer
99b4921309
New ACC version.
2010-08-05 15:06:03 +02:00
John Reiser
3c231c3c9e
FreeBSD 8.x got picky about MAP_ANONYMOUS
2010-07-21 10:19:11 -07:00
John Reiser
175c0a6236
--unmap-all-pages affects i386-*BSD, too
2010-07-20 12:47:33 -07:00
John Reiser
0031ceb06c
propagate changes from auxv_find() in i386-linux.elf-main.c
2010-07-17 08:22:09 -07:00
John Reiser
e3cc5a63df
don't erase AT_SYSINFO* if no conflict with decompressed folded stub
2010-07-17 08:19:50 -07:00
John Reiser
3cb61402c2
merge
2010-07-16 21:01:45 -07:00
John Reiser
5336c51199
Fix conflict between VDSO and unfolded decompressor for ET_DYN
...
(-fPIE) with unlimited stack on Linux-2.6.34 et al.
2010-07-16 20:58:52 -07:00
Markus F.X.J. Oberhumer
52aa658aaa
Silence some compilation warnings.
2010-07-14 20:03:09 +02:00
John Reiser
d08a51d7e4
fix don't-care uninit from valgrind(memcheck)
2010-07-07 09:52:58 -07:00
John Reiser
d97a557ac3
unpacking PackMachFat::CPU_TYPE_X86_64
2010-06-28 16:02:57 -07:00
John Reiser
8a68d9cded
more MACH_SEGMENT_ENUM; no code yet
2010-06-15 09:22:59 -07:00
László Molnár
b031f7e902
always initialize variable use_tls_callbacks
2010-06-15 15:04:48 +02:00
Markus F.X.J. Oberhumer
8f8aaca818
Remove trailing whitespace.
2010-06-06 22:40:10 +02:00
László Molnár
801f92b7e7
merge
2010-06-04 17:56:52 +02:00
László Molnár
44db45700e
new version of .dump file
2010-06-04 17:55:13 +02:00
Stefan Widmann
25902005f6
win32/pe TLS handling added
2010-06-01 19:21:52 +02:00
John Reiser
ffec71e0d8
Fix vmlinux/ppc32 at compress time. Runtime needs work.
2010-04-28 20:43:50 -07:00
John Reiser
99a208110b
Detect LC_SEGMENT beyond end-of-file in PackMachBase<T>::find_SEGMENT_gap.
2010-04-28 20:05:23 -07:00
Markus F.X.J. Oberhumer
e56799c993
Bump version for next release.
2010-04-27 17:26:05 +02:00
Markus F.X.J. Oberhumer
626025d539
Prepare release.
2010-04-27 16:09:41 +02:00
Markus F.X.J. Oberhumer
40f592eade
Add one .dump file.
2010-04-26 18:27:54 +02:00
Markus F.X.J. Oberhumer
5e899f0be4
Silence some annoying compiler warnings.
2010-04-19 03:15:22 +02:00
Markus F.X.J. Oberhumer
f2748284b1
New ACC version.
2010-04-19 03:15:01 +02:00
Markus F.X.J. Oberhumer
a15ce00934
Fix some small memory leaks. Minor cleanup.
2010-04-10 13:57:25 +02:00
John Reiser
9e3e80261b
merge
2010-03-31 14:15:18 -07:00
John Reiser
c72c685434
Diagnose PT_LOAD beyond end-of-file.
...
https://sourceforge.net/tracker/?func=detail&atid=102331&aid=2979240&group_id=2331
2010-03-31 14:09:28 -07:00
Markus F.X.J. Oberhumer
0177a8d277
Use upx_snprintf instead of snprintf.
2010-03-31 02:23:06 +02:00
Markus F.X.J. Oberhumer
b6a9b0a4c9
Silence some compilation warnings.
2010-03-31 02:16:32 +02:00
John Reiser
f4f8bd8d42
Fix for "upx --help" constructs with (0===f)
2010-03-17 18:33:30 -07:00
John Reiser
6e4aeffc0c
Withdraw support for shared libraries (.dylib) on Darwin (Apple Mac OS X).
2010-03-12 10:20:18 -08:00
John Reiser
dba256d384
Fix amd64-darwin.dylib-entry.S so it compiles.
2010-03-11 14:37:17 -08:00
John Reiser
910008e9e7
Hack on amd64-darwin.dylib-entry.S
2010-03-10 18:58:38 -08:00
John Reiser
8cb9545c41
Hack on amd64-darwin.dylib-entry.S
2010-03-10 15:19:18 -08:00
John Reiser
59c16da6fb
PackMachBase::pack4dylib avoid sliding if offset or reloff is 0.
2010-03-10 13:14:52 -08:00
John Reiser
630df5bbd2
Fix structs from Apple mach-o/loader.h for 64-bit. (Apple goofed.)
2010-03-10 10:29:41 -08:00
John Reiser
f550111400
PackDylibAMD64 (Mac OS X shared library on x86_64)
2010-03-09 19:02:25 -08:00
John Reiser
77377195aa
Allow CPU_TYPE_X86_64 for MH_EXECUTE in fat (universal) binaries,
...
but no MH_DYLIB yet. infoWarning() for unsupported cputype.
2010-03-09 13:35:06 -08:00
John Reiser
7e2e72bd40
infoWarning for shlib with no DT_INIT
2010-03-09 13:03:03 -08:00
John Reiser
aa7a13bd02
Linux kernels must be ET_EXEC
2010-03-09 09:22:57 -08:00
John Reiser
5895058a17
Linux kernels must be ET_EXEC
2010-03-09 09:20:46 -08:00
John Reiser
ffb60d5149
memmove instead of overlapping memcpy
2010-03-08 22:01:25 -08:00
John Reiser
1e2cb279b0
Fix memory leak in --lzma compression.
2010-03-08 22:00:35 -08:00
John Reiser
e7f766f5ba
i386-linux.shlib: stub commonality with non-shlib
2010-03-08 17:33:56 -08:00
John Reiser
8de5aa9409
Fix ET_DYN main program on amd64-linux.elf.
2010-03-08 16:59:53 -08:00
John Reiser
bf28a4df49
MIPS stub NRV_HEAD always saves $ra on stack.
...
bits.ash has the only __MIPSEL__/__MIPSEB__ dependency: lwl/lwr swl/swr.
2010-03-08 10:49:11 -08:00
Markus F.X.J. Oberhumer
fe1a0ab371
Bump tentative release date.
2010-03-06 16:50:17 +01:00
Markus F.X.J. Oberhumer
01daccfaf7
Avoid compiler warnings.
2010-03-06 16:35:18 +01:00
Markus F.X.J. Oberhumer
94e861e298
Rebuild stubs.
2010-03-06 16:34:05 +01:00
Jens Medoch
d36af2ed5c
Import 3-upx-hg_mips-r3k_base.patch.
2010-03-06 16:27:38 +01:00
Jens Medoch
7104b33214
Import 2-upx-hg_mips-r3k_makefile.patch.
2010-03-06 16:26:32 +01:00
Jens Medoch
32998e5377
Import 1-upx-hg_mips-stub_clean-up.patch.
2010-03-06 16:25:58 +01:00
Jens Medoch
af0c9ef092
Import 0-upx-hg_mips-r3k_ucl.patch.
2010-03-06 16:25:29 +01:00
Markus F.X.J. Oberhumer
3bc3b3d10e
Detabify. Remove trailing whitespace.
2010-03-01 01:28:03 +01:00
John Reiser
f03f42ca4d
Linux preserve /proc/self/exe; --unmap-all-pages option
2010-02-28 15:58:08 -08:00
John Reiser
79783abeb1
merge
2010-02-20 20:48:42 -08:00
John Reiser
895b0bd602
merge
2010-02-20 20:46:20 -08:00
John Reiser
2ee5ee92f8
merge
2010-02-20 20:44:54 -08:00
John Reiser
3e619423b1
merge
2010-02-20 20:40:32 -08:00
John Reiser
b524e18bdf
merge
2010-02-20 20:40:20 -08:00
John Reiser
6aa4579db8
merge
2010-02-20 20:40:04 -08:00
John Reiser
17fb86c0f1
merge
2010-02-20 20:39:52 -08:00
John Reiser
62ecfe4873
merge
2010-02-20 20:39:39 -08:00
John Reiser
04e55e6b9a
merge
2010-02-20 20:39:19 -08:00
John Reiser
f432aa1090
merge
2010-02-20 20:39:04 -08:00
John Reiser
7add104313
merge
2010-02-20 20:38:20 -08:00
John Reiser
36de249066
merge
2010-02-20 20:36:34 -08:00
John Reiser
b7a54dcffd
merge
2010-02-20 20:26:08 -08:00
John Reiser
6bb28deab2
merge
2010-02-20 20:24:55 -08:00
John Reiser
7f88d15c86
ELF ::unpack decompressing ElfXX_Ehdr changes .e_phnum
2010-02-20 19:57:34 -08:00
Markus F.X.J. Oberhumer
5f39884bf7
Silence a compiler warning.
2010-02-07 00:10:49 +01:00
Markus F.X.J. Oberhumer
d96825a242
Fix a typo.
2010-02-07 00:10:38 +01:00
Markus F.X.J. Oberhumer
443a938091
New ACC version.
2010-02-06 17:18:46 +01:00
Markus F.X.J. Oberhumer
6bc3197721
Enter 2010.
2010-02-06 17:15:49 +01:00
Markus F.X.J. Oberhumer
c1ddea479d
Minor portability fixes.
2009-12-03 19:58:23 +01:00
John Reiser
5f3a95962c
PackLinuxElf32::unpack fix ARM (thumb)
2009-10-26 13:35:14 -07:00
John Reiser
ee1a8e6a32
eabi-linux.shlib unfilter in thumb mode
2009-10-26 10:37:11 -07:00
John Reiser
eeae73296e
thumb-eabi-linux.shlib, and use it (for smaller size) instead of ARM.
...
[Consider compress-time option to choose ARM vs thumb?]
2009-10-26 09:05:12 -07:00
John Reiser
4ca8357af4
Merge
2009-10-26 08:11:37 -07:00
John Reiser
8a5b8c87fb
arm.shlib-init: escape hatch is 8 bytes; speedup movsl
2009-10-25 20:40:26 -07:00
John Reiser
6ab04d7bbc
::buildLinuxLoader empty FOLDEXED for shlib
2009-10-25 13:52:41 -07:00
Markus F.X.J. Oberhumer
a5a1380636
Add missing .dump files to repo.
2009-10-24 13:55:36 +02:00
John Reiser
eeab1aef64
Synonyms R_ARM_THM_PC22 and R_ARM_THM_XPC22 for R_ARM_THM_CALL.
2009-10-22 21:05:05 -07:00
John Reiser
4e1c342e55
arm-linux.shlib escape hatch: munmap temporary pages
2009-10-21 09:32:42 -07:00
John Reiser
d8ed259bce
arm-linux.shlib allow thumb interworking for DT_INIT
2009-10-21 08:13:09 -07:00
John Reiser
9f6cb5de4c
armel-eabi-linux.shlib: improve integration with system calls.
2009-10-20 09:53:45 -07:00
John Reiser
ba634118d7
Shorten runtime copying for armel-eabi-linux.shlib.
2009-10-19 22:28:44 -07:00
John Reiser
63da091d36
Compress shared library for armel-eabi-linux.
2009-10-19 20:48:46 -07:00
John Reiser
ad0dc88a33
Cleanup some FIXME. amd64-linux.shlib forces 4KiB page size to save space.
2009-10-18 16:03:26 -07:00
John Reiser
147acf4b57
Compress shared library for amd64-linux.
2009-10-17 21:55:03 -07:00
John Reiser
5085f3a15e
Allow ET_DYN on amd64-linux.elf
2009-10-16 17:47:16 -07:00
John Reiser
22a95ad8ea
fix comment
2009-10-16 17:46:41 -07:00
John Reiser
df4bd6a60c
move PackLinuxElf32x86::unpack up the class hierarchy to PackLinuxElf32
2009-10-16 11:00:33 -07:00
John Reiser
813e7b05e4
fix .ui_total_passes when shlib
2009-10-16 10:56:15 -07:00
John Reiser
ab8b486b4a
Fix -Wshadow complaints.
2009-10-16 10:01:29 -07:00
Markus F.X.J. Oberhumer
590f666ec9
Enable -Wshadow compiler option.
2009-10-16 18:06:16 +02:00
Markus F.X.J. Oberhumer
9adaee915b
Detabify.
2009-10-16 16:29:09 +02:00
Markus F.X.J. Oberhumer
bce0f06fe9
Rebuild stubs so that they actually match the source code!
2009-10-16 16:27:52 +02:00
John Reiser
856ecb84a0
Compress shared library for i386-linux. DT_INIT must exist. Everything
...
needed by ld-linux for runtime relocation must be at the beginning of the
first PT_LOAD, etc.
2009-10-15 20:35:07 -07:00
John Reiser
90ddc06c98
DT_INIT, DT_CHECKSUM, DT_VERSYM, DT_VERDEF, DT_VERNEEDED
2009-10-14 17:50:35 -07:00