[Toybox] sstrip/elftrunc
Frank Bergmann
toybox at tuxad.com
Thu Feb 9 01:50:13 PST 2012
Hi.
On Wed, Feb 08, 2012 at 07:53:44PM -0600, Rob Landley wrote:
> semi-universal container format it's not what macosx uses and lots of
If it's not elf then it does nothing. :-)
> Hmmm, elftrunc doesn't seem to have a web page butsstrip does. (Hey,
> muppet labs! The teensy elf page is a classic. Ok, that's worth a look...)
*lol*
Yeah, muppet labs, a good starting point to get deep knowledge.
A few years ago I searched for the origin of sstrip. IMHO the original
author didn't maintain it any more and the last changes were done in
upx-2.02. See
http://www.tuxad.com/sstrip.html
In my projects I have local copies of it and it is build and used from
within my makefiles.
Important is a small patch:
- ESET(ehdr->e_shentsize,0); \
+ ESET(ehdr->e_shentsize,sizeof(Elf ## CLASS ## _Shdr)); \
If you set e_shentsize to zero you'll got a "corrupted section header size"
message when using "file" on a sstripped binary.
Frank
--
EDV Frank Bergmann Tel. 05221-9249753
LPIC-3 Linux Professional Fax 05221-9249754
Pödinghauser Str. 5 email iservice at tuxad.com
32051 Herford USt-IdNr DE237314606
1328781013.0
More information about the Toybox
mailing list