Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Is there any trick to reduce the executable even further?
Re: Is there any trick to reduce the executable even further? [message #39086 is a reply to message #39080] Thu, 14 February 2013 15:17 Go to previous messageGo to previous message
lectus is currently offline  lectus
Messages: 329
Registered: September 2006
Location: Brazil
Senior Member
chickenk wrote on Wed, 13 February 2013 11:25

Using gcc, I would use the following:
CFLAGS = -Os -ffunction-sections -fdata-sections
CXXFLAGS = -Os -ffunction-sections -fdata-sections
LDFLAGS = -Os -Wl,--gc-sections

If you are creating ELF executables, you can also try superstrip: http://www.skarnet.org/software/misc/superstrip.c

My 2 cents...
Lionel



Interesting, but with -fdata-sections Mingw creates a BIGGER executable for me.

It adds an extra .data section in the executable.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Compiling a U++ project with a Python API on Windows
Next Topic: Per file compile flags
Goto Forum:
  


Current Time: Sun Aug 24 18:00:52 CEST 2025

Total time taken to generate the page: 0.05165 seconds