This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [patch, libgfortran] Build with -ffunction-sections -fdata-sections


Paolo Bonzini wrote:
> >> This brings done the minimal footprint of the Fortran library on SPU from
> >>> 150 KB to about 40 KB, and in addition enables use of automatic overlay
> >> support to run even programs making significant use of the library.
> > 
> > Doesn't this contradict the documentation which says:
> > "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.
> 
> Note that "will also be slower" refers to assembler and linker, not
> executables.  This part is true.

Also, while object and executable *files* may indeed be somewhat larger
due to the larger section table, the size of the loadable segments (which
does *not* include the section table) --and thus the memory requirements
at run-time-- should be at worst unchanged, and will typically be smaller
as unused functions can be more easily eliminated by the linker -- this is
the whole point.
 
> > 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."
> 
> On modern systems this warning is not a problem.  I've been using gprof
> and gdb with libstdc++ forever.

Agreed.  Overall, I do think that there *are* "significant benefits" from
building system libraries with -ffunction-sections ...

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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