John Reiser
08c63f06eb
p_lx_elf.h: phdro for --android-shlib
...
modified: p_lx_elf.cpp
modified: p_lx_elf.h
2018-01-19 22:01:56 -08:00
Markus F.X.J. Oberhumer
021c8db58a
Welcome 2018.
2018-01-19 10:55:32 +01:00
John Reiser
86745721ee
MSVC strikes again
...
modified: p_lx_elf.cpp
modified: p_lx_elf.h
2018-01-15 16:27:00 -08:00
John Reiser
c34fe09a79
Revamp --android-shlib
...
Android "Oreo" wants to deal with ElfXX_Shdr[]. So splice 4KiB into PT_LOAD[0]
with an "extra" copy of them. This requires careful relocation processing.
It also costs a page at run time, and an average of a page in the file
(depending on fragmentation at the boundary between r-x and rw- .)
https://github.com/upx/upx/issues/124
https://github.com/upx/upx/issues/139
https://github.com/upx/upx/issues/142
modified: p_elf_enum.h
modified: p_lx_elf.cpp
modified: p_lx_elf.h
modified: stub/src/arm.v4a-linux.shlib-init.S
modified: stub/src/arm.v4t-linux.shlib-init.S
modified: stub/src/arm64-linux.shlib-init.S
modified: stub/arm.v5a-linux.shlib-init.h
modified: stub/arm.v5t-linux.shlib-init.h
modified: stub/arm64-linux.shlib-init.h
modified: ../.github/travis_testsuite_1.sh
2018-01-15 16:08:34 -08:00
John Reiser
4854c03096
uint64_t ==> upx_uint64_t
...
MSVC error C2065: 'uint64_t' : undeclared identifier
modified: p_lx_elf.cpp
modified: p_lx_elf.h
modified: p_mach.cpp
2018-01-06 09:33:04 -08:00
John Reiser
507e19945e
more checking of PT_DYNAMIC
...
https://github.com/upx/upx/issues/166
modified: p_lx_elf.cpp
modified: p_lx_elf.h
2017-12-30 22:31:50 -08:00
John Reiser
e04bf9e4bc
more checking of PT_DYNAMIC
...
https://github.com/upx/upx/issues/164
modified: p_lx_elf.cpp
modified: p_lx_elf.h
2017-12-28 17:40:04 -08:00
John Reiser
9e8de4abe5
i386: new stub strategy to avoid problems with early mmap layout
...
The stub occupies the same region that execve() would create
for the original progam. The stub copies everything to a new area,
erases the original region, replaces it with the de-compressed
program, and erases the copy of itself via the escape hatch.
The copy is inexpensive via mmap() of /proc/self/exe.
modified: stub/src/i386-linux.elf-entry.S
modified: stub/src/i386-linux.elf-fold.S
modified: stub/src/i386-linux.elf-main.c
modified: p_lx_elf.cpp
modified: p_lx_elf.h
modified: p_lx_interp.cpp
modified: p_lx_interp.h
modified: p_lx_sh.cpp
modified: p_lx_sh.h
modified: p_mach.cpp
modified: p_mach.h
modified: p_unix.cpp
modified: p_unix.h
modified: p_vmlinx.cpp
plus .h, .map, .dump
2017-10-01 15:56:34 -07:00
John Reiser
e7f1e99a5e
Merge branch 'jreiser' into devel
...
O_BINFO simplifies stubs on linux Elf;
PowerPC64 (big endian: Apple Macintosh G5) and PowerPC* cleanup;
-fpie simplification; shlib for arm64, amd64.
A big merge due to suspending activity on 'devel' branch
during stabilization for release of UPX-3.94.
There were intermediate merges with private branch 'jreiser',
and attempted rebase onto 'devel' did not go well.
Verfication of cases ({ET_EXEC, -fpie, shlib} x {$ARCH}) is in progress.
modified: ../.github/travis_testsuite_1.sh
modified: conf.h
modified: linker.cpp
modified: linker.h
modified: p_lx_elf.cpp
modified: p_lx_elf.h
modified: p_mach.cpp
modified: p_mach.h
modified: p_mach_enum.h
modified: packmast.cpp
modified: stub/Makefile
modified: stub/scripts/xstrip.py
modified: stub/src/amd64-darwin.dylib-entry.S
modified: stub/src/amd64-darwin.macho-entry.S
modified: stub/src/amd64-linux.elf-entry.S
modified: stub/src/amd64-linux.elf-fold.S
modified: stub/src/amd64-linux.elf-main.c
modified: stub/src/arch/powerpc/32/bxx.S
modified: stub/src/arch/powerpc/32/lzma_d.S
modified: stub/src/arch/powerpc/32/nrv2b_d.S
modified: stub/src/arch/powerpc/32/nrv2d_d.S
modified: stub/src/arch/powerpc/32/nrv2e_d.S
modified: stub/src/arch/powerpc/32/ppc_regs.h
new file: stub/src/arch/powerpc/64/Makefile
new file: stub/src/arch/powerpc/64/Makefile.extra
new file: stub/src/arch/powerpc/64/bxx.S
new file: stub/src/arch/powerpc/64/lzma_d.S
new file: stub/src/arch/powerpc/64/lzma_d_cf.S
new file: stub/src/arch/powerpc/64/lzma_d_cs.S
new file: stub/src/arch/powerpc/64/macros.S
new file: stub/src/arch/powerpc/64/nrv2b_d.S
new file: stub/src/arch/powerpc/64/nrv2d_d.S
new file: stub/src/arch/powerpc/64/nrv2e_d.S
new file: stub/src/arch/powerpc/64/ppc_regs.h
modified: stub/src/arch/powerpc/64le/bxx.S
copied: stub/src/arch/powerpc/64le/lzma_d.S -> stub/src/arch/powerpc/64le/lzma_d-common.S
modified: stub/src/arch/powerpc/64le/lzma_d.S
modified: stub/src/arch/powerpc/64le/lzma_d_cs.S
modified: stub/src/arch/powerpc/64le/nrv2b_d.S
modified: stub/src/arch/powerpc/64le/nrv2d_d.S
modified: stub/src/arch/powerpc/64le/nrv2e_d.S
modified: stub/src/arch/powerpc/64le/ppc_regs.h
modified: stub/src/arm.v4a-linux.elf-entry.S
modified: stub/src/arm.v4a-linux.elf-fold.S
modified: stub/src/arm64-darwin.macho-entry.S
modified: stub/src/arm64-linux.elf-entry.S
modified: stub/src/arm64-linux.elf-fold.S
modified: stub/src/arm64-linux.shlib-init.S
modified: stub/src/i386-bsd.elf-entry.S
modified: stub/src/i386-darwin.macho-entry.S
modified: stub/src/i386-linux.elf-entry.S
modified: stub/src/i386-linux.elf-fold.S
modified: stub/src/mipsel.r3000-linux.elf-entry.S
modified: stub/src/mipsel.r3000-linux.elf-fold.S
modified: stub/src/powerpc-darwin.dylib-entry.S
modified: stub/src/powerpc-darwin.macho-entry.S
modified: stub/src/powerpc-darwin.macho-fold.S
modified: stub/src/powerpc-linux.elf-entry.S
modified: stub/src/powerpc-linux.elf-fold.S
modified: stub/src/powerpc-linux.elf-main.c
new file: stub/src/powerpc64-darwin.dylib-entry.S
new file: stub/src/powerpc64-darwin.macho-entry.S
new file: stub/src/powerpc64-darwin.macho-fold.S
new file: stub/src/powerpc64-darwin.macho-main.c
new file: stub/src/powerpc64-linux.elf-entry.S
new file: stub/src/powerpc64-linux.elf-fold.S
new file: stub/src/powerpc64-linux.elf-fold.lds
new file: stub/src/powerpc64-linux.elf-main.c
modified: stub/src/powerpc64-savegpr0.S
modified: stub/src/powerpc64le-darwin.dylib-entry.S
modified: stub/src/powerpc64le-darwin.macho-entry.S
modified: stub/src/powerpc64le-darwin.macho-fold.S
modified: stub/src/powerpc64le-linux.elf-entry.S
modified: stub/src/powerpc64le-linux.elf-fold.S
modified: stub/src/powerpc64le-linux.elf-main.c
and most stub/*.h and stub/tmp/*.dump
2017-06-05 11:32:25 -07:00
John Reiser
b7c91941b8
--android-shlib fix Elf64_Shdr.sh_offset
...
https://github.com/upx/upx/issues/100
modified: ../p_lx_elf.cpp
modified: ../p_lx_elf.h
2017-05-31 11:04:56 -07:00
John Reiser
ee18fe9bba
DF_1_PIE and calls_crt1() to handle part of -pie,-fPIE
...
https://github.com/upx/upx/issues/106 [partial]
modified: p_elf_enum.h
modified: p_lx_elf.cpp
modified: p_lx_elf.h
2017-05-31 10:53:55 -07:00
John Reiser
4e05f087f9
PowerPC 64-bit big-endian
...
modified: conf.h
modified: linker.cpp
modified: linker.h
modified: p_lx_elf.cpp
modified: p_lx_elf.h
modified: packmast.cpp
modified: stub/Makefile
modified: stub/powerpc-linux.elf-entry.h
new file: stub/powerpc64-linux.elf-entry.h
new file: stub/powerpc64-linux.elf-fold.h
modified: stub/powerpc64le-linux.elf-entry.h
modified: stub/powerpc64le-linux.elf-fold.h
modified: stub/scripts/xstrip.py
modified: stub/src/arch/powerpc/64le/nrv2b_d.S
modified: stub/src/arch/powerpc/64le/nrv2d_d.S
modified: stub/src/arch/powerpc/64le/nrv2e_d.S
new file: stub/src/powerpc64-darwin.dylib-entry.S
new file: stub/src/powerpc64-darwin.macho-entry.S
new file: stub/src/powerpc64-darwin.macho-fold.S
new file: stub/src/powerpc64-darwin.macho-main.c
new file: stub/src/powerpc64-linux.elf-entry.S
new file: stub/src/powerpc64-linux.elf-fold.S
new file: stub/src/powerpc64-linux.elf-fold.lds
new file: stub/src/powerpc64-linux.elf-main.c
modified: stub/src/powerpc64le-linux.elf-entry.S
modified: stub/src/powerpc64le-linux.elf-fold.S
modified: stub/src/powerpc64le-linux.elf-main.c
modified: stub/tmp/powerpc64le-linux.elf-entry.bin.dump
modified: stub/tmp/powerpc64le-linux.elf-fold.map
2017-04-11 19:15:43 -07:00
John Reiser
491e8640b2
is_pie; O_BINFO; remove LUNMP000, LUNMP001
...
modified: p_lx_elf.cpp
modified: p_lx_elf.h
2017-04-06 14:15:07 -07:00
John Reiser
a59005e836
Elf propagates NX via PT_GNU_STACK (except MIPS stub is too difficult for now)
...
https://github.com/upx/upx/issues/81
modified: ../.github/travis_testsuite_1.sh
modified: p_elf_enum.h
modified: p_lx_elf.cpp
modified: p_lx_elf.h
modified: stub/amd64-linux.elf-entry.h
modified: stub/i386-linux.elf-fold.h
modified: stub/powerpc-linux.elf-fold.h
modified: stub/powerpc64le-linux.elf-fold.h
modified: stub/src/amd64-linux.elf-entry.S
modified: stub/src/i386-linux.elf-fold.S
modified: stub/src/powerpc-linux.elf-fold.S
modified: stub/src/powerpc64le-linux.elf-fold.S
modified: stub/tmp/amd64-linux.elf-entry.bin.dump
modified: stub/tmp/i386-linux.elf-fold.map
modified: stub/tmp/powerpc-linux.elf-fold.map
modified: stub/tmp/powerpc64le-linux.elf-fold.map
2017-04-03 20:25:57 -07:00
John Reiser
978c3eca23
--android-shlib preserves selected Elf64_Shdr
...
https://github.com/upx/upx/issues/65
modified: p_lx_elf.cpp
modified: p_lx_elf.h
2017-03-31 13:26:27 -07:00
John Reiser
300d489408
--android-shlib preserves selected Elf32_Shdr
...
32-bit only for now; also in wrong place for unpacking (-d)
modified: main.cpp
modified: options.h
modified: p_elf_enum.h
modified: p_lx_elf.cpp
modified: p_lx_elf.h
2017-03-29 18:31:39 -07:00
John Reiser
23e3814f8a
Fix unpacking of ET_DYN
...
modified: p_lx_elf.cpp
modified: p_lx_elf.h
2017-03-27 16:10:12 -07:00
John Reiser
4089cc6e6f
arm64-linux compiles
...
modified: conf.h
modified: linker.cpp
modified: linker.h
modified: p_elf_enum.h
modified: p_lx_elf.cpp
modified: p_lx_elf.h
modified: packmast.cpp
modified: stub/Makefile
new file: stub/arm64-linux.shlib-init.h
new file: stub/src/arm64-linux.shlib-init.S
new file: stub/tmp/arm64-linux.elf-entry.bin.dump
new file: stub/tmp/arm64-linux.elf-fold.map
new file: stub/tmp/arm64-linux.shlib-init.bin.dump
2017-03-05 18:07:29 -08:00
Markus F.X.J. Oberhumer
c4da5e81fa
Welcome 2017.
2017-01-03 12:02:07 +01:00
Markus F.X.J. Oberhumer
0ccbc5f139
Silence some bogus coverity warnings.
2016-12-21 19:03:01 +01:00
John Reiser
a1cabd5a68
Avoid warning C4805: '|': unsafe mix of type 'bool' and type 'unsigned int' in operation
...
modified: p_lx_elf.cpp
modified: p_lx_elf.h
2016-12-18 11:32:47 -08:00
John Reiser
44328aee76
fix brk() problem when is_big: stub must munmap all_pages
...
https://github.com/upx/upx/issues/5
modified: p_lx_elf.cpp
modified: p_lx_elf.h
2016-10-15 14:06:56 -07:00
Markus F.X.J. Oberhumer
f7554374ab
Update email address.
2016-09-28 12:25:01 +02:00
Markus F.X.J. Oberhumer
daafc29d2b
Add support for UPX_VERSION_GITREV. Some cleanups.
2016-09-25 09:41:26 +02:00
John Reiser
2c28521283
NetBSDElf32x86 should not impersonate [i386-linux.elf, linux/i386]
2016-09-23 19:31:26 -07:00
Markus F.X.J. Oberhumer
96d9968db5
Welcome 2016.
2016-09-22 14:07:14 +02:00
Markus F.X.J. Oberhumer
493d9f1b9d
Ongoing cleanups.
2016-09-22 03:23:55 +02:00
Markus F.X.J. Oberhumer
a7fd742c17
Canonicalize the names of our executable formats.
2016-09-21 23:58:08 +02:00
Markus F.X.J. Oberhumer
242f606a29
p_lx_elf.h: turn file_image into a MemBuffer.
2016-09-21 22:22:41 +02:00
Markus F.X.J. Oberhumer
b3121e4534
Use upx_uint16_t instead of unsigned short.
2016-09-21 17:40:11 +02:00
Markus F.X.J. Oberhumer
a2063f0628
Normalize whitespace.
2016-09-20 02:06:58 +02:00
John Reiser
01a0c8672d
changeset: 2451:4e2a6c33d5fb
...
tag: ppc64le
user: Thierry Fauck <tfauck@free.fr >
date: Wed Jun 22 08:25:13 2016 -0400
summary: Add support for ppc64le statically linked binaries
2016-07-26 17:00:25 -07:00
Markus F.X.J. Oberhumer
fb611a98f9
Welcome 2015.
2015-01-03 00:24:07 +01:00
Markus F.X.J. Oberhumer
a26c982e93
Welcome 2014.
2014-01-07 23:05:10 +01: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
Markus F.X.J. Oberhumer
b2643b6926
Start using the new intergral type names.
2013-09-20 08:19:18 +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
Markus F.X.J. Oberhumer
87a368a857
Welcome 2013.
2013-02-12 10:14:03 +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
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
Markus F.X.J. Oberhumer
43ce34d547
Welcome 2012.
2012-01-01 22:35:11 +01:00
Markus F.X.J. Oberhumer
a06e811717
Remove extra semicolons.
2011-12-14 06:05: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
John Reiser
f6ee8b9f04
MSVC++ disallows zero-length array in struct
2011-11-23 13:05:00 -08:00
John Reiser
6e92902407
ARM_is_QNX() heuristic
2011-10-16 13:11:03 -07:00
Markus F.X.J. Oberhumer
afbd553622
Silence some compilation warnings.
2011-08-30 03:40:53 +02: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
c1d6bf4366
avoid .so with DT_TEXTREL; SourceForge bug 3190915
2011-02-24 09:38:17 -08:00