Commit Graph

3421 Commits

Author SHA1 Message Date
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
214dd0a522 4 fewer bytes of code?
modified:   arm64-linux.elf-fold.h
	modified:   tmp/arm64-linux.elf-fold.map
2021-02-23 02:24:24 -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
6be3e747ca Remove unrelated debugging
modified:   stub/src/arm64-linux.elf-fold.S
2021-02-15 11:40:04 -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
John Reiser
fd6837b267 Another checkAlreadyPacked()
https://github.com/upx/upx/issues/463
	modified:   Makefile
	modified:   p_mach.cpp
2021-02-26 15:15:28 -08:00
John Reiser
1c29f921e0 getSizeForCompression worst cases
https://github.com/upx/upx/issues/463
	modified:   Makefile
	modified:   mem.cpp
2021-02-25 20:04:16 -08:00
John Reiser
1ab6e01de2 MacOS BigSur wants no MH_DYLDLINK for our MH_EXECUTE
https://github.com/upx/upx/issues/434
	modified:   p_mach.cpp
2021-02-14 13:23:19 -08:00
Markus F.X.J. Oberhumer
801618740c CI: fix current Ubuntu problem. 2021-02-01 13:06:49 +01:00
John Reiser
2469563b26 Mach_ARM64_thread_state padded to (0 mod 8)
https://github.com/upx/upx/issues/446  (partial)
	modified:   p_mach.cpp
	modified:   p_mach.h
	modified:   p_mach_enum.h
2021-01-30 16:11:32 -08:00
John Reiser
00139caf43 More robust PackWcle::decodeFixups()
https://github.com/upx/upx/issues/455
	modified:   p_wcle.cpp
2021-01-23 15:37:52 -08:00
John Reiser
21d102c84f Better checking of Mach_header.ncmds, .sizeofcmds
Improves earlier fix.
https://github.com/upx/upx/issues/447
	modified:   p_mach.cpp
2021-01-23 13:52:54 -08:00
John Reiser
f17d9967c2 Clarify comment in previous commit
modified:   main.cpp
2021-01-20 05:54:53 -08:00
Liam Murphy
0569ef37ba add comment explaining code as per PR review 2021-01-20 02:29:08 +00:00
Liam Murphy
984334c9a1 reset done_output_name counter upx_main() 2021-01-18 00:16:49 +00:00
John Reiser
34a25e61c7 "%zx" for ptrdiff_t in hex printf
modified:   p_wcle.cpp
2021-01-17 19:36:36 -08:00
John Reiser
ed3f45953e Try not to run off the end of selfrel_fixups.
https://github.com/upx/upx/issues/455
	modified:   p_wcle.cpp
	modified:   packer.cpp
2021-01-17 19:21:32 -08:00
John Reiser
80de11bc5b Detect Mach_header.sizeofcmds==0
https://github.com/upx/upx/issues/448
	modified:   p_mach.cpp
2021-01-17 17:09:35 -08:00
Darío Hereñú
c9fe84c9aa Typo fixed (line 61) 2021-01-09 14:04:47 -03:00
John Reiser
5f98bb0ab0 De-compress allows old-style LC_UNIXTHREAD with one LC_SEGMENT
https://github.com/upx/upx/issues/447
	modified:   p_mach.cpp
2021-01-15 15:03:26 -08:00
Markus F.X.J. Oberhumer
d86d5314ba Modernize libc usage: more cleanups. 2021-01-05 22:03:29 +01:00
Markus F.X.J. Oberhumer
700c8730cf Modernize libc usage: stop using off_t, use modern printf.
C++ 14 is here, and old versions of MSVC and MSVCRT have
haunted us long enough.
2021-01-05 18:52:05 +01:00
Markus F.X.J. Oberhumer
b4429e1a42 CI: add sanitizer builds. 2021-01-04 22:03:23 +01:00
Markus F.X.J. Oberhumer
a8fa3ca5cf Use correct native types with "alignas(1)". 2021-01-04 21:13:49 +01:00
Markus F.X.J. Oberhumer
9aef7b0d6f Use C++ 14 alignas(), init some struct fields just because of good practice. 2021-01-04 21:02:07 +01:00
Markus F.X.J. Oberhumer
2575eef3c0 clang-format more files.
"Gofmt's style is nobody's favourite, but gofmt is everybody's favourite."
    - Rob Pike
2021-01-04 20:26:31 +01:00
Markus F.X.J. Oberhumer
8236276a90 Add and use .clang-format file. 2021-01-04 19:07:17 +01:00
Markus F.X.J. Oberhumer
fdc68812c5 clang-format-10.0.1 files. 2021-01-04 17:27:48 +01:00
Markus F.X.J. Oberhumer
9db6d18d11 Now using upx-stubtools 20210104 with new clang-format-10.0.1. 2021-01-04 17:23:57 +01:00
Markus F.X.J. Oberhumer
f962afe146 Various cosmetic updates and refactors. NFCI. 2021-01-04 17:20:57 +01:00
Markus F.X.J. Oberhumer
adcd569852 Makefile: update default sanitizer flags. 2021-01-04 17:20:06 +01:00
Markus F.X.J. Oberhumer
d045b7f223 Update bele.h to better work with modern compilers. 2021-01-02 16:45:58 +01:00
Markus F.X.J. Oberhumer
57cb6a7530 CI: add mingw64 build. 2021-01-02 01:03:24 +01:00
Markus F.X.J. Oberhumer
baa1ed9be3 Update CI to use lastest zlib. Update Makefile. 2021-01-01 23:24:31 +01:00
Markus F.X.J. Oberhumer
16af6e1a29 Update testsuite checksums caused by version bump. 2021-01-01 20:52:07 +01:00
Markus F.X.J. Oberhumer
0af8998be6 Bump version date. 2021-01-01 20:45:11 +01:00
Markus F.X.J. Oberhumer
c32f517fa5 Remove obsolete PROJECTS file. 2021-01-01 20:43:34 +01:00
Markus F.X.J. Oberhumer
9131d5216f Welcome 2021. 2021-01-01 20:39:22 +01:00
Markus F.X.J. Oberhumer
fb14a7991d Fix Makefile breakage in previous commit. 2020-12-15 02:15:34 +01:00
Markus F.X.J. Oberhumer
ff53862dab Extract upx_main() for compilation with -DWITH_GUI. 2020-12-14 22:10:07 +01:00
Markus F.X.J. Oberhumer
49245a20c5 Update Makefile and compiler checks so that users don't inadvertently
change mandatory compiler flags.
2020-12-14 20:53:54 +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
John Reiser
0c18c1c35c Include --lzma as a compression tuning option in --help.
modified:   help.cpp
2020-12-11 12:34:38 -08:00
John Reiser
63dc19ce25 -std=c++14
modified:   Makefile
2020-12-11 11:38:38 -08:00
John Reiser
6871c2fc0a Tweak unoptimizeReloc again
modified:   packer.cpp
2020-12-10 19:56:02 -08:00
Markus F.X.J. Oberhumer
4ae3a8b2b0 Revert useless "fast exit" check from b2c00aa637. 2020-12-08 07:13:11 +01:00