Using size-optimization with gcc .

We use a simple hello program. Type the following program into your favorite editor.

We don’t want to debug our intro. We compile it using size-optimization and no frame-pointers.

Let’s see how big it executable.

We have about 9043 bytes.

We’ll strip the executable and remove useless information. The strip command discard symbols from object files.

Let’s see how big it’s now.

Now we have about 5300 bytes.

With sstrip part of the package ELFkickers, we can save about 1k.

You can test it.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.