Static symbols in libgcc
Jeffrey A Law
law@cygnus.com
Fri Jan 23 13:30:00 GMT 1998
In message < orn2gpejzy.fsf@amazonas.dcc.unicamp.br >you write:
> Jeffrey A Law writes:
>
> > 2. Move them into libstdc++. Shouldn't this just involve moving
> > some functions into libstdc++? Or to put it another way is
> > there some compelling reason to have these functions in libgcc?
>
> AFAIK, these variables are not exclusively used by the C++ front-end,
> so they shouldn't be moved into the C++-specific library. gcc 2.8.0
> was delayed that long in order to move exception handling into the
> back-end.
Good point.
> > 3. Declare them in such a way as to only get one copy; instead of
> > a static, can it be a global (yes, there's a namespace pollution
> > issue, but it's worth thinking about). It could even possibly
> > be made weak global if that helps.
>
> If it's named __gcc_something, it's not an issue, since this name is
> reserved, at least in the C language. Could this be a problem for
> other languages?
Right.
> > 4. Or have a global pointer to a runtime initialized data structure
> > which has the stuff we need. We have the capability to initialize
> > stuff at program startup, so it shouldn't be that much of a stretch
> > to use it for this purpose.
>
> I don't understand how functions would obtain references to this data
> structure. Wouldn't they need a global symbol or such?
Yes, it would be a single global (presumably exported) symbol.
jeff
More information about the Gcc
mailing list