+/* SunPRO encodes the static variables. This is not related to C++
+ mangling, it is done for C too. */
+
+static const char *
+i386_sol2_static_transform_name (const char *name)
+{
+ if (name[0] == '.')
+ {
+ const char *p;
+
+ /* For file-local statics there will be a period, a bunch of
+ junk (the contents of which match a string given in the
+ N_OPT), a period and the name. For function-local statics
+ there will be a bunch of junk (which seems to change the
+ second character from 'A' to 'B'), a period, the name of the
+ function, and the name. So just skip everything before the
+ last period. */
+ p = strrchr (name, '.');
+ if (p != NULL)
+ name = p + 1;
+ }
+ return name;
+}
+