Commit Graph

105 Commits

Author SHA1 Message Date
John Reiser
fa702b48e3 unify PackLinuxElf32arm...::pack1() 2006-06-15 15:41:00 -07:00
John Reiser
299dcf6686 Merge 2006-06-15 12:21:01 -07:00
Markus F.X.J. Oberhumer
d3323d6550 Major refactoring of src/stub directory. 2006-06-15 08:17:50 +02:00
John Reiser
ebed0b9f20 allow brev() in-place 2006-06-14 20:21:39 -07:00
John Reiser
f654a453dc ARM_pack3() unifies big/little endian and HostPolicy 2006-06-14 16:06:50 -07:00
John Reiser
10decf94cc fix delete[] file_image 2006-06-14 11:41:49 -07:00
John Reiser
96dd4817f1 unify PackLinuxElf32...::canPack(); also ARM buildLinuxLoader() 2006-06-14 11:33:16 -07:00
Markus F.X.J. Oberhumer
7daf63fd3f Merge. 2006-06-14 11:48:44 +02:00
John Reiser
4fc0a32572 Do not brev() strings in stub for PackLinuxEl32armBe. 2006-06-13 18:55:26 -07:00
John Reiser
dcc704a357 debug PackLinuxElf32armBe. Also unify subroutines. 2006-06-13 15:51:29 -07:00
John Reiser
bd8acbde97 PackLinuxElf32armBe (Linux ARM big-endian) 2006-06-13 11:48:54 -07:00
John Reiser
112b10c19d avoid randomness for progid in Elf 2006-06-13 08:53:41 -07:00
John Reiser
d89e561a85 PackLinuxElf32armLe, PackLinuxElf32armBe 2006-06-13 08:51:02 -07:00
John Reiser
49c1da79c8 PackLinuxElf32arm ==> PackLinuxElf32armLe 2006-06-13 08:27:14 -07:00
Markus F.X.J. Oberhumer
d8748f4270 Introduced MemBuffer::getSizeForCompression(). 2006-06-12 13:18:55 +02:00
Markus F.X.J. Oberhumer
c34daf1a35 Make code -Wshadow warning free. 2006-06-11 12:25:19 +02:00
Markus F.X.J. Oberhumer
d461b53235 Renamed variable clen to c_len and ulen to u_len. 2006-06-11 12:13:37 +02:00
Markus F.X.J. Oberhumer
f1ba0c0aa7 More lzma stuff. 2006-06-09 18:36:53 +02:00
Markus F.X.J. Oberhumer
34ae413607 Initial lzma support. 2006-06-07 04:42:15 +02:00
John Reiser
1f18050930 elf32arm escape hatch: avoid Elf32_Ehdr if possible 2006-06-02 08:51:02 -07:00
John Reiser
17ecfc9765 new class PackLinuxElf32arm : PackLinuxElf32Le;
Unify some functions in leaf classes by moving to parent class.
2006-06-01 06:37:44 -07:00
John Reiser
504deeff42 ET_DYN cannot be old format for decompression 2006-05-24 13:15:39 -07:00
John Reiser
51536a7acd decompression PackLinuxElf32x86.ET_DYN 2006-05-23 17:42:35 -07:00
John Reiser
d2718e99a4 Change class PackLinuxI386elf : public PackLinuxI386
into   class PackLinuxElf32x86 : public PackLinuxElf32Le : public PackLinuxElf32
which makes the code for compressing ELF (for direct-to-memory decompression)
cleaner because ELF has some of the class tree to itself.
This assumes PROT_EXEC|PROT_WRITE ought to work.
This is checked at runtime, and if it fails then
give a message on stderr and exit(127).

Modify --force-execve so that runtime avoids PROT_EXEC|PROT_WRITE.
Then executables compressed with --force-execve will run under
PaX, grSecurity, and strict SELinux.
2006-05-21 13:58:24 -07:00
László Molnár
0ca8ae17d4 updated my email address 2006-05-17 21:05:46 +02:00
John Reiser
b739bd3d79 Work better with SELinux. We still require allow_execmem.
p_lx_elf.cpp
	stub/fold_elfppc32.h
	stub/l_lx_elfppc32.h
	stub/l_lx_elfppc32.S
	stub/m_lx_elfppc32.c

committer: jreiser <jreiser> 1145666524 +0000
2006-04-22 00:42:04 +00:00
John Reiser
c264750924 Adapt better to SELinux. We still need allow_execmem.
p_lx_elf.cpp
	stub/a_lx_elf64.c
	stub/l_lx_elf64amd.h
	stub/l_lx_elf64amd.lds
	stub/l_lx_elf64amd.S
	stub/fold_elf64amd.h

committer: jreiser <jreiser> 1145657332 +0000
2006-04-21 22:08:52 +00:00
John Reiser
fb1181ed26 Allow executables >=3MB on elf64amd; -r1.69 on 2005-11-12 forgot to remove check.
committer: jreiser <jreiser> 1145139994 +0000
2006-04-15 22:26:34 +00:00
Markus F.X.J. Oberhumer
90b1817e92 Undef PAGE_{MASK,SIZE} in conf.h.
committer: mfx <mfx> 1143454717 +0000
2006-03-27 10:18:37 +00:00
John Reiser
f95e171e11 Workaround linux-2.6.14 binfmt_elf.c: SIGKILL if (0==.p_memsz) on a page boundary.
p_lx_elf.cpp p_lx_exc.cpp

