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

46 Commits

Author SHA1 Message Date
Markus F.X.J. Oberhumer
d001a63bce Welcome 2022. 2022-09-04 04:24:39 +02:00
John Reiser
03436d2415 Bug in handling DT_GNU_HASH table.
Fix includes a more-general and stronger heuristic to find the end of
GNU_HASH table when there is no ElfXX_Shdr for it.  64-bit only for now.
(This is needed to help prevent SIGSEGV when processing tampered .exe.)

https://github.com/upx/upx/issues/577
	modified:   p_elf_enum.h
	modified:   p_lx_elf.cpp
	modified:   p_lx_elf.h
2022-05-30 14:24:21 -07:00
John Reiser
660aee6d22 More checking for unpack of tampered Elf_Phdr
https://github.com/upx/upx/issues/562
	modified:   p_elf_enum.h
	modified:   p_lx_elf.cpp
2022-02-25 09:23:55 -08: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
Markus F.X.J. Oberhumer
9131d5216f Welcome 2021. 2021-01-01 20:39:22 +01:00
Markus F.X.J. Oberhumer
d1174385ef Welcome 2020. 2020-01-08 04:13:28 +01:00
John Reiser
cb5f590e10 More hacking Android shlib.
https://github.com/upx/upx/issues/318
	modified:   p_elf_enum.h
	modified:   p_lx_elf.cpp
2019-12-12 20:23:33 -08:00
John Reiser
b8f52d14f4 user_init_va on AARCH64
https://github.com/upx/upx/issues/318  (work-in-progress)
	modified:   p_elf_enum.h
	modified:   p_lx_elf.cpp
2019-12-04 14:26:46 -08:00
Markus F.X.J. Oberhumer
3667fa4e44 Welcome 2019. 2019-02-15 11:04:09 +01:00
John Reiser
606ad08dd1 Check symbol number and .st_name
https://github.com/upx/upx/issues/235  POC1,POC3,POC7,POC9
	modified:   p_elf_enum.h
	modified:   p_lx_elf.h
	modified:   p_lx_elf.cpp
2018-12-14 21:32:49 -08:00
John Reiser
95cedb6640 upgrade ::unpack for --android-shlib
modified:   p_elf_enum.h
    	modified:   p_lx_elf.cpp
    	modified:   p_lx_elf.h
    	modified:   stub/src/arm64-linux.shlib-init.S
    	modified:   stub/src/arm.v4t-linux.shlib-init.S
2018-02-02 14:50:56 -08:00
Markus F.X.J. Oberhumer
05e44b9644 Fix powerpc64 cross build. 2018-01-19 15:05:43 +01:00
Markus F.X.J. Oberhumer
021c8db58a Welcome 2018. 2018-01-19 10:55:32 +01: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
f4947cc2ae Work-around Ubuntu runtime bug loading shlib on ARM.
Use --android-shlib to activate the work-around.
https://bugs.launchpad.net/bugs/1712938
https://github.com/upx/upx/issues/116
	modified:   p_elf_enum.h
	modified:   p_lx_elf.cpp
2017-08-24 19:52:30 -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
6e541a432f amd64-linux: DF_1_PIE marks a main program; stub juggles AT_PHDR for same
https://github.com/upx/upx/issues/105
	modified:   p_elf_enum.h
	modified:   p_lx_elf.cpp
	modified:   stub/src/amd64-linux.elf-main.c

	modified:   ../.github/travis_testsuite_1.sh
	modified:   stub/amd64-linux.elf-fold.h
	modified:   stub/tmp/amd64-linux.elf-fold.map
2017-05-27 19:54:12 -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
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
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
John Reiser
d688a05ac7 DT_JMPREL vanished (binutils-2.26.1); check all DT_RELA.
modified:   p_elf_enum.h
	modified:   p_lx_elf.cpp
2016-10-09 21:50:45 -07:00
Markus F.X.J. Oberhumer
f7554374ab Update email address. 2016-09-28 12:25:01 +02:00
Markus F.X.J. Oberhumer
83828aa8a3 Update vim modelines. 2016-09-22 17:29:43 +02:00
Markus F.X.J. Oberhumer
96d9968db5 Welcome 2016. 2016-09-22 14:07:14 +02: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
Markus F.X.J. Oberhumer
87a368a857 Welcome 2013. 2013-02-12 10:14:03 +01:00
Markus F.X.J. Oberhumer
43ce34d547 Welcome 2012. 2012-01-01 22:35:11 +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
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
Markus F.X.J. Oberhumer
6bc3197721 Enter 2010. 2010-02-06 17:15:49 +01:00
John Reiser
90ddc06c98 DT_INIT, DT_CHECKSUM, DT_VERSYM, DT_VERDEF, DT_VERNEEDED 2009-10-14 17:50:35 -07:00
John Reiser
e0c11956a6 ElfXX_Rel, ElfXX_Rela 2009-10-10 14:41:01 -07:00
Markus F.X.J. Oberhumer
5ed689ceb0 Enter 2009. 2008-12-31 17:07:18 +01:00
Markus F.X.J. Oberhumer
6ff1bd5917 Update my email address. 2008-01-02 10:12:42 +01:00
Markus F.X.J. Oberhumer
fa49dbe2cb Enter 2008. 2008-01-02 09:42:31 +01:00
Markus F.X.J. Oberhumer
1cb1427050 Detabify. 2007-12-17 06:00:33 +01:00
John Reiser
4957faf482 DT_GNU_HASH, DT_JMPREL, etc. 2007-11-12 08:54:02 -08:00
John Reiser
573009eeb6 new format UPX_F_LINUX_ELF32_MIPSEL [work in progress] 2007-05-06 06:17:49 -07:00
Markus F.X.J. Oberhumer
398fd8028c Spelling fixes. 2007-03-04 17:39:21 +01:00
Markus F.X.J. Oberhumer
5e83596a1b Enter 2007. 2007-01-14 13:08:58 +01:00
Markus F.X.J. Oberhumer
6361213e07 More portability fixes. 2007-01-14 12:47:38 +01:00
Markus F.X.J. Oberhumer
c04737ce20 Cosmetic cleanup. 2006-12-31 15:51:17 +01:00
Markus F.X.J. Oberhumer
cc0b7d1492 Use the preprocessor to make sure that the ELF types are PODs. 2006-12-19 14:43:14 +01:00