GLOBAL constructor symbol names for static vars are bogus!
Martin von Loewis
martin@mira.isdn.cs.tu-berlin.de
Wed Mar 11 21:31:00 GMT 1998
> However, most file names contain periods (ex - "foo.cc"). If I want
> to call one of these constructors myself (which I need to do in
> VxWorks, for example), gcc chokes on the name of the function because
> it contains a period.
Do you really need to call those yourself? Normally, you could have
collect2 go over all the files and produce __main (or the like),
which you then can call. Why doesn't this work?
> Can the names for these global constructors be "mangled" differently,
> or is there a way to get gcc to recognize the symbol in it's entirety,
> even though it contains periods?
If you really need to call it from source code, I assume you can use
inline assembly to do so. Another option is to define NO_DOT_IN_LABEL
for your target, in which case the period is replaced with an underscore.
Martin
More information about the Gcc-bugs
mailing list