functexcept.cc draws in everything

Henning Baldersheim balder@devoll.no
Fri Mar 12 05:55:00 GMT 2004


At 14:31 11.03.2004, you wrote:
>On Thu, Mar 11, 2004 at 02:18:40PM -0800, Henning.Baldersheim@devoll.no wrote:
> > 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.
>
>Hm.  -ffunction-sections -fdata-sections were on by default the last time I
>checked.

Problem found.
In the *) part of the target case which I used as base for *-ecos*) did not 
set SECTION_FLAGS/SECTION_LDFLAGS. So they were empty. When I added them 
the first time I just did it in the multilib definition file(t-ppcgas). 
That explains why it was set for all but the default.

However I am still not able to get --gc-sections to do as it should. When I 
split up the functexcept.cc file it works fine. Then I only get 
__throw_bad_alloc. I have checked that the library actually has one section 
pr. function and that is true. So I wonder what other possible errors could 
I have made.
I am using target.ld file that is provided by ecos. It seems pretty 
straight forward. A few KEEP() but that is for the exception vectors and 
dor the ctors/dtors.
Any ideas ?


>--
>Debugging is twice as hard as writing the code in the first place.
>Therefore, if you write the code as cleverly as possible, you are,
>by definition, not smart enough to debug it.
>     - Brian W. Kernighan, in a plea for clear, straightforward code



More information about the Libstdc++ mailing list