functexcept.cc draws in everything
Henning.Baldersheim@devoll.no
Henning.Baldersheim@devoll.no
Thu Mar 11 22:20:00 GMT 2004
Well, I learn something every day.
I checked it out and I found that I was using -Wl,--gc-sections. But that
should in theory work, but it did not.
Code was 230K before I did anything.
Splitting up functexcept.cc made it down to 116K.
Enabling multilibs with fexceptions/fno-exceptions brought and linking with
-fno-exceptions took it down to 90K.
I checked info gcc/ld and found that -ffunction-sections and perhaps
-fdata-sections should be enabled to. In my code and in the ecos code it is
enabled.
But I could not see any trace of it for the build of libstdc++. What is the
default ?
I guess that if I enable it it should work fine then.
Henning
At 13:38 11.03.2004, Phil Edwards wrote:
>If you are linking against the static .a library, try passong --gc-sections
>to the linker. The library is built so that each function gets its own
>section, and the linker should be able to discard the others.
>
> > Is it possible to split up this file and have the different functions
> > compiled as single modules, fx the way that is done with libgcc.a ?
>
>(Generally, you want "e.g." instead of "fx".)
>
>I'd have no problem with this. Thoughts, anyone? We've discussed it before
>but I don't recall why we decided not to.
>
>
>--
>America may be unique in being a country which has leapt
>from barbarism to decadence without touching civilization.
> - John O'Hara
More information about the Libstdc++
mailing list