This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: compiling options
- To: ecos-discuss at sourceware dot cygnus dot com
- Subject: Re: [ECOS] compiling options
- From: Hugo 'NOx' Tyson <hmtx at redxhatx dot com>
- Date: 06 Apr 2001 10:36:34 +0100
- Newsgroups: cygnus.sourceware.ecos.d
- Organization: Red Hat UK
- References: <CAEMICOOKMKAGHPNGNFNKEMPCHAA.danc@iobjects.com>
danc@iobjects.com (Dan Conti) writes:
> > I have also read that ffunction-sections is used but I don't
> > understand why. It seems to generate worse code, which is its advantage?
>
> -ffunction-sections causes functions to be put in their own section. used in
> conjunction with --gc-sections, you get selective linking, so that functions
> that aren't called aren't linked in to your final image.
That's right.
It will also mean that individual .o files, and libraries &c *are* larger.
But that has nothing to do with the *code* in the final image.
Is that why it looked like worse code?
- Huge