Problem on Linking: Symbol too looonnnng, cut !

Joe Buck jbuck@synopsys.com
Thu Sep 10 17:58:00 GMT 1998


> 
> I'm using on Solaris-2.6 (Ultra2)
> gcc version egcs-2.91.57 19980901 (egcs-1.1 release)
> 
> I've made an intensive use of templates and STL maps. The problem is
> that generated symbols are too long ! They seems to be cutted.
> ...
> 
> Is there any workaround ?
> On linker ?!
> On egcs (compress symbol mode ?).

There are some notes about this in the g++ FAQ (I know, it's really
overdue for a major rewrite).

The short-term workaround is to use the GNU assembler and linker, which
can handle very long names.  If this isn't possible, you can shorten
the names considerably for maps using strings by deriving from string
and using that, since string is really a template with a rather long name.

The long-term workaround (for the future) is to use the new mangling
scheme.  It can be turned on even in egcs-1.1 by -fsquangle (squangle ==
squish + mangle), but will have to be used with all the code you link.
This produces much shorter names.  Eventually it will be the default.




More information about the Gcc mailing list