-ffunction-sections always on now?

Stan Shebs shebs@apple.com
Mon Oct 1 19:28:00 GMT 2001

Benjamin Kosnik wrote:
> Hey stan, check out acinclude.m4
> If gcc can use these flags without barfing, they are turned on. If you
> want to add a bit more intelligence to this, please do (but for ELF, it
> should remain as is...)

If I understand the test correctly, it's just testing that the
compiler accepts the option, not that the resulting executable
works.  That's possibly a bogosity in GCC, because I only turned
on named sections to get Dwarf 2 sections of fixed names known
to work with Mach-O, but that's taken to mean that the function
section option works too, which doesn't really follow.

> > However, this make -ffunction-sections active.  I wouldn't care,
> > because I doubt our linker would do the right thing anyway, but
> > I noticed that libstdc++-v3 seems to try to build everything with
> > -ffunction-sections now, which is undesirable.
> Why is it undesirable?

If nothing else, the 16-char limit on Mach-O sections shoves
those poor mangled names into the wood chipper. :-)


More information about the Libstdc++ mailing list