On 2010-06-21, Grant Edwards <[email protected]> wrote:

> Thank you for posting a real example.  Now we can figure out what's
> going on.
>
> First, both -ffunction-sections and -gc-sections flags are commented
> out in your makefile.
>
> Second, it's '--gc-sections' not '-gc-sections'

Oops. That one's my fault.  I just noticed that I've been typing it
incorrectly with a single preceding hyphen during this discussion.

> Third, if you uncomment them and add the second hyphen, you're still
> not passing --gc-sections flag to the linker, you're passing it to the
> compiler (which should have resulted in a error message).
>
> If you want to pass the --gc-sections flag to the linker via the gcc
> command line, you need to use either "-W,--gc-sections" or "-Xlinker 
> --gc-sections"

-- 
Grant Edwards               grant.b.edwards        Yow! Xerox your lunch
                                  at               and file it under "sex
                              gmail.com            offenders"!


Reply via email to