committer: jreiser <jreiser> 1143057770 +0000
2006-03-22 20:02:50 +00:00
Markus F.X.J. Oberhumer
1810440355 Added __attribute__((__sentinel__)) to Packer::addLoader(). This is
a new gcc-4.1 feature.

committer: mfx <mfx> 1142035833 +0000
2006-03-11 00:10:33 +00:00
John Reiser
366a708f3a Generalize to more than 2 PT_LOAD using find_LOAD_gap; needed for linux/ElfAMD.
Also simplifies, and applies to both ::pack and ::unpack.
	p_lx_elf.cpp p_lx_elf.h

committer: jreiser <jreiser> 1141348876 +0000
2006-03-03 01:21:16 +00:00
John Reiser
b389abd99f PackLinuxElf64amd::getCompressionMethods allows both nrv2b and nrv2e
committer: jreiser <jreiser> 1141326792 +0000
2006-03-02 19:13:12 +00:00
John Reiser
268e322e1c Extra parameter for compressWithFilters and packExtent,
to fix 2-pass problem with --brute on linux/elf386.
Only one decompression method is allowed, chosen by
smallest output for .text; but Elf headers come first.
	packer.cpp packer.h p_unix.cpp p_unix.h p_lx_elf.cpp

committer: jreiser <jreiser> 1140241030 +0000
2006-02-18 05:37:10 +00:00
Markus F.X.J. Oberhumer
8b7ebcf040 Enter 2006.
committer: mfx <mfx> 1139778883 +0000
2006-02-12 21:14:43 +00:00
Markus F.X.J. Oberhumer
51ac5172f5 #undef PAGE_{MASK,SIZE} to fix build problems on some machines.
committer: mfx <mfx> 1139743226 +0000
2006-02-12 11:20:26 +00:00
John Reiser
ce33ffb62a handle compressed executables larger than 3MB on Elf64amd
committer: jreiser <jreiser> 1131833508 +0000
2005-11-12 22:11:48 +00:00
John Reiser
75bba319de tuning, and prepare for large executables (>3MB compressed)
p_lx_elf.cpp stub/a_lx_elf64.c stub/amd_d_nrv2e.S
	stub/fold_elf64amd.S stub/l_lx_elf64amd.S

committer: jreiser <jreiser> 1131824655 +0000
2005-11-12 19:44:15 +00:00
John Reiser
f78e9261f3 Do initLoader() properly, instead of relying on the amount of stack space
that is in use when ::buildLinuxLoader is called.

committer: jreiser <jreiser> 1131597922 +0000
2005-11-10 04:45:22 +00:00
John Reiser
6737a3ae09 PackLinuxElf64amd
p_lx_elf.h p_lx_elf.cpp packmast.cpp

committer: jreiser <jreiser> 1131570778 +0000
2005-11-09 21:12:58 +00:00
John Reiser
0c328372b5 Allow __uClibc_main and __uClibc_start_main like __libc_start_main.
committer: jreiser <jreiser> 1127269046 +0000
2005-09-21 02:17:26 +00:00
John Reiser
3f7b642c7d Linux i386 allow compression of position-independent main executables (gcc -pie).
p_elf.h p_lx_elf.cpp p_lx_elf.h p_lx_exc.cpp
	stub/fold_elf86.asm stub/fold_elf86.h stub/l_lx_elf.c
	stub/l_lx_elf86.asm stub/l_lx_elf86.h stub/l_lx_elf86.lds
	stub/linux.hh

committer: jreiser <jreiser> 1126886896 +0000
2005-09-16 16:08:16 +00:00
Markus F.X.J. Oberhumer
6b7c7f755c Avoid warnings about unused vars.
committer: mfx <mfx> 1119613814 +0000
2005-06-24 11:50:14 +00:00
John Reiser
d339ee3135 PackLinuxElf32::unpack forgot several get_native32()
committer: jreiser <jreiser> 1114229735 +0000
2005-04-23 04:15:35 +00:00
John Reiser
14b0527e79 fix compiler waring
committer: jreiser <jreiser> 1108941316 +0000
2005-02-20 23:15:16 +00:00
John Reiser
664a82e7c9 Start re-organizing the packing of Elf, by making Elf32 come first,
with Big endian and Little endian derived from it.
I386 still uses the old way, but PowerPC (both Linux and Darwin [Mac])
use the new way.
	p_elf.h p_lx_elf.cpp p_lx_elf.h p_lx_exc.cpp p_lx_exc.h
	p_unix.cpp p_unix.h p_vmlinx.cpp p_vmlinx.h p_vmlinz.cpp

committer: jreiser <jreiser> 1108940224 +0000
2005-02-20 22:57:04 +00:00
Markus F.X.J. Oberhumer
18ef55ac14 Final updates for upx-1.91.
committer: mfx <mfx> 1088566877 +0000
2004-06-30 03:41:17 +00:00
John Reiser
1555be40b7 fix alignment of loader after packing multiple blocks
p_lx_elf.h p_lx_elf.cpp

committer: jreiser <jreiser> 1080880623 +0000
2004-04-02 04:37:03 +00:00
Markus F.X.J. Oberhumer
5f87e9891b Enter 2004.
committer: mfx <mfx> 1074623868 +0000
2004-01-20 18:37:48 +00:00
Markus F.X.J. Oberhumer
97153e8e09 Compile fixes for PGI C++.
committer: mfx <mfx> 1071917829 +0000
2003-12-20 10:57:09 +00:00