Static symbols in libgcc
Alexandre Oliva
oliva@dcc.unicamp.br
Thu Jan 22 02:29:00 GMT 1998
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.
> 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?
> 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?
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil
More information about the Gcc
mailing list