John Reiser
e7ca5c54ff
Fix --brute for p_lx_elf.cpp, which compresses multiple pieces
...
Force all pieces to use the same de-compressor.
(Future: allow each PT_LOAD to choose its own.)
Has minor wobbles due to page alignment, and size of de-compressor.
64-bit only for now.
https://github.com/upx/upx/issues/570
https://github.com/upx/upx/issues/297
modified: p_lx_elf.cpp
modified: p_unix.cpp
modified: packer.cpp
modified: packer.h
2022-03-22 11:46:25 -07:00
John Reiser
663d6b466b
WIP: clarify compressWithFilters; reduce size of obuf for PackLinuxElf64
...
modified: p_lx_elf.cpp
modified: packer.cpp
modified: packer.h
2022-03-21 13:49:46 -07:00
John Reiser
34df0d6ef1
More empty HASH and/or GNU_HASH when Rust-musl
...
https://github.com/upx/upx/issues/568
modified: p_lx_elf.cpp
2022-03-12 14:21:51 -08:00
John Reiser
e5aeea9ed2
Check more carefully in invert_pt_dynamic()
...
https://github.com/upx/upx/issues/566
modified: p_lx_elf.cpp
2022-02-28 07:55:49 -08:00
John Reiser
5bcf9dd8af
Do not complain for minimal DT_GNU_HASH as by Rust.
...
Also: .p_type is 32 bits only!
https://github.com/upx/upx/issues/525
modified: p_lx_elf.cpp
2021-12-25 12:39:31 -08:00
John Reiser
284adb203f
Better checking of DT_HASH.nbuckets
...
https://github.com/upx/upx/issues/507
modified: p_lx_elf.cpp
2021-12-24 15:52:16 -08:00
John Reiser
adafa841f7
Some PT_LOAD must have (p_flags & PF_X)
...
https://github.com/upx/upx/issues/511
modified: p_lx_elf.cpp
2021-12-24 15:32:19 -08:00
John Reiser
fdc5d25d03
Require DT_STRSZ
...
https://github.com/upx/upx/issues/512
modified: p_lx_elf.cpp
2021-12-24 15:08:22 -08:00
John Reiser
bd441e83ae
WIP: de-compression of old-style shlib
...
modified: p_lx_elf.cpp
2021-09-06 08:43:20 -07:00
John Reiser
c9f6a3583c
WIP 64-bit shlib
...
modified: p_lx_elf.cpp
2021-08-07 06:45:01 -07:00
John Reiser
076aaf829a
WIP: Elf64 shlib compress+decompress seems to work
...
modified: p_lx_elf.cpp
modified: p_lx_elf.h
modified: p_unix.cpp
2021-07-05 13:47:19 -07:00
John Reiser
85f0c5a445
WIP: Elf64 shlib cleanup
...
modified: file.cpp
modified: file.h
modified: p_elf_enum.h
modified: p_lx_elf.cpp
modified: p_lx_elf.h
2021-07-02 18:33:38 -07:00
John Reiser
d5263a56ce
WIP: handling shared library
...
modified: p_lx_elf.cpp
modified: p_unix.cpp
modified: p_unix.h
2021-05-22 16:03:53 -07:00
John Reiser
181c752488
WIP: un_shlib_1
...
modified: p_lx_elf.cpp
modified: p_lx_elf.h
2021-05-08 11:14:31 -07:00
John Reiser
333a288248
shlib: Don't compress below xct_off (except Elf headers)
...
modified: p_lx_elf.cpp
2021-04-11 15:16:34 -07:00
John Reiser
613df414ed
Fix off-by-1 in invert_pt_dynamic; SHT_NOBITS occupies no space
...
modified: p_lx_elf.cpp
2021-04-11 15:09:55 -07:00
John Reiser
be050693f2
PackLinuxElf::canUnpack must checkEhdr() for ELF input
...
https://github.com/upx/upx/issues/485
modified: p_lx_elf.cpp
2021-04-10 10:11:48 -07:00
John Reiser
78f48d65d5
Allow 0==nbucket for DT_HASH, DT_GNU_HASH
...
static linked 'Rust' program with no symbols
https://github.com/upx/upx/issues/476
2021-03-25 07:22:01 -07:00
John Reiser
b81ec224b7
Fix headway argument to invert_pt_dynamic()
...
https://github.com/upx/upx/issues/473
modified: p_lx_elf.cpp
2021-03-25 07:10:40 -07:00
John Reiser
4be6cfebcd
get_te32() when checking DT_GNU_HASH chains (MIPS .so)
...
https://github.com/upx/upx/issues/473
modified: p_lx_elf.cpp
2021-03-23 18:21:45 -07:00
John Reiser
98973dd8b9
get_te32() when checking DT_HASH chains (MIPS .so)
...
https://github.com/upx/upx/issues/473
modified: p_lx_elf.cpp
2021-03-23 06:45:01 -07:00
John Reiser
1218b6ff2a
Check more in invert_pt_dynamic
...
https://github.com/upx/upx/issues/471
modified: p_lx_elf.cpp
2021-03-16 18:46:11 -07:00
John Reiser
0a69e7803b
Fix errors detected by "make run-testsuite".
...
total_out does not matter when option -t writes no output file.
Subtle error in generateElfHdr() [noted by address sanitizer].
New member function is_LOAD32() to avoid confusion with (1+ LO_PROC).
modified: p_lx_elf.cpp
modified: p_lx_elf.h
2021-03-06 15:31:56 -08:00
John Reiser
0a1d24d1d9
Remove nit from PackLinuxElf64::generateElfHdr [address sanitizer]
...
modified: p_lx_elf.cpp
2021-03-05 16:33:25 -08:00
John Reiser
35555bfb8a
WIP: PackLinuxElf64::unpack working for shared libraries (non-Android)
...
modified: p_lx_elf.cpp
modified: p_lx_elf.h
modified: p_unix.cpp
2021-03-05 16:20:36 -08:00
John Reiser
c9cb42df40
WIP: hacking un_shlib_1
...
modified: p_lx_elf.cpp
2021-02-28 17:12:20 -08:00
John Reiser
2be03028f4
WIP: un_shlib_1
...
modified: p_lx_elf.cpp
modified: p_lx_elf.h
2021-02-27 19:27:12 -08:00
John Reiser
182e0796df
Split PackLinuxElf64::unpack for main program vs shared library
...
modified: p_lx_elf.cpp
2021-02-22 16:15:03 -08:00
John Reiser
fb844a8ed1
total_in, total_out move to PackUnix
...
modified: p_lx_elf.cpp
modified: p_lx_elf.h
modified: p_lx_interp.cpp
modified: p_mach.cpp
modified: p_unix.cpp
modified: p_unix.h
2021-02-22 16:13:40 -08:00
John Reiser
23f63e4196
WIP unpacking ELF shared library
...
modified: Makefile
modified: lzma-sdk
modified: p_lx_elf.cpp
modified: p_lx_elf.h
modified: p_mach.cpp
modified: p_unix.cpp
modified: p_unix.h
modified: packer.cpp
modified: packer.h
modified: stub/arm64-linux.elf-fold.h
modified: stub/src/arm64-linux.elf-fold.S
modified: stub/tmp/arm64-linux.elf-fold.map
2021-01-15 14:11:09 -08:00
Markus F.X.J. Oberhumer
9131d5216f
Welcome 2021.
2021-01-01 20:39:22 +01:00
John Reiser
13bc031163
Check DT_REL/DT_RELA, DT_RELSZ/DT_RELASZ
...
https://github.com/upx/upx/issues/421
modified: p_lx_elf.cpp
2020-12-11 13:38:18 -08:00
Markus F.X.J. Oberhumer
f7e2266c3f
Start using some C++ 14 features.
2020-12-08 05:40:17 +01:00
John Reiser
7841e15583
Prefer MemBuffer instead of New()+delete
...
https://github.com/upx/upx/issues/428
modified: p_lx_elf.cpp
modified: p_lx_elf.h
2020-12-05 10:31:55 -08:00
Markus F.X.J. Oberhumer
94e72238f2
Fix some warnings.
2020-12-03 03:10:12 +01:00
John Reiser
e6ccef2cf1
MSVC strikes again
...
modified: p_lx_elf.cpp
2020-09-05 19:19:11 -07:00
John Reiser
be61e9f584
Fix 64-bit ET_EXEC
...
https://github.com/upx/upx/issues/405
modified: p_lx_elf.cpp
modified: stub/src/amd64-linux.elf-main.c
modified: ../.github/travis_testsuite_1-expected_sha256sums.sh
modified: stub/amd64-linux.elf-fold.h
modified: stub/arm64-linux.elf-fold.h
modified: stub/powerpc64-linux.elf-fold.h
modified: stub/powerpc64le-linux.elf-fold.h
modified: stub/tmp/amd64-linux.elf-fold.map
modified: stub/tmp/arm64-linux.elf-fold.map
modified: stub/tmp/powerpc64-linux.elf-fold.map
modified: stub/tmp/powerpc64le-linux.elf-fold.map
2020-09-04 10:21:14 -07:00
John Reiser
c1a55b063e
0==e_shnum obviates testing of e_shoff
...
modified: p_lx_elf.cpp
2020-07-26 20:00:05 -07:00
John Reiser
77c914bce5
Check de-compressed SHT_SYMTAB
...
https://github.com/upx/upx/issues/396
modified: p_lx_elf.cpp
2020-07-25 09:28:02 -07:00
John Reiser
cc60f03b2e
Check Shdr more
...
https://github.com/upx/upx/issues/395
modified: p_lx_elf.cpp
2020-07-25 08:19:45 -07:00
John Reiser
cc9ccdbbd1
Check .sh_offset and .sh_size in SHT_DYNAMIC and SHT_STRNDX
...
https://github.com/upx/upx/issues/394
modified: p_lx_elf.cpp
2020-07-25 07:41:43 -07:00
John Reiser
9dfc8f573c
Avoid 0==nbucket
...
https://github.com/upx/upx/issues/393
modified: p_lx_elf.cpp
2020-07-23 05:44:18 -07:00
John Reiser
4e2fdb464a
Defend against bad PT_DYNAMIC
...
https://github.com/upx/upx/issues/391
modified: p_lx_elf.cpp
modified: p_lx_elf.h
2020-07-23 05:09:52 -07:00
John Reiser
73b854874e
Defend against junk PT_DYNAMIC
...
https://github.com/upx/upx/issues/390
modified: p_lx_elf.cpp
2020-07-23 04:14:34 -07:00
John Reiser
0016512df1
Unpack: Phdrs must be within expansion of first compressed block
...
https://github.com/upx/upx/issues/388
modified: p_lx_elf.cpp
2020-07-22 19:34:27 -07:00
John Reiser
527139978a
DT_HASH chains might be trimmed (64-bit, too)
...
https://github.com/upx/upx/issues/383
modified: p_lx_elf.cpp
2020-06-08 12:37:53 -07:00
John Reiser
47bc68fa6b
DT_HASH chains might be trimmed
...
https://github.com/upx/upx/issues/383
modified: p_lx_elf.cpp
2020-06-07 19:35:49 -07:00
John Reiser
963392a5ae
De-compress (upx -d) for ELF pageholes
...
modified: p_lx_elf.cpp
2020-05-30 13:54:11 -07:00
John Reiser
a817ed0692
uintptr_t for MSVC
...
modified: p_lx_elf.cpp
2020-05-23 11:02:46 -07:00
John Reiser
828a6cf07b
invert_pt_dynamic() more checking
...
https://github.com/upx/upx/issues/378
https://github.com/upx/upx/issues/379
modified: p_lx_elf.cpp
2020-05-23 10:51:03 -07:00