John Reiser
7d2913709c
MemBuffer lowmem; for shlib, especially android
...
modified: p_lx_elf.cpp
modified: p_lx_elf.h
2018-01-21 14:03:52 -08:00
John Reiser
3623199e8d
Merge branch 'devel' into jreiser-android
2018-01-21 10:55:56 -08:00
John Reiser
e4b23f7a47
Merge branch 'devel' of https://github.com/upx/upx into devel
2018-01-21 10:30:42 -08:00
John Reiser
f056ecdcd5
pefile: Allow overlap of MZ header and PE header (h.nexepos==0x10)
...
https://github.com/upx/upx/issues/169
This means .codebase is aliased to .nexepos, with both equal to 0x10.
modified: pefile.cpp
2018-01-21 10:29:17 -08:00
John Reiser
857a03a074
fix sh_offset for new Shdr[e_shstrndx]
...
modified: p_lx_elf.cpp
2018-01-20 16:41:32 -08:00
John Reiser
a34deee4f5
work in progress for --android-shlib
...
modified: p_lx_elf.cpp
modified: p_lx_elf.h
2018-01-20 16:34:52 -08:00
John Reiser
fc9c8ae482
fix updating of DT_INIT
...
modified: p_lx_elf.cpp
2018-01-20 09:48:28 -08:00
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
John Reiser
bbff510ef1
Merge branch 'devel' into jreiser-android
...
Conflicts:
src/p_lx_elf.cpp
src/p_lx_elf.h
modified: ../.github/travis_testsuite_1.sh
modified: p_exe.cpp
modified: p_lx_elf.cpp
modified: p_lx_elf.h
modified: pefile.cpp
2018-01-19 21:51:49 -08:00
Markus F.X.J. Oberhumer
f747435952
For consistency, add missing "virtual".
2018-01-19 20:21:18 +01:00
Markus F.X.J. Oberhumer
e6edad8f46
Clean up OptVar handling.
2018-01-19 19:50:28 +01:00
Markus F.X.J. Oberhumer
05e44b9644
Fix powerpc64 cross build.
2018-01-19 15:05:43 +01:00
Markus F.X.J. Oberhumer
16bb7ab841
clang-format files.
2018-01-19 14:18:47 +01:00
Markus F.X.J. Oberhumer
9248f02557
Silence some gcc-8-snapshot compiler warnings.
2018-01-19 14:13:58 +01:00
Markus F.X.J. Oberhumer
9485a56af1
Update Travis.
2018-01-19 11:30:34 +01:00
Markus F.X.J. Oberhumer
021c8db58a
Welcome 2018.
2018-01-19 10:55:32 +01:00
John Reiser
8ab180edf8
MS-DOS .exe (not PE): default to file_size when ih.m512 and ih.p512 are zero
...
https://github.com/upx/upx/issues/169
modified: p_exe.cpp
2018-01-18 12:00:38 -08:00
John Reiser
ab35b685d4
Fix pefile.cpp bad range checking for reloc type 3 and 10
...
modified: pefile.cpp
2018-01-18 11:11:19 -08: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
1fa9ff2c05
--android-shlib handles implicit relocation in PLT
...
modified: p_lx_elf.cpp
modified: p_lx_elf.h
2018-01-15 15:45:37 -08:00
John Reiser
e8ef0cf63f
Merge branch 'devel' into jreiser-android
2018-01-13 09:25:55 -08:00
John Reiser
8c84efb8fb
--android-shlib for Android "Oreo"
...
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.
modified: p_elf_enum.h
modified: p_lx_elf.cpp
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
2018-01-13 09:20:04 -08:00
John Reiser
f3a7620ae8
ARM: recognize R_ARM_CALL and R_ARM_JUMP24 as equivalent to R_ARM_PC24
...
modified: linker.cpp
2018-01-12 08:42:34 -08:00
John Reiser
c7969ed5a5
work in progress for --android-shlib
...
modified: p_elf_enum.h
modified: p_lx_elf.cpp
modified: stub/src/arm.v4a-linux.shlib-init.S
modified: stub/src/arm.v4t-linux.shlib-init.S
2018-01-12 08:32:24 -08:00
Markus F.X.J. Oberhumer
900926c0ed
Avoid a MSVC warning.
2018-01-12 10:19:14 +01:00
John Reiser
df94f4288a
picky, picky
...
modified: p_lx_elf.cpp
2018-01-11 12:09:43 -08:00
John Reiser
969efe687d
MSVC pecadillos
...
modified: p_lx_elf.cpp
modified: pefile.cpp
2018-01-11 12:01:00 -08:00
John Reiser
ee3f1292d0
fix editing rot for mach-o .dylib
...
https://github.com/upx/upx/issues/57
modified: p_mach.cpp
2018-01-11 11:33:15 -08:00
John Reiser
cacb239040
work in progress for --android-shlib
...
modified: p_lx_elf.cpp
modified: p_lx_elf.h
modified: stub/src/arm64-linux.shlib-init.S
2018-01-11 09:39:26 -08:00
John Reiser
28d1789783
work in progress for --android-shlib
...
modified: p_lx_elf.cpp
2018-01-08 14:04:38 -08:00
John Reiser
633eb98e34
Merge branch 'devel' into jreiser-android
2018-01-06 09:53:43 -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
e853119c77
canonicalize bool in OR
...
MSVC error C4805: '|' : unsafe mix of type 'bool' and type 'unsigned int' in operation
modified: p_lx_elf.cpp
2018-01-06 09:20:46 -08:00
John Reiser
161a58bafb
work in progress for --android-shlib
...
modified: p_elf_enum.h
modified: p_lx_elf.cpp
2018-01-06 09:18:17 -08:00
John Reiser
f5fd94e815
Android shlib: work in progress
...
modified: p_lx_elf.cpp
modified: p_lx_elf.h
2017-12-31 22:40:57 -08:00
John Reiser
edde6210f1
amd64 linux stack align
...
forgotten as part of 4a35bf32ea
modified: stub/src/amd64-linux.elf-fold.S
modified: stub/amd64-linux.elf-fold.h
modified: stub/tmp/amd64-linux.elf-fold.map
modified: ../.github/travis_testsuite_1.sh
2017-12-31 10:36:14 -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
4a35bf32ea
static uClibc on amd64 passes entry.%rdx to 'atexit'
...
https://github.com/upx/upx/issues/166
modified: ../.github/travis_testsuite_1.sh
modified: stub/src/amd64-linux.elf-entry.S
modified: stub/src/amd64-linux.elf-fold.S
modified: stub/src/amd64-linux.elf-main.c
2017-12-30 17:20:01 -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
c384d224c0
Mach-o stubs turn off DEBUG
...
Branch jreiser-macho has DEBUG 1
modified: stub/src/amd64-darwin.macho-main.c
modified: stub/src/arm.v5a-darwin.macho-entry.S
modified: stub/src/arm.v5a-darwin.macho-fold.S
modified: stub/src/arm64-darwin.macho-entry.S
modified: stub/src/arm64-darwin.macho-fold.S
2017-12-27 10:23:19 -08:00
John Reiser
35427f998e
Mach-o stubs turn off SIMULATE_ON_LINUX_EABI4
...
modified: stub/src/amd64-darwin.macho-main.c
modified: stub/src/arm.v5a-darwin.macho-entry.S
modified: stub/src/arm.v5a-darwin.macho-fold.S
modified: stub/src/arm64-darwin.macho-entry.S
modified: stub/src/arm64-darwin.macho-fold.S
2017-12-27 09:12:38 -08:00
John Reiser
1174da2bc3
arm64 stubs use NBPW in TRACE etc
...
modified: stub/src/arm64-darwin.macho-entry.S
modified: stub/src/arm64-darwin.macho-fold.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
2017-12-26 16:39:51 -08:00
John Reiser
11e8a47030
DEBUG and TRACE for arm*-darwin.macho-* stubs
...
modified: stub/src/amd64-darwin.macho-main.c
modified: stub/src/arm.v5a-darwin.macho-entry.S
modified: stub/src/arm.v5a-darwin.macho-fold.S
modified: stub/src/arm64-darwin.macho-entry.S
modified: stub/src/arm64-darwin.macho-fold.S
2017-12-26 15:44:54 -08:00
John Reiser
8c4e9bcf0d
typo
...
modified: stub/src/arm.v4a-linux.elf-entry.S
2017-12-26 15:43:58 -08:00
John Reiser
9dfd624901
fix TRACE macro
...
modified: stub/src/arm64-linux.elf-entry.S
modified: stub/src/arm64-linux.elf-fold.S
2017-12-26 15:43:01 -08:00
John Reiser
79e65503a9
Merge branch 'devel' into jreiser-macho
2017-12-26 10:41:26 -08:00
John Reiser
59f18b9d9f
stash work-in-progress
...
modified: stub/src/amd64-darwin.macho-main.c
modified: stub/src/arm.v5a-darwin.macho-entry.S
modified: stub/src/arm.v5a-darwin.macho-fold.S
modified: stub/src/arm64-darwin.macho-entry.S
modified: stub/src/arm64-darwin.macho-fold.S
2017-12-22 23:07:03 -08:00
John Reiser
fb3699fb89
stash work-in-progress
...
modified: stub/src/amd64-darwin.macho-main.c
modified: stub/src/amd64-darwin.macho-upxmain.c
modified: stub/src/arm.v5a-darwin.macho-entry.S
modified: stub/src/arm.v5a-darwin.macho-fold.S
modified: stub/src/arm.v5a-darwin.macho-main.c
modified: stub/src/arm64-darwin.macho-entry.S
modified: stub/src/arm64-darwin.macho-fold.S
modified: stub/src/i386-darwin.macho-upxmain.c
2017-12-22 10:20:32 -08:00
John Reiser
9d2d59b5d2
stash work-in-progress
...
modified: stub/src/amd64-darwin.macho-main.c
modified: stub/src/arm64-darwin.macho-fold.S
2017-12-19 21:19:53 -08:00