[Toybox] sstrip/elftrunc

Rob Landley rob at landley.net
Wed Feb 8 17:53:44 PST 2012


On 02/08/2012 05:40 AM, Frank Bergmann wrote:
> Hi,
> 
> Rob, if "embedded systems" are also a target of toybox does it make any
> sense using sstrip or elftrunc to reduce the size of the executable?
> 
> $ ls -l toybox_*
> -rwxrwxr-x 1 fwb fwb 46628 Feb  8 12:33 toybox_sstripped
> -rwxrwxr-x 1 fwb fwb 50496 Feb  8 00:00 toybox_stripped
> -rwxrwxr-x 1 fwb fwb 62286 Feb  8 00:00 toybox_unstripped
> 
> Frank

Possibly?  What do those do?

Ideally I'd prefer to do this with objcopy or similar, rather than
requiring some external program.  Also, while elf is a nice
semi-universal container format it's not what macosx uses and lots of
stuff like binflt and zimage is generated from it in a way that renders
more aggressive elf symbol stripping moot (and possibly harmful) in
those contexts...

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...)

It seems like what it's doing is pretty straightforward.  Hmmm...

I'm going to have to pull out my "linkers and loaders" book and wrap my
head back around all this ELF stuff.  Possibly this weekend.  If nothing
else I should document this in a FAQ (I need to start a toybox FAQ) that
"hey, you can do this to shrink the code further"...

Rob

 1328752424.0


More information about the Toybox mailing list