This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: How about add two new configuration options(-ffunction-sections -fdata-sections)


> One opinion is that if it is done, it must not be the default.  Quoting
> from the GCC manual regarding -ffunction-sections and -fdata-sections:
> 
> "Only use these options when there are significant benefits from doing
> so. When you specify these options, the assembler and linker will create
> larger object and executable files and will also be slower. You will not
> be able to use gprof on all systems if you specify this option and you
> may have problems with debugging if you specify both this option and
> -g."
Yes, it should be disabled by default.

> 
> By the way, have you estimated the potential savings?
Here is size information for an typical mcu program:
$ arm-none-eabi-size app.axf.gc_section
   text	   data	    bss	    dec	    hex	filename
  35032	   2492	   2260	  39784	   9b68	app.axf.gc_section
$ arm-none-eabi-size app.axf.no-gc_section 
   text	   data	    bss	    dec	    hex	filename
  41144	   2560	   2300	  46004	   b3b4	app.axf.no-gc_section

Thanks very much.





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]