Paste: "make tiny" instructions
Author: | ceninan |
Mode: | factor |
Date: | Tue, 24 Aug 2010 22:21:09 |
Plain Text |
sstrip from http://www.muppetlabs.com/~breadbox/software/elfkickers.html brings the exe down some more after a normal strip; needs the following changes to compile on linux.x86_32:
////////////////////////////////////
/* This header no longer exists, provide definitions below */
/* #include <asm/elf.h> */
#define ELF_CLASS ELFCLASS32
#define ELF_DATA ELFDATA2LSB
#define ELF_ARCH EM_386
/* </asm/elf.h>
////////////////////////////////////
Then put the following in your to-be (empty) executable file ("myexe"):
a=/tmp/I;tail -n+2 $0|zcat>$a;chmod +x $a;$a;rm $a;exit
Then run:
gzip -cn9 a.out >> myexe
chmod +x myexe
New Annotation