1
0
mirror of https://github.com/upx/upx synced 2025-09-28 19:06:07 +08:00
Commit Graph

2199 Commits

Author SHA1 Message Date
